dataesr/scientific-paragraphs-categorization huggingface dataset:
Introduction Missing data (MD) arises quite often in statistics. This situation should be analysed carefully since many classical statistical analyses cannot be directly applied when this occurs. For example, an elementary way to handle MD is suppression. Referred as "deletion", this can be performed listwise (all the observations with at least one non-observed variable are excluded) or pairwise (only the observations where the variable of interest is missing are deleted, but the missing values of the unused variables are kept). However, these methods have two major drawbacks. First, they always decrease the size of the dataset. Second, if for a given variable, the probability of occurrence of an MD is correlated to the value that should have been observed (for example, in a survey about incomes, people with highest incomes are more likely to refuse to answer), deletion may generate a bias in the estimation.
Besides deletion, there are two classes of methods to handle missing values in a dataset: include them in the analysis using dedicated methods, such as, for example, the well-known EM algorithm of  Dempster et al. (1977) , see also  Little and Rubin (2014)  for an extended review of methods; or impute missing values (i. e. , replace them with plausible data). The imputation problem will not be discussed here but the reader may refer to the book of  Van Buuren (2018). When one wants to include MD, the way to do it depends on the type of missing values mechanism involved in the dataset. In his seminal work,  Rubin (1976)  presented three types of MD mechanisms: Missing Completely at Random (MCAR), Missing At Random (MAR), and Missing Not At Random (MNAR). In the case of MCAR mechanism, the missing values of a given variable are independent of all the other variables.
Indeed, for MCAR or MAR MD, either the missing values do not cause a loss of information for the variable (except the decrease in the number of observations) or the information about the missing values can be found elsewhere in the dataset. In contrast, for the MNAR case, at least a part of the missing information is not available. Consequently, it is important to distinguish between the ignorable and non-ignorable cases. Enders (2010)  stated that "MCAR is the only mechanism yielding to testable propositions" and that if one wants to test the hypotheses H 0 =MAR or H 0 =MNAR, additional assumptions should be made. For example,  Breunig (2019)  proposed a test of the MAR mechanism that uses an instrumental variable. As announced by Enders, the application of Breunig's test assumes the availability of such an instrumental variable and that this variable does not have missing values.
The main idea is still to test for the homogeneity of means and covariances. They aim at improving the performance of Little's test when working with smaller samples. They also allow overcoming a restriction of Little's work: Little's test with covariance matrices estimated by group requires the number of individuals in a group to be larger than the number of observed variables in this group. Otherwise, the empirical covariance matrix is singular. Anyway, none of these tests apply when each individual has a distinct pattern of MD, a common situation when working with longitudinal data. The dataset is composed of several explanatory variables (quantitative and categorical), and one categorical outcome variable. This is the most comprehensible framework to present the test methodology, possible extensions to other types of variables are discussed in Section 7.
This MAR hypothesis can be written as for all t = 1,. , T, the following conditions (a) and (b) are verified (a) ∀p ∈ O, ∀u, v ∈ U, P(Y t = N A|U t = v, O t = p) = P(Y t = N A|U t = u, O t = p), (b) ∃p, q ∈ O, p = q, such as ∀u ∈ U, P(Y t = N A|U t = u, O t = p) = P(Y t = N A|U t = u, O t = q). (M2) The first line of (M2) says that the probabilities do not depend on U t. The second line says that there are at least two values of the observed covariable leading to different probabilities of MD. This corresponds, for example, to probabilities that are equal for the same value of O t but different when O t changes. To test such a null hypothesis, something similar to what is often performed in a power analysis with post hoc inference should be done, that is, make assumptions about the values p and q considered and estimate the size of the effect: P(Y t = N A|U t = u, O t = p) -P(Y t = N A|U t = u, O t = q) on the dataset.
The EM algorithm presented in  Bartolucci and Farcomeni (2015)  was implemented in the package LMest  Bartolucci et al. (2017). Nevertheless, this package does not handle covariables in both the emission and transition probabilities of the HMM. The estimation algorithm was then rewritten to include this capability. For individual i = 1,. , n and t = 1,. , T , consider the longitudinal observations y i,. = (y i t ) t=1,. ,T , where y i t ∈ Y = {1,. , y max , NA}. The individuals were assumed to be independent, so the log-likelihood of the model is θ (y) = n i=1 θ (y i,. ), with θ (y i,. ) = log P θ (Y i,. = y i,. ) = log   u i,. ∈U T P θ (Y i,. = y i,. |U i,. = u i,. )P θ (U i,. = u i,. )   , where U i,. is the random vector (U i,t ) t=1,. ,T and u i,. is one realization of this vector and U = {1,.
To maximize the chances of finding the global maximum, the EM algorithm was run from several random starting points. Note that the computation time can be reduced using a short-run strategy  Lagona and Picone (2013)  or a stochastic EM  Dedieu et al. (2014). N = n × T is the number of observations in the whole dataset (the number of individuals × the number of times). Let αN be the subvector of θN containing the MLE of α. Let g be a function from R nα to R nunp such that for α, g(α) = (g i (α)) i=1. nunp = 1 τ (u, p) (u,p) , where n u = Card(U) and n p = Card(O). It remains to check whether or not αN is close to H 0. That is, whether the constraints imposed by H 0 on g(α N ) approximately hold. The MCAR mechanism hypothesis implies that all the g i (α) are equal. The ignorable mechanism hypothesis implies that for each p, all the g i (α) corresponding to the covariable O t = p are equal.
Simulations Because the study that motivated our interest in MD for HMM was linked to pig farming, the simulation study was conducted with data as close as possible to the the pig farming data. Diarrhea is a common health problem in post-weaning piglets. An experiment was organized to describe the way this occurs. Piglets were observed during their early age and their health status assessed by a visual inspection of their feces. For each piglet, the feces were evaluated each day after the end of its weaning. Because the observation time was limited to 20 min per day and a group of piglets, not all the feces of a group were observed. This resulted in a lot of missing values in the time series of observations. Beside the assessment of the feces, real-time water and food consumption and weight measurements were recorded for each piglet.
The behaviour covariables were included in the initial and transition probabilities of the Markov chain. The feces evaluations were performed by three different observers. The variable representing the observer is included as a covariable in the emission process, i. e. , O t ∈ {1, 2, 3}. In order to evaluate performance of the test, simulations were carried out. An estimation of the distribution of the initial values and growth coefficients for each type of behavior data (water, food, and weight), are obtained from healthy piglets. A total of 10000 piglets, i. e. , behavior data and health status over 35 days, were simulated using these estimates. First, in order to control for the total number of observations with a sick health status, a sequence of health statuses was generated. For each piglet, two illness episodes of length five days were randomly spread over the time period, in order to obtain about 30% sick days.
Finally, for each simulated piglet, several vectors of feces evaluations were generated: one for each MD mechanism (see below) and for different proportions of missing values in the dataset. In the piglet example, the emission law is the conditional distribution of the feces evaluation given the latent health status and the observer who made the evaluation. That is, the following discrete probabilities have to be fixed for each u ∈ {1, 2} and each o ∈ {1, 2, 3}: P(Y i t = 1|U i t = u, O i t = o) ; P(Y i t = 2|U i t = u, O i t = o) and P(Y i t = N A|U i t = u, O i t = o). For the MCAR mechanism, the probability of MD is the same for all the observers and health statuses. The probabilities of observing Y = 1 or Y = 2 were fixed so that a diseased piglet was more likely to have pathological feces than normal ones and so that a healthy piglet was more likely to have normal feces than pathological ones.
and under H 0 = ignorable MD (bottom). When there are too many or too few MD, the asymptotic is not reached. 20% of MD seems to be the "best" proportion. Computed as described in Section 4. 3, the empirical quantiles of level 95%, for the two tests and for the different proportions of missing values, are shown in Table  5. As for the convergence of the test statistic law, the quantile varies with the total proportion of MD. This is an additional argument for the use of the empirical quantile obtained by simulation. Prop NA 0. 05 0. 1 0. 15 0. 2 0. 3 0. 4 0. 5 quantile under  MCAR hyp. (theo. 11. 07 ) 17. 88 14. 72 13. 63 13. 46 12. 54 14. 51 21. 46 quantile under Ignorable hyp. (theo. 7. 81) 12. 87 11. 48 11. 22 11. 41 11. 76 15. 06 20. 88  Table  5 : Empirical quantiles for the two test statistic distributions according to the total proportion of NA in the dataset.
The relation between behaviour data and illness is not trivial. The parameters of the HMM were estimated a first time, in order to have reference values for the emission probabilities of the evaluations Y = 1 or 2 for the MCAR and MAR mechanisms. For the MAR mechanism, the proportion of MD was fixed for each observer, and estimated from the real data. In the dataset, the total proportion of missing values was 8%. Simulations were performed to determine the empirical quantiles of the test statistics distribution under both the ignorable and MCAR hypotheses. In this application, the ignorable MD hypothesis was rejected, concluding that the MD were of the non-ignorable type: the health status of a piglet affects the occurrence of a missing observation. The missing information cannot be recovered using the observed data alone.
Discussion and conclusion This section contains a comment on the application of the tests to real data. The parameters of the HMM should be estimated a first time for the simulated data to be generated. Currently, the variance of this first estimation is not considered. But as it is done in parametric bootstrap, it is taken into account when the parameters α, β, and γ are re-estimated for each simulation sample. A sequential test could be built as follows: first, use test 1 to test the ignorable null hypothesis, and if it is not rejected, use test 2 to test the MCAR null hypothesis. At the end, this test would be able to classify a dataset with MD as MCAR, MAR, or MNAR. This procedure has some advantages but currently suffers some drawbacks. Indeed, concerning the null hypothesis MCAR, the final risk of type I (i.
e. , the proportion of datasets with MCAR missing data that are wrongly classified as MAR or MNAR) can be fixed to 5% by choosing a couple of adequate quantiles for tests 1 and 2. The use of the sequential test allows slightly increasing the power of the MCAR null hypothesis test compared to the direct test of MCAR (test 2), see Table  6   Nevertheless, the control of the overall type I risk for the MAR hypothesis requires the control of the type II risk of the first test and of the type I risk for the second test. In our simulations, it has not been possible to find suitable pairs of levels for tests 1 and 2 in order to obtain a controlled risk of 5% for both the MCAR and MAR hypotheses. Moreover, in our simulations, the risk for the MAR hypothesis cannot always be set to 5% (even if considered alone, without fixing the risk for the MCAR hypothesis).
This issue occurs when there is too much MD in the dataset (a proportion greater than 30%, as can be seen in Table  6 ). However, the sequential test procedure appears interesting since it would allow testing the MAR hypothesis, for which only a few tests exist. For both tests considered in this article, a decreased power was observed when the proportion of MD is 15%. The power of a test is directly linked to the distance between the null and alternative hypotheses. In the HMM framework, two things, among others, can explain a bad separation of the hypotheses. Firstly, the theoretical distance between the hypotheses is small, i. e. , the emission probabilities of Y =NA fixed for the simulation are not sufficiently different (the values chosen for the simulations can be seen in the last line in Table  2 ).
Mini-GPS dataloggers Altogether, 20 bush Karoo rats (14 females and 6 males) were fitted with Gipsy mini-GPS datalogger collars (Technosmart, Rome, Italy), which weighed 4. 5 g, representing less than 5% of body weight (Fig. 1 )  (Murray and Fuller 2000). Rats weighed 96. 6 ± 19. 3 g (range: 67. 5-131. 2 g). Data collection started with a delay of 2 days after collar attachment to allow the bush Karoo rats to get accustomed to them (verified by focal animal observations at the lodge the day before the mini-GPS collected data). The Gipsys were programmed to collect GPS fixes (longitude, latitude, altitude, date, and time) on day 3 starting at 6 AM every 5 min, battery life did not allow us to collect data for more than 1 day. We chose this frequency as in our main running study (to be finished in 2023) we want to compare in how far neighbouring rats share their daily ranges (being in the same area at the same time), necessitating a higher frequency than for example one fix every 2 h.
Radio-tracking was performed by using an AOR 8000 wide-range receiver (Tokyo, Japan) and a Telonics RA-14 K antenna (Mesa, Arizona) and we followed the same procedure as in multiple studies for striped mice on the same field site  (Schradin and Pillay 2006; Schradin et al. 2010 ). Both species are diurnal but with an activity peak during mornings and afternoons  (Schradin 2006). Striped mice seek shelter in different shrubs during the hot periods of the day and rarely in their main nesting site  (Schradin 2006). The same might be true for bush Karoo rats, which often have several lodges and shade providing shrubs in their territory, as indicated by our observations and trapping data  (Schradin 2006). Individuals were radio-tracked for 7 days. Fixes were taken 6 times a day between 9 AM and 6 PM.
To ensure independence of data points  (Kenward 1987) , intervals between fixes were approximately 1h 30 mins apart, giving rats enough time to traverse through their entire home range, except during the hottest part of the day (from 12 to 2 PM), when rats are inactive. Fixes were obtained by using the 'homing in' method: an individual was approached until we either saw it or identified the bush in which it was located. The location of the bush Karoo rat was then recorded with a handheld GPS (eTrex Venture, GARMIN International, Olathe, Kansas). In 4. 2% of cases, the position of individuals was confirmed by visual sightings. The coldest mean temperatures (recorded directly at the research station) during days we radio-tracked bush Karoo rats differed significantly from the temperatures on which they carried mini-GPS (14.
We did this in QGIS (QGIS 2009) using the distance to nearest hub (points) toolkit. The source points were the Gipsy points, and the destination points were the track points from the handheld GPS. We excluded fixes with an accuracy so low that we would have removed them from data analysis (see below). For a measure of accuracy, Gipsy5 units record the HDOP (Horizontal Dilution of Precision), a value which describes the geometric strength of satellite configuration on GPS accuracy; lower values indicate higher accuracy) (Technosmart, Rome, Italy). Fixes with an HDOP > 5 were excluded. Gipsy6 units record horizontal accuracy estimates for fixes, and provide accuracy data in the following five categories: > 100 m, < 100 m, < 50 m, < 15 m and < 10 m. It is important to note that these categories are rough estimates as in contrast to a large handheld GPS, the mini-GPS cannot directly determine their accuracy (information provided by Technosmart).
We determined the location error for the Gipsy6 units by collecting calibration data using stationary tests. Four units were placed near lodges where a bush Karoo rat carried a Gipsy and allowed to collect fixed location data for 24 h. The calibration data were then used to estimate the location error through the ctmm  (Calabrese et al. 2016)  workflow in R and RStudio (Posit Team 2023; R Core Team 2022) and accounting for it before continuing with calculating the range sizes  (Fleming et al. 2021). We also visually compared the data from the stationary Gipsys with the Gipsys carried by bush Karoo rats inhabiting the lodges.
Data analysis For Gipsy5, fixes with an HDOP > 5 were excluded. The remaining fixes were visualised in QGIS and isolated outliers far (> 15 m) from the main lodge of the rat and from other fixes were excluded. For Gipsy6, fixes with a horizontal accuracy better than 50 m (i. e. < 50) were included; see results section for validation of this procedure. We used several methods to calculate home range sizes. First, using the package adehabitatHR  (Calenge 2015)  in R (R Core Team 2022) we calculated the traditional measures used in radio-tracking studies: For comparison with other species, home range size was estimated as minimum convex polygons (MCP) which calculate the home range size by drawing a convex polygon around the individuals' point data  (Mohr 1947; Powell 2000). In contrast, Kernel density estimators calculate the probability of finding an individual in a particular location by using un-parametric statistics  (Worton 1989).
2022). Range estimates using the ctmm workflow were only possible for the 12 Gipsy6 units and not the 8 Gipsy5 units, as location errors were determined after the main study (due to comments by colleagues), when no Gipsy5 unit was available anymore. We present data for all approaches to enable the reader to compare the traditional with the more modern ways of home range analyses. We ran a linear mixed model using the lme4  (Bates et al. 2015)  package to analyse factors influencing the range size estimates. As the data were normally distributed, we used the gaussian family with the identity link function. The estimated range size was the dependent variable and as independent variable we included the equipment (Gipsy or radio-tracking), the used calculation model (MCP, Kernel, AKDE), and the sex of the individual.
We rarely saw the rats during radio tracking (4% of fixes), when they had withdrawn into their lodge, and which was in contrast to 40% of sightings of striped mice on the same field site in a previous study  (Schradin and Pillay 2005). Rats had several lodges available in their home range but typically were always radio-tracked in the same lodge, which contrasts with the sympatric diurnal striped mouse that during the day often rests away from its nesting site. In contrast to radio-tracking data, the daily range estimates from the GPS dataloggers included the foraging grounds of rats which we knew from observations during our field work. The range estimates using mini-GPS dataloggers were 5 to 10 times larger than those estimated from radio-tracking data. The range data obtained from bush Karoo rats via radio-tracking using the homing-in technique mainly provided us with the information where they are nesting, but not where they are foraging.
Radiotransmitters were much smaller than mini-GPS loggers, and data were collected over 7 days, and not only for 1 day as with the mini-GPS loggers. If rats would be more active carrying smaller devices and observed in more areas when monitored for a longer period, then this would suggest finding larger range sizes with radio-transmitters than with mini-GPS, but we found the opposite. Every new method employed should be validated for accuracy. We found that the fixes obtained from the  1 3 mini-GPS dataloggers matched those from the handheld GPS used for radio-tracking during a hike. Thus, we concluded that the larger ranges obtained from the mini-GPS dataloggers were not due to a lower accuracy of its fixes, as they were as accurate as the fixes from radio-tracking. We cleaned the mini-GPS data by excluding points with high inaccuracy.
Future studies should test whether mini-GPS or radio-tracking would lead to more accurate range estimates in small mammals having foraging strategies different from central place foraging. Considering the progress in producing ever smaller GPS and the lower workload of using mini-GPS than radio-tracking, we encourage other researchers to test and validate whether this technology is also useful for small mammals with large home ranges and different foraging strategies. 5  Daily ranges of four females calculated using the ctmm package method as autocorrelated Kernel density estimates correcting for the location error vs the stationary test units placed at the nests (the small lines within). This diagram shows that while location errors are relatively large for these small daily ranges, our method allowed to calculate daily ranges that are clearly larger than the location error.
Acknowledgements We are thankful for comments by  N. Pillay ,  M. Enstipp  and  C. Catoni  that significantly improved the manuscript. C. H. Fleming gave important advice and help with analysing the data while taking the location error into account. This study was made possible by the administrative and technical support of the  Succulent Karoo Research Station  (registered South African  NPO 122-134 ). We are grateful for the support of  Goegap Nature Reserve  and its staff as well as the  Northern Cape Department of Environment & Nature Conservation. This study was supported by the  CNRS  and the  University of the Witwatersrand.
Data collection. One month before the beginning of the study, the cows were fitted with collar-attached tri-axial accelerometers (AXEL sensor) commercialized by ITK/NewMedria (Chateaubourg, France). The collar was tightly attached with a buckle. During three consecutive days before any observation, the cows were handled (headlocked and clinically examined) by researchers to habituate them to the experimental procedures. Behavioural observations, clinical examinations and blood sampling were performed at regular intervals from just before the LPS injection up to 24 h post-injection (hpi), by two experienced researchers or by continuously sensor monitoring of the cow's activities and position. Five time-points were chosen to monitor the animal responses to the LPS challenge, based on the putative inflammatory response from acute phase to recovery  18, 29, 32  : T-1 h (just before the LPS challenge), at 3 hpi (T + 3 h) and 6 hpi (T + 6 h) to monitor the acute phase, then at 12 hpi (T + 12 h) and 24 hpi (T + 24 h).
The clinical and blood data obtained at T-1 h served as baseline control (Fig. 1 ). www. nature. com/scientificreports/ Direct behavioural observations in the barn and feeding motivation test. The cows' general behaviour was recorded from 1 h before up to 24 h after the challenge, a few minutes before each five time-points, when the cows were free to move in their pen, before headlocked them. The observer was blind to the treatment applied and used instantaneous focal-animal sampling  33. A few minutes before each time-point, she quietly approached the barn, observed the cow for 10-20 s approximatively, and completed an individual assessment of the cow's behaviour by standing at the boundary of the barn, at 5-8 m from the focal cow so as not to disturb her. She was trained in observational analysis of animal behaviour, and checked absence or presence of 15 behavioural signs of sickness or pain selected from the literature, i.