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 PA matrix. The first column, label[,1], includes the person id, and the second column, label[,2], includes the day label of 1 to 7, indicating Sunday to Saturday.
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 create.flag().
wear.hr
Minimum wearing hours during the time range. If wear.hr=10 (default), select the valid days that include more than 10 hours of wearing.
time.range
Define the time range for the standard measurment day. Default is time.range
= c("09:00", "20:59").
mark.missing
If mark.missing = 0 (default), the nonwearing time is marked by 0 while the wearing time is marked by 1 in flag matrix. If mark.missing = 1, it is the opposite.
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
valid.subjects
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)