Description Usage Arguments Value Author(s) References See Also Examples
Computes the missing rate from acceleromater data.
1 | missing.rate(label, flag, mark.missing = 0, time.range = c("09:00", "20:59"))
|
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 |
mark.missing |
If |
time.range |
Define the time range during which the missing rate is computed. Default is 9am-9pm, coded by |
Numeric value of a missing rate between 0 to 1. The output is a list of
total |
total missing rate during the time range |
table |
missing rate on days by subject |
table.wh |
wearing hours on days by subject |
label |
wearing hours by subject id and day, same information as table.wh but different data frame |
Jung Ae Lee <jungaeleeb@gmail.com>
[1] Lee JA, Gill J (2016). Missing value imputation for physical activity data measured by accelerometer. Statistical Methods in Medical Research.
1 2 3 4 5 6 7 8 9 10 11 | ## missing rate calculation: uncomment and run the code below
# data(acceldata); attach(acceldata)
# missing.rate(label, flag, mark.missing=0, time.range=c("09:00", "20:59"))$total
## create missing flag by 60 min criterion
# flag60 = create.flag(PA, window=60, mark.missing=0)
# mr = missing.rate(label, flag60, mark.missing=0, time.range=c("09:00", "20:59"))
# mr$total #28.1 percent
## missing proportion by days
# mean(mr$table < 0.1) # 45.8 percent
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.