g.impute: function to identify invalid periods in the meta-data as...

Description Usage Arguments Value Author(s) Examples

Description

Functions takes the output from g.getmeta and information about the study protocol to label impute invalid time segments in the data.

Usage

1
2
g.impute(M, I, strategy = 1, hrs.del.start = 0, hrs.del.end = 0, maxdur = 0,
ndayswindow = 7,desiredtz="Europe/London")

Arguments

M

output from g.getmeta

I

output from g.inspectfile

strategy

how to deal with knowledge about study protocol. value = 1 means select data based on hrs.del.start, hrs.del.end, and maxdur. Value = 2 makes that only the data between the first midnight and the last midnight is used for imputation. Value = 3 only selects the most active X days in the files. X is specified by argument ndayswindow

hrs.del.start

how many HOURS after start of experiment did wearing of monitor start?

hrs.del.end

how many HOURS before the end of the experiment did wearing of monitor definitely end?

maxdur

How many DAYS after start of experiment did experiment definitely stop? (set to zero if unknown = default)

ndayswindow

If strategy is set to 3 then this is the size of the window as a number of days

desiredtz

see g.getmeta

Value

metashort

imputed short epoch variables

rout

matrix to clarify when data was imputed for each long epoch time window and the reason for imputation. Value = 1 indicates imputation. Columns 1 = monitor non wear, column 2 = clipping, column 3 = additional nonwear, column 4 = protocol based exclusion and column5 = sum of column 1,2,3 and 4.

averageday

matrix with n columns for n metrics values and m rows for m short epoch time windows in an average 24 hours period

Author(s)

Vincent T van Hees <vincentvanhees@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
  #inspect file:
  I = g.inspectfile(datafile)
  
  #autocalibration:
  C = g.calibrate(datafile) 
  
  #get meta-data:
  M = g.getmeta(datafile)

## End(Not run)

data(data.getmeta)
data(data.inspectfile)

#impute meta-data:
IMP = g.impute(M=data.getmeta, I=data.inspectfile)

ucl-cls/mcs-acc documentation built on May 3, 2019, 2:22 p.m.