valid.days {accelmissing} | R Documentation |
Select the Valid Days
Description
Selects the complete (valid) days that include sufficient wearing time.
Usage
valid.days(PA, label, flag, wear.hr = 10, time.range = c("09:00", "20:59"),
mark.missing = 0)
Arguments
PA |
an N by T matrix including activity counts, where N is the total number of daily profiles, and T is the total minutes of a day (T=1440). |
label |
an N by 2 matrix including the labels corresponding to |
flag |
an N by T matrix with the values of either 1 or 0 which indicating wearing or missing. This matrix can be created from |
wear.hr |
Minimum wearing hours during the time range. If |
time.range |
Define the time range for the standard measurment day. Default is |
mark.missing |
If |
Value
List with the updated PA, label and flag matrix objects.
Author(s)
Jung Ae Lee <jungaeleeb@gmail.com>
References
[1] Lee JA, Gill J (2016). Missing value imputation for physical activity data measured by accelerometer. Statistical Methods in Medical Research.
See Also
Examples
data(acceldata); attach(acceldata) # read data
# filtering data for valid days
valid.days.out = valid.days(PA, label, flag, wear.hr=8, time.range=c("09:00","20:59"))
ls(valid.days.out)