diff --git a/docs/articles/chapter2_Pipeline.html b/docs/articles/chapter2_Pipeline.html index 24c791c6a..20d478480 100644 --- a/docs/articles/chapter2_Pipeline.html +++ b/docs/articles/chapter2_Pipeline.html @@ -200,23 +200,17 @@

Milestone data -

The milestone files are stored in sub-folders of the output folder as -show below. Note that the output folder is named +

The milestone data files are stored in sub-folders of the output +folder as show below. Note that the output folder is named output_mystudy as example but exact name may differ for you.

The milestone files are potentially useful for you for the following reasons:

diff --git a/docs/articles/chapter3_QualityAssessment.html b/docs/articles/chapter3_QualityAssessment.html index 6fa487ed4..b51d6bc56 100644 --- a/docs/articles/chapter3_QualityAssessment.html +++ b/docs/articles/chapter3_QualityAssessment.html @@ -116,12 +116,13 @@

3. Data Quality Assurance

Time gaps identification and imputation

-

Accelerometer data stored in binary format (e.g. .bin or .cwa) where -it is typically structured in data blocks. Each data block has a header -at the top and a constant number of data points often represent a few -seconds of data. For the Axivity accelerometer with data stored in -‘.cwa’ file format those blocks can, on rare occasions, be corrupted and -unreadable, therefore creating a gap in the information recorded.

+

Accelerometer data stored in binary format (e.g. .bin or .cwa) is +typically structured in data blocks. Each data block has a header at the +top and a constant number of data points per block, usually the +equivalent of a few seconds of data. For the Axivity accelerometer with +data stored in ‘.cwa’ file format those blocks can, on rare occasions, +be corrupted and unreadable, therefore creating a gap in the information +recorded.

For the ActiGraph accelerometer, but also some other sensor brands that export data in ‘csv’ file format, it is possible that the recording stops at certain time and starts recording after some time, therefore diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index e8e1f760f..ffd1b2a2e 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -29,7 +29,7 @@ articles: HouseHoldCoanalysis: HouseHoldCoanalysis.html readmyacccsv: readmyacccsv.html TutorialDaySegmentAnalyses: TutorialDaySegmentAnalyses.html -last_built: 2024-09-03T06:54Z +last_built: 2024-09-03T07:43Z urls: reference: https://wadpac.github.io/GGIR/reference article: https://wadpac.github.io/GGIR/articles diff --git a/docs/search.json b/docs/search.json index cdfe65166..c2c0b3e70 100644 --- a/docs/search.json +++ b/docs/search.json @@ -1 +1 @@ -[{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Contributing.html","id":"if-you-have-coding-skills","dir":"Articles","previous_headings":"","what":"If you have coding skills…","title":"Contributing","text":"welcome contributions development, maintenance, documentation GGIR. Please find GGIR’s contributing guidelines .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Contributing.html","id":"if-you-do-not-have-coding-skills-","dir":"Articles","previous_headings":"","what":"If you do not have coding skills….","title":"Contributing","text":"might coding skills contribute code base GGIR, still contribution important us. example: Apply funding support development maintenance GGIR. GGIR free software entirely depend users applying funding sponsor efforts. Funding used support development new functionalities, support improvement existing GGIR software code, support development better open-access training materials instruction videos. Report issues questions GGIR google group. Proofread GGIR documentation inform us miss something found difficult follow.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_GetStarted.html","id":"run-ggir-for-the-first-time","dir":"Articles","previous_headings":"","what":"Run GGIR for the first time","title":"Get started: the GGIR R package","text":"First, need place file(s) folder computer. Make sure folder contains accelerometer files. Use following command run GGIR. datadir refers directory located accelerometer files. outputdir refers directory want store GGIR’s output. minutes, able see output directory gets populated files, reports, visualizations. command let GGIR run default settings (parameters), analysis tailored yet study design research question. documentation chapters find website guide .","code":"library(GGIR) GGIR(datadir=\"C:/mystudy/mydata\", outputdir=\"D:/myresults\")"},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_GetStarted.html","id":"related-links","dir":"Articles","previous_headings":"","what":"Related links","title":"Get started: the GGIR R package","text":"Install R GGIR Get support Suitable file formats GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Installation.html","id":"install-r-and-rstudio","dir":"Articles","previous_headings":"","what":"Install R and RStudio","title":"Installation of the GGIR R Package","text":"Download install R Download install RStudio","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Installation.html","id":"install-ggir","dir":"Articles","previous_headings":"","what":"Install GGIR","title":"Installation of the GGIR R Package","text":"Install latest released version GGIR dependencies CRAN. can one command R command line: Alternatively, can install latest development version, might include additional bug fixes functionalities. get development version, please use:","code":"install.packages(\"GGIR\", dependencies = TRUE) library(GGIR) install.packages(\"remotes\", dependencies = TRUE) remotes::install_github(\"wadpac/GGIR\", dependencies = TRUE) library(GGIR)"},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Installation.html","id":"other-packages-you-may-need","dir":"Articles","previous_headings":"","what":"Other packages you may need","title":"Installation of the GGIR R Package","text":"Additionally, use-cases need install one multiple additional packages. Note packages installed default, please follow instructions : want derive Neishabouricounts (.neishabouricounts = TRUE), install actilifecounts package install.packages(\"actilifecounts\") want process Sensewear xlsx files (dataFormat = \"sensewear\"), install readxl package install.packages(\"readxl\")","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Installation.html","id":"installing-older-versions-of-a-package","dir":"Articles","previous_headings":"","what":"Installing older versions of a package","title":"Installation of the GGIR R Package","text":"aiming reproduce historical analysis critical install correct package version. explain GGIR release 2.4-0 work release. Note GGIR archived CRAN (major releases ) GitHub (releases). CRAN archive: see releases available CRAN check : https://cran.r-project.org/src/contrib/Archive/GGIR/. GitHub: see releases available CRAN check : https://github.com/wadpac/GGIR/releases.","code":"require(remotes) install_version(\"GGIR\", version = \"2.4-0\", repos = \"http://cran.us.r-project.org\") require(remotes) install_github(\"wadpac/GGIR\", ref = \"2.4-0\")"},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Support.html","id":"questions-and-problems","dir":"Articles","previous_headings":"","what":"Questions and problems","title":"How can I get service and support?","text":"general questions issues please join GGIR google group create new thread. report problem group always try create minimalistic example someone else can use reproduce investigate problem. However, familiar GitHub, also welcome report issue via GitHub issue tracker. Please use message template displayed. Note support places based voluntary efforts encourage try help users questions. Questions valuable help us understand challenges run occasionally help us identify bug code. make practical, please AVOID sending questions personal messages. Instead, post public platforms. approach allows others benefit discussions, minimises need us respond inquiries repeatedly, enhances likelihood others can answer questions ’re unavailable, acknowledges volunteer effort invested responding queries.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Support.html","id":"commercial-training-services","dir":"Articles","previous_headings":"","what":"Commercial training services","title":"How can I get service and support?","text":"Accelting provides online training options using GGIR, please find website. questions, please hesitate reach via: training@accelting.com.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Support.html","id":"dedicated-support","dir":"Articles","previous_headings":"","what":"Dedicated support","title":"How can I get service and support?","text":"need dedicated support use GGIR, want GGIR modified enhanced needs, please contact Vincent van Hees.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-analysis","dir":"Articles","previous_headings":"","what":"Sleep analysis","title":"10. Sleep Analysis","text":"Sleep analysis GGIR comes three stages: discrimination sustained inactivity wakefulness periods, discussed chapter 8. Identification time windows guide eventual sleep detection, discussed chapter 9. Assess overlap windows identified step 1 2, use define Sleep Period Time window (SPT) time bed window (TimeInBed) discussed chapter. previous two chapters learnt first two steps chapter discuss last step.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-period-time-spt-window-or-time-in-bed","dir":"Articles","previous_headings":"Sleep analysis","what":"Sleep Period Time (SPT) window or Time in Bed","title":"10. Sleep Analysis","text":"two scenarios: guider reflects approximation Sleep Period Time window, window sleep onset waking end night, SIB fully partially overlaps guider considered sleep. guider reflects Time Bed SIB fully overlaps guider considered sleep. scenario sleep latency sleep efficiency can estimated included GGIR part 4 report. cases start first SIB considered sleep onset end last SIB considered waking . guiders, “HorAngle”, parameter sleepwindowType automatically set “SPT” corresponding scenario 1, attempt made estimate sleep latency sleep efficiency. use guider sleeplog reflects Time Bed need set parameter sleepwindowType = \"TimeInBed\" tell GGIR follow scenario 2.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"cleaningcode","dir":"Articles","previous_headings":"Sleep analysis > Quality assurance","what":"Cleaningcode","title":"10. Sleep Analysis","text":"monitor possible problems sleep detection, output variable cleaningcode stored per night. Cleaningcode per night (noon-noon 6pm-6pm described ) can one following values: 0: sleep log available SPT identified. 1: sleep log available, alternative guider used (HDCZA default) SPT identified . 2: enough valid accelerometer data present night, parameter includenightcrit used define many valid hours need. 3: accelerometer data available. 4: nights analysed person. 5: SPT estimated based guider , either SIB found entire guider window complicates defining start end SPT, user specified ID number recording night number data_cleaning_file, , tell GGIR rely guider rely accelerometer data particular night. 6: sleep log available also alternative guider (HDCZA/HorAngle) failed specific night use average guider estimates nights recording guider night. HDCZA/HorAngle estimates also available entire recording use L5+/-12 estimate night.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"visual-inspection-of-classifications","dir":"Articles","previous_headings":"Sleep analysis > Quality assurance","what":"Visual inspection of classifications","title":"10. Sleep Analysis","text":"overlap sib guiders difficult review quantitative way, GGIR offers option export visualisation, parameter .visual = TRUE. manage number visualisations generated possible tell GGIR show outliers. , outliers defined difference guider edge final classification sleep onset wakeup time larger parameter criterror. set parameter outliers.= TRUE nights considered outlier displayed. functionality useful reviewing classifications large data sets use sleep logs. Visual inspection outliers way can example help identify data entry errors sleep logs.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"data-cleaning-file","dir":"Articles","previous_headings":"Sleep analysis > Quality assurance","what":"Data cleaning file","title":"10. Sleep Analysis","text":"data quality check may observe adjustments needed. Parameter data_cleaning_file (path csv file create) allows specify individuals nights part4 entirely rely guider. first column csv file column name ID column relyonguider_part4 specify night. night_part4 allows tell GGIR night(s) omitted part 4.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-metrics-available-in-ggir","dir":"Articles","previous_headings":"Sleep analysis","what":"Sleep metrics available in GGIR","title":"10. Sleep Analysis","text":"full overview sleep variables part 4 see: https://cran.r-project.org/web/packages/GGIR/vignettes/GGIR.html#42_Output_part_4 Among assume intuitive: sleep onset wakeup Sleep duration SPT, accumulate sleep time (sustained inactivity bouts classified sleep) WASO, time spent wakefulness sleep onset. However, possible concepts need clarifications:","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-regularity-index-sri","dir":"Articles","previous_headings":"Sleep analysis > Sleep metrics available in GGIR","what":"Sleep Regularity Index (SRI)","title":"10. Sleep Analysis","text":"measure sleep regularity successive days, first described Phillips colleagues. SRI can value -100 100, 100 reflects perfect regularity (identical days), 0 reflects random pattern, -100 reflects perfect reversed regularity. SRI proposed calculated based seven, multitude seven, consecutive days data without missing values. avoid possible role imbalanced data final estimate. However, renders many datasets unsuitable analysis leads painful loss sample size statistical power.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-regularity-index-dealing-with-unbalanced-data","dir":"Articles","previous_headings":"Sleep analysis > Sleep metrics available in GGIR > Sleep Regularity Index (SRI)","what":"Sleep Regularity Index – Dealing with unbalanced data","title":"10. Sleep Analysis","text":"address , implemented SRI GGIR per day-pair. Per day-pair GGIR now stores SRI value fraction 30 second epoch-pairs days valid. fraction can found output variable name SriFractionValid. default, day-pairs excluded fraction 0.66. familiar GGIR threshold coupled 16-hour default value parameter “includenightcrit”. example, set parameter “includenightcrit = 12”, fraction threshold : 12 / 24 = 0.5. Note implemented SRI calculation accounts missing values denominator. result, SRI value interpretation remains unchanged. 30 second epoch setting automatically applied, even rest GGIR process works different epoch duration. day-pair level estimates stored variable SleepRegularityIndex GGIR part 4 .csv-report sleep. , GGIR also stores person-level aggregates : plain average valid days, average valid weekend days, average valid week days. GGIR input arguments needed invoke SRI calculation. calculation automatically performed updating GGIR processing data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-regularity-index-benefits-of-the-revised-approach","dir":"Articles","previous_headings":"Sleep analysis > Sleep metrics available in GGIR > Sleep Regularity Index (SRI)","what":"Sleep Regularity Index – Benefits of the revised approach","title":"10. Sleep Analysis","text":"enables user study day-pair day-pair variation SRI, role day-pair inclusion criteria. access SRI day-pair level makes possible account imbalanced datasets via multilevel regression analysis applied output GGIR, day-pair one model levels.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"nap-detection","dir":"Articles","previous_headings":"Sleep analysis > Sleep metrics available in GGIR > Sleep Regularity Index (SRI)","what":"Nap detection","title":"10. Sleep Analysis","text":"references daytime nap detection GGIR based experimental functionality requires ongoing investigation. functionality matured expand documentation accordingly.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"key-parameters","dir":"Articles","previous_headings":"Sleep analysis","what":"Key parameters","title":"10. Sleep Analysis","text":"parameters part params_sleep category discussed section “Sleep parameters” https://cran.r-project.org/web/packages/GGIR/vignettes/GGIRParameters.html .visual, outliers., criterror. excludefirstlast. def.noc.sleep includenightcrit data_cleaning_file","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"related-output","dir":"Articles","previous_headings":"Sleep analysis","what":"Related output","title":"10. Sleep Analysis","text":"GGIR stores two type output: cleaned full output. cleaned output invalid nights removed, full output nights included. specifically, night excluded ‘cleaned’ results based following criteria: study proposed sleep log individuals, nights excluded sleep log used guider. words: nights cleaningcode equal 0 variable sleep log used equals FALSE). study propose sleep log individuals, nights removed cleaningcode higher 1. aware using full output working wrist accelerometer data, missing entries sleep log asks Time Bed replaced HDCZA estimates SPT. Therefore, extra caution taken working full output. Notice part 4 focused sleep research. chapters discuss analysis done part 5. , choice guider may considered less important, estimate time bed considered useful. , may see night excluded cleaned results part 4 still appears cleaned results part 5.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"construct-definition","dir":"Articles","previous_headings":"MVPA, LIPA, and Inactivity","what":"Construct definition","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"popular approach describe time series data physical activity research distinguish called intensity levels. , community distinguishes sedentary behaviour (SB), light physical activity (LIPA), moderate, vigorous physical activity. latter two categories often combined moderate vigorous physical activity (MVPA). exact definition levels poor caused methodological discrepancies decades: Intensity levels defined based metabolic equality task (MET), based oxygen consumption measured indirect calorimetry divided body weight. MET construct fail normalise body weight comparisons individuals activity types different relation body weight bound drive differences. MET thresholds (e.g. 3 MET) different meaning per person MET value driven people terms movement also fitness anthropometry. Lack consensus handle temporal nature behaviour. example, seconds enough define behaviour require minimum time duration? Criterion methods hard standardise across studies. example, studies differ specific equipment, study protocols, preparation data criterion method.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"classification-with-accelerometer-data","dir":"Articles","previous_headings":"MVPA, LIPA, and Inactivity","what":"Classification with accelerometer data","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"accelerometer data processing perspective time spent intensity levels often simplified time spent , , certain acceleration level(s) chosen make crude separation intensity levels. acceleration magnitude(s) use threshold(s), often referred cut-point literature. Time spent , , cut-point(s) intended crude indicator time spent behaviours sufficient rank individuals amount time spent behaviours. simple threshold approach indisputably powerful method far drive physical activity research. GGIR part 2, MVPA estimate. threshold(s) MVPA used GGIR part 2 set parameter mvpathreshold. can specify single value vector multiple values, time spent MVPA derived . However, threshold parameters influence time spent MVPA, discussed following paragraphs.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"role-of-epoch-length","dir":"Articles","previous_headings":"MVPA, LIPA, and Inactivity","what":"Role of epoch length","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"Although accelerometers collect data much higher sampling frequency, work aggregated values (e.g. 1 5 second epochs) following reasons: Accelerometers often used describe patterns metabolic energy expenditure. Metabolic energy expenditure typically defined per breath per minute (indirect calorimetry), per day (room calorimeter), per multiple days (doubly labelled water method). order evaluate methods reference standards, need work similar time resolution. Collapsing data epoch summary measures helps standardise output across data collected different sampling frequencies studies. little evidence raw data accurate representation body acceleration. scientific evidence validity accelerometer data far based epoch aggregates. Short epoch lengths, 1 5 seconds, sensitive sporadic behaviours often combined bout detection identify MVPA sustained behaviour. Longer epochs, 30 60 seconds, problem therefore easier use without bout detection. epoch length GGIR default 5 seconds, can set first value vector specified parameter windowsizes. Although discuss epoch length context MVPA, please note epoch length influences many outcomes GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"bout-detection","dir":"Articles","previous_headings":"MVPA, LIPA, and Inactivity","what":"Bout detection","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"bout time segment meets specific temporal criteria frequently used physical activity research. GGIR facilitates processing data without accounting bouts. motivation look bouts can one following: idea behaviour certain minimum duration contributes certain physiological benefits. make classification behaviour consistent self-report data, sensitive duration specific duration. aid studying fragmentation behaviour. define bout need answer series question: cut-point ? epoch length ? minimum duration bout ? allow gaps bout breaks behaviour interest? yes 4, percentage bout duration, absolute minimum seconds, combination ? yes 4, bout gaps counted towards time spent bouts? first last epoch need meet threshold criteria? order bouts extracted? example, short MVPA bout part longer Inactivity bout two prevails? many bout categories ? GGIR facilitates following freedom bout detection: User decides : Acceleration thresholds light, moderate, vigorous intensity Fraction time cut-point criteria need met (light, inactive, MVPA) Bout duration range. example, simple scenario consider bouts minimum length 10 minutes, also possible subdivide bouts lasting [1, 5) [5, 10) [10, ∞) minutes. Epoch length. User decide : Maximum bout gap 1 minute, fraction time cut-point criteria need met less 100% First last epoch need meet cut-point criteria. Number intensity levels, always: inactive, light MVPA. Order bouts calculated (1 MVPA; 2 inactive; 3 Light)","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"differences-in-physical-activity-estimates-in-part-2-and-5","dir":"Articles","previous_headings":"MVPA, LIPA, and Inactivity","what":"Differences in physical activity estimates in part 2 and 5","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"parameters needed MVPA estimates GGIR part 2 different parameters used estimating MVPA, LIPA Inactivity part 5. GGIR part 2 always provides six distinct approaches MVPA calculation controlled parameters mvpathreshold, boutcriter, mvpadur, first element vector windowsdur. , MVPA provides time spent MVPA based : 5 second, 1 minute 5 minute epochs bouts 5 second epochs 3 different minimum bout duration specified parameter mvpadur. bout durations used separate estimates used complimentary case part 5. example, specifying boutdur.mod = c(5, 10) part 5 result estimate time spent bouts lasting 5 till 10 minutes bouts lasting 10 minutes longer.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"controlling-the-time-window-of-analysis","dir":"Articles","previous_headings":"","what":"Controlling the time window of analysis:","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"discussed chapter 7, possible tell GGIR part 2 part 5 extract variables per segment day. parameter qwindow can find detailed discussion Annex Day segment analysis.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"behavioural-fragmentation","dir":"Articles","previous_headings":"","what":"Behavioural fragmentation","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"addition classifying time spent behavioural class also informative study fragmentation behaviours.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"classes-of-behaviour-used-to-study-fragmentation","dir":"Articles","previous_headings":"Behavioural fragmentation","what":"Classes of behaviour used to study fragmentation","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"GGIR, fragment daytime defined sequence epochs belong one four categories: Inactivity Light Physical Activity (LIPA) Moderate Vigorous Physical Acitivty (MVPA) Physical activity (can either LIPA MVPA) categories represents combination bouted unbouted time respective categories. Inactivity physical activity add full day (outside SPT), well inactivity, LIPA MVPA. fragmentation metrics applied function g.fragmentation. fragment SPT defined sequence epochs belong one four categories: Estimated sleep Estimated wakefulness Inactivity Physical activity (can either LIPA MVPA) Note metrics fragmentation metrics TP NFrag calculated SPT fragments. parameter frag.metrics = \"\" can tell GGIR part 5 derive behavioural fragmentation metrics daytime (separately) spt. may want consider combining parameter part5_agg2_60seconds=TRUE aggregate time series 1 minute resolution common behavioural fragmentation literature.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"fragmentation-metrics","dir":"Articles","previous_headings":"Behavioural fragmentation","what":"Fragmentation metrics","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"Coefficient Variance (CoV) calculated according Blikman et al. 2014, entails dividing standard deviation mean lognormal transformed fragment length (minutes). Transition probability (TP) Inactivity () Physical activity (IN2PA), Physical activity inactivity (PA2IN), LIPA MVPA calculated according Danilevicz et al. 2023 10.21203/rs.3.rs-3543711/v1. Gini index calculated function Gini ineq R package, ineq argument corr set TRUE. Power law exponent metrics: Alpha, x0.5, W0.5 calculated according Chastin et al. 2010. Number fragment per minutes (NFragPM) calculated identical metric fragmentation index Chastin et al. 2012, renamed specific reflection calculation. term fragmentation index appears generic given fragmentation metrics inform us fragmentation. Please note close metrics transition probability, total number divided total sum duration equals 1 divided average duration. Although exact math slightly different.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"conditions-for-calculation-and-value-when-condition-is-not-met","dir":"Articles","previous_headings":"Behavioural fragmentation > Fragmentation metrics","what":"Conditions for calculation and value when condition is not met","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"Metrics Gini CoV calculated least 10 fragments (e.g. 5 inactive 5 active). condition met metric value set missing. Metrics related power law exponent alpha also calculated least 10 fragments, additional condition standard deviation fragment duration zero. conditions met metric value set missing. metrics related binary fragmentation (mean_dur_PA mean_dur_IN), calculated least 2 fragments (1 inactive, 1 active). condition met value set zero. Metrics related TP calculated : least 1 inactivity fragment (1 LIPA 1 MVPA fragment). condition met TP metric value set zero. keep overview recording days met criteria non-zero standard deviation least ten fragments, GGIR part 5 stores variable Nvaliddays_AL10F person level (.e., number valid days least 10 fragments), SD_dur (.e., standard deviation fragment durations) day level well aggregated per person. GGIR derives fragmentation metrics per waking hours day part 5 per recording part 6. Calculation per day allows us explore possibly account behavioural differences days week. However, rare behaviours day level estimate considered less robust recording level estimates generated part 6.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"differences-with-r-package-actfrag","dir":"Articles","previous_headings":"Behavioural fragmentation > Fragmentation metrics","what":"Differences with R package ActFrag:","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"fragmentation functionality initially inspired great work done Dr. Junrui Di colleagues R package ActFrag, described Junrui Di et al. 2017. However, made couple different decisions may affect comparability: Transition probability according Danilevicz et al. 2023 10.21203/rs.3.rs-3543711/v1 Power law alpha exponent metrics calculated according Chastin et al. 2010 using theoretical minimum fragment duration instead observed minimum fragment duration.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"key-arguments","dir":"Articles","previous_headings":"Behavioural fragmentation","what":"Key arguments","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"parameters related cut-points bout detection concentrated “Physical activity parameters” discussed https://cran.r-project.org/ package=GGIR/vignettes/GGIRParameters.html.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"related-output","dir":"Articles","previous_headings":"Behavioural fragmentation","what":"Related output","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"GGIR part 2 csv reports find: Time spent MVPA GGIR part 5 csv reports find: Time spent MVPA Time spent LIPA Time spent inactivity (abbreviated ) chapter 7 discussed structure part 2 output chapter 11 provide detailed discuss part 5 output. , detailed discussion specific output variables parts see https://cran.r-project.org/web/packages/GGIR/vignettes/GGIR.html#4_Inspecting_the_results","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"creating-a-multi-variate-time-series-object","dir":"Articles","previous_headings":"","what":"Creating a multi-variate time series object","title":"12. Time-use Analysis","text":"first step need map happens recording. , GGIR code combines information derived parts 2, 3 4 multi-variate single time series object, including: Timestamp log data classified invalid. Average acceleration derived GGIR part 2, invalid epochs imputed acceleration metric used specified parameter acc.metric. Sleep classifications GGIR part 3 4. Behavioural class code, GGIR part 5 derives behavioural classes based magnitude acceleration sleep classification. exact number behavioural classes codified depends parameters set, constructed codified : sleep period time window: - Sleep - Wakefulness low acceleration - Wakefulness moderate acceleration - Wakefulness vigorous acceleration waking hours day: - Inactivity unbouted - Inactivity bouted, subdivided one multiple bout durations - Total inactivity time - LIPA unbouted - LIPA bouted, subdivided one multiple bout durations - Total LIPA time - Moderate activity unbouted - Vigorous activity unbouted - MVPA bouted, subdivided one multiple bout durations - Total MVPA time possible export time series generated, discussed towards end chapter.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"defining-the-time-windows","dir":"Articles","previous_headings":"","what":"Defining the time windows","title":"12. Time-use Analysis","text":"GGIR part 2 defined days midnight midnight, GGIR part 4 typically defined nights noon noon. access sleep timing, GGIR part 5 offers additional definitions day. However, given definitions day becoming different calendar day, refer windows data. GGIR part 5 facilitates following time window definitions, can selected parameter timewindow: “WW” “OO”, onset waking times guided estimates part 4, missing, part 5 attempt retrieve estimate guider method. Note parameter timewindow can consist one options beforementioned combination , example, default value timewindow = c(\"MM\", \"WW\").","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"defining-segments-within-the-mm-window","dir":"Articles","previous_headings":"Defining the time windows","what":"Defining segments within the MM window","title":"12. Time-use Analysis","text":"default GGIR segments window waking hours day (referred day) sleep period time window (referred spt). Additionally, timewindow set “MM”, day segment specific analysis performed based segments defined parameters qwindow . Please see annex day segmentation information.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"metrics-calculated-per-window-and-per-segment","dir":"Articles","previous_headings":"","what":"Metrics calculated per window and per segment","title":"12. Time-use Analysis","text":"GGIR provides following metrics time windows calculated, .e., full day, awake time, sleep period time, well (optionally) day segments might provided via parameter qwindow. Duration: Time spent minute per behavioural class. Acceleration: Average acceleration per behavioural class Number blocks: Number blocks per behavioural class, distinction made bouted unbouted, except total number blocks per intensity levels (Nblocks_day_total_IN, Nblocks_day_total_LIPA, Nblocks_day_total_MOD, Nblocks_day_total_VIG). Number bouts: Number bouts per behavioural class. Fragmentation: fragmentation metrics discussed previous chapter. distinction made bouted unbouted behavour. Note fragmentation classes sometimes group multiple intensity levels, e.g. fragmentation physical activity reflects fragmentation LIPA MVPA combined relative Inactive time.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"complementary-variables","dir":"Articles","previous_headings":"Metrics calculated per window and per segment","what":"Complementary variables","title":"12. Time-use Analysis","text":"primary interest sleep research recommend work GGIR part 4 reports. However, want look interactions behaviour sleep, GGIR part 5 reports include sleep estimates used part 5 analysis. Note part 5 criteria sleep estimate inclusion different part 4. part 5 happy estimate, even accelerometer worn night. Additionally, part 5 also come duration awake time, sleep period time, full-day windows, percentage non-wear (read invalid data, typically non-wear).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"seemingly-overlapping-variables-between-ggir-part-2-and-part-5-output","dir":"Articles","previous_headings":"Metrics calculated per window and per segment","what":"Seemingly overlapping variables between GGIR part 2 and part 5 output","title":"12. Time-use Analysis","text":"might noticed, variables reported GGIR part 2 part 5, average acceleration bouts moderate--vigorous physical activity. However, please note values necessarily identical following reasons: Times MVPA can happen . part 2 MVPA can happen time day, never overlap midnight. part 5 MVPA happens waking hours single day, can overlap midnight midnight part sleep period time window. use dayborder parameter value equal zero: midnight scenario actually midnight time set parameter dayborder, e.g. 2 equates 2am. . Difference epoch length. GGIR part 5 comes possibility aggregate epochs 60 seconds parameter part5_agg2_60seconds. parameter set TRUE, full time series aggregated 60 seconds, contrast default 5 second epoch length used part 2. Different time window definition. GGIR part 2 always uses “MM” definition days. GGIR part 5, option define days different ways (see ).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"exporting-time-series","dir":"Articles","previous_headings":"Metrics calculated per window and per segment","what":"Exporting time series","title":"12. Time-use Analysis","text":"export time series set parameter save_ms5rawlevels = TRUE. GGIR part 5 store subfolder meta/ms5.outraw subfolder named unique MVPA threshold combination used. behavioral classes included numbers, legend classes numbers stored separate legend file meta/ms5.outraw folder named “behavioralcodes2020-04-26.csv” date correspond date ran GGIR. Note time series exported GGIR part 5 includes acceleration metric specified parameter acc.metric (default = “ENMO”), angle metrics selected, angle metrics. want explore multiple acceleration metric values, please see documentation parameter epochvalues2csv discussed chapter 3. Additional input parameters may interest: save_ms5raw_format character string specify data stored: either “csv” (default) “RData”. used save_ms5rawlevels=TRUE. save_ms5raw_without_invalid Boolean indicate whether remove invalid days time series output files. used save_ms5rawlevels=TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"key-arguments","dir":"Articles","previous_headings":"","what":"Key arguments","title":"12. Time-use Analysis","text":"threshold.lig, threshold.mod, threshold.vig boudur., boutdur.lig, boutdur.mvpa boutcriter., boutcriter.lig, boutcriter.mvpa frag.metrics timewindow part5_agg2_60seconds save_ms5rawlevels save_ms5raw_format save_ms5raw_without_invalid","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"related-output","dir":"Articles","previous_headings":"","what":"Related output","title":"12. Time-use Analysis","text":"https://cran.r-project.org/web/packages/GGIR/vignettes/GGIR.html#43_Output_part_5 find detailed discussion part 5 output. summary, part 5 produces following files. - Day level summary - Person level summary - Day level summary behaviour per segment day - analysis - Person level summary behaviour per segment day - Variable dictionary (see ) - Time series - Pdf reports vsiualisation","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"variables-dictionary","dir":"Articles","previous_headings":"Related output","what":"Variables dictionary","title":"12. Time-use Analysis","text":"Considering different time window segmentation options, number metrics calculated, different aggregation strategies (.e., plain averages, weighted averages, -optionally- weekday weekend-day averages), number variables exported Part 5 can high. help understanding interpretation variables, GGIR Part5 exports variable dictionary daysummary personsummary csv reports. dictionaries include list variable names calculated analyses together definition variables.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter13_CircadianRhythm.html","id":"mxlx","dir":"Articles","previous_headings":"","what":"MXLX","title":"13. Circadian Rhythm Analysis","text":"Detection continuous least (LX) (MX) active X hours day, X defined argument winhr. GGIR calculates average acceleration, start time, argument iglevels specified also intensity gradient. argument winhr vector descriptive values LX MX derived per value winhr. Within GGIR part 2 MXLX calculated per calendar day , argument qwindow specified, per segment day. Within GGIR part 5 MXLX calculated per window, used combination GENEActiv Axivity accelerometer brand LUX estimates per LX MX included. MX metric described confused MX metrics proposed Rowlands et al. looks accumulated active time may always continuous time. MX metrics Rowlands et al. discussed .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter13_CircadianRhythm.html","id":"cosinor-analysis-and-extended-cosinor-analysis","dir":"Articles","previous_headings":"","what":"Cosinor analysis and Extended Cosinor analysis","title":"13. Circadian Rhythm Analysis","text":"Disclaimer: functionality currently (2024) revised. enhancements incorporated GGIR release section also updated. (Extended) Cosinor analysis quantifies circadian 24 hour cycle. Cosinor analysis refers fiting cosine function time series, extended cosinor analysis refers fitting cosine function transformed time series afrer Marler et al. Statist. Med. 2006 (doi: 10.1002/sim.2466). GGIR uses R package ActCR dependency. Specify argument cosinor = TRUE perform analysis. GGIR performs cosinor analysis part 2 6. implementation within GGIR part 2 follows: Acceleration values averaged per minute, log transformation log(acceleration converted _mg_ + 1). Invalid data points caused non-wear set missing (NA) order prevent imputation approach used elsewhere GGIR influence Cosinor analysis. imputation technique generally come assumptions circadian rhythm. GGIR looks first valid data point recording selects maximum integer number recording days following data point feeds ActCosinor ActExtendCosinor functions ActCR. time offset start following midnight used reverse offset ActCR results, ensure acrophase acrotime can interpreted relative midnight. relation Day Saving Time: Duplicated time stamps clock moves backward ignored missing time stamps clock moves forward inserted missing values. Time series corresponding fitted models stored inside part 2 milestone data facilitate visual inspection. moment used GGIR visualisation, may want look try plot . implementation within GGIR part 6 follows: - time series used interval defined parameter part6Window. - Make sure set save_ms5raw_without_invalid = FALSE, revision also handle setting TRUE moment TRUE introduces errors.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter13_CircadianRhythm.html","id":"intradaily-variability-iv-and-interdaily-stability-is","dir":"Articles","previous_headings":"","what":"Intradaily Variability (IV) and Interdaily Stability (IS)","title":"13. Circadian Rhythm Analysis","text":"Disclaimer: functionality currently (2024) revised. enhancements incorporated GGIR release section also updated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter13_CircadianRhythm.html","id":"iv-and-is---default","dir":"Articles","previous_headings":"Intradaily Variability (IV) and Interdaily Stability (IS)","what":"IV and IS - Default","title":"13. Circadian Rhythm Analysis","text":"original implementation (argument IVIS.activity.metric = 1) uses continuous numeric acceleration values. However, later realised, compatible original approach van Someren colleagues, uses binary distinction active inactive. Therefore, second option added (argument IVIS.activity.metric = 2), needs used combination accelerometer metric ENMO, collapses acceleration values binary score rest versus active. current default.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter13_CircadianRhythm.html","id":"iv-and-is---cosinor-analysis-compatible","dir":"Articles","previous_headings":"Intradaily Variability (IV) and Interdaily Stability (IS)","what":"IV and IS - Cosinor analysis compatible","title":"13. Circadian Rhythm Analysis","text":"sometimes used measure behavioural robustness conducting Cosinor analysis. However, work combination two outcomes seems important calculated time series. Therefore, cosinor = TRUE IV calculated twice: part default IV analysis discussed , part Cosinor analysis using log transformed time series. specifically, IV algorithm applied IVIS.activity.metric = 2 threshold IVIS_acc_threshold = log(20 + 1) make binary distinction active inactive, IVIS_per_daypair = TRUE. setting IVIS_per_daypair specifically designed context handle potentially missing values time series used Cosinor analysis. Applying default IVIS algorithm able handle missing values result loss information non-matching epochs across entire recording excluded. Instead, IV calculated follows: Per day pair based matching valid epochs IV calculated. , log kept number valid epochs per day pair. Omit day pairs fraction valid epoch pairs 0.66 (0.66 hard-coded moment). Calculate average across days weighted fraction valid epochs per day pairs. new Cosinor-compatible IV estimates stored output variables cosinorIV cosinorIS.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"a-brief-overview","dir":"Articles","previous_headings":"","what":"A brief overview","title":"1. What is GGIR","text":"GGIR R-package primarily designed process multi-day raw accelerometer data physical activity, sleep, circadian rhythm research. term raw refers data expressed gravitational units (1 g equal gravitational acceleration, average 9.81 m/s2) opposed previous generation accelerometers stored data accelerometer brand-specific units epoch level, typically 5, 30, 60 seconds length. Despite focus raw data, GGIR also offers functionality process previous-generation accelerometer data. signal processing raw data includes many steps explained pages. example, automatic calibration gravity, detection abnormally high values, imputation raw-level time gaps (specific sensor brands), calculation orientation angle average magnitude acceleration based variety metrics. Next, signal processing raw previous-generation data continue detection non-wear epoch-level imputation. Finally, GGIR uses information describe data data quality data summary metrics interpreted estimates physical activity, inactivity, sleep, circadian rhythm. time resolutions GGIR output : Per recording, typically matches one participant ID. Calendar day option specify day border timing midnight default. Night period time participant likely main daily sleep period, initial focus time window defined noon noon next day, unless person wakes noon next day, case focus shifts 6pm 6pm next day. Day segment, can defined via code indicate timing segments within day standardised recordings days dataset via diary file, segment definition allowed vary per recording day. Window defined Waking-main sleep period Waking-next main sleep period. Window defined Sleep onset start main sleep period sleep onset start next main sleep period. Epoch-level time series, epoch length set user example 5 seconds. (Optionally, default) Per sequence recordings matching participant IDs. example, person tracked first one accelerometer accelerometer replaced different accelerometers. details use , see documentation GGIR parameter maxRecordingInterval documentation use GGIR parameters explained .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"key-strengths","dir":"Articles","previous_headings":"","what":"Key strengths","title":"1. What is GGIR","text":"GGIR permissive open-source software license maximise re-use collaboration. GGIR applicable data multiple sensor brands file formats. GGIR facilitates sleep, physical activity, circadian rhythm research. GGIR extensive quantitative output designed use quantitative research. GGIR designed computationally efficient option store re-use intermediate milestone data option process multiple files parallel computer discussed Chapter 2. GGIR designed accessible new users without experience R programming. GGIR requires one function call comes elaborate open-access documentation. Additionally, paid training courses offered maximise opportunity users learn GGIR us learn users. GGIR dozen code contributors. GGIR available CRAN archive, meaning meets CRAN standards release gone series automated checks. public email list (google group) users reach maintainers. hundreds publications used GGIR, powerful way identify problems improve code provided us wide range reference values.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"history","dir":"Articles","previous_headings":"","what":"History","title":"1. What is GGIR","text":"elaborate reflection GGIR’s first 10 years existence can found blog post. short, GGIR evolved series R scripts used research around 2010-2012 first release 2013. key factor growth GGIR adoption research community willingness variety researchers invest GGIR either terms time investment financially. GGIR without efforts.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"flexible-and-accessible","dir":"Articles","previous_headings":"Philosophy behind GGIR","what":"Flexible and accessible","title":"1. What is GGIR","text":"research field highly heterogeneous : choice sensor brand, data format, study protocols used, research questions tries answer. time many within field lack time skills write custom data processing software. GGIR aims flexible handle different scenarios time remain accessible lack time skills write software. , hope GGIR use without financial resources commercial software, although like stress charity depend paid unpaid contributions community.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"algorithm-design","dir":"Articles","previous_headings":"Philosophy behind GGIR","what":"Algorithm design","title":"1. What is GGIR","text":"philosophy behind algorithms implemented GGIR biomechanical explainable (heuristic knowledge driven) approaches measurement science preferable purely data-driven approaches. knowledge driven approach unrealistic can consider data-driven approach. idea knowledge driven approach order advance insight field research, essential understanding causal relation phenomena observed (e.g. acceleration one body part), way (acceleration) sensor works, data produced, interpret data. example, know body acceleration relates energy expenditure physics human physiology. abundance scientific publications reported positive correlation accelerometer data energy expenditure served confirm existing knowledge correct. contrast, data-driven methods focus optimal correlation sensor data reference labels values, much less concerned causal associations focus knowledge driven approaches, defined . Identical correlation necessarily equal causation health research, process measurement can also confounded. examples: may see differences body acceleration patterns correlate different activity types different levels energy expenditure, mean actually measure activity types energy expenditure levels. Ignoring aspects can easily lead overestimating value accelerometer measuring constructs (activity type, etc) underestimate value accelerometer capturing acceleration useful measure behaviour, appropriately used interpreted. second problem data-driven methods heavily depend availability reliable criterion methods. argue reliable criterion methods exist physical behaviour measurement: Indirect calorimetry indicators energy metabolism can derived unable account activity type specific role body weight energy metabolism. makes impossible make standardised comparison energy cost different activity types across individuals differ body weight. See also reflections blog post. Polysomnography (PSG) standard sleep research. PSG offers physiological definition sleep impossible capture movement sensor. Therefore, forced simplify definition ‘sleep’ towards definition can captured movement sensor. result, act evaluating accelerometer ability classify sleep PSG becomes somewhat meaningless already know measuring construct PSG. Activity types ambiguous define given high number ways can performed. introduces fundamental level uncertainty robustness models outside datasets context developed . result, essential put strong emphasis algorithms descriptive value regardless whether offer high correlation supposed criterion methods.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"permissive-open-source-license","dir":"Articles","previous_headings":"Philosophy behind GGIR","what":"Permissive open-source license","title":"1. What is GGIR","text":"may sound obvious research software open-source, fields physical activity sleep research, far accepted approach. GGIR one research tools field permissive license aimed maximise potential re-use collaboration.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"documentation-structure-and-origin","dir":"Articles","previous_headings":"","what":"Documentation structure and origin","title":"1. What is GGIR","text":"structured chapters line GGIR training course organising recent years. documentation existed collection ad-hoc written paragraphs, lacked clear overarching structure narrative. result, difficult use documentation training course. , also wanted provide good level documentation follow course want refresh understanding GGIR. documentation mainly written narrative style tried explain theory practice GGIR functionalities. mentioned , GGIR offers vast amount functionality. arrive expectation find quick instruction run use GGIR research disappoint . Learning use GGIR requires time investment. Everything need type R script highlighted like . documentation intended academic review: cite publications clarify origin algorithms discuss part GGIR. Finally, first version documentation sponsored Accelting commitment remain available free open-access documentation. However, things like much easier maintain community: grateful help improve documentation either giving feedback, pull requests (know ), financially.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"the-ggir-function","dir":"Articles","previous_headings":"","what":"The GGIR function","title":"2. The GGIR pipeline","text":"brief introduction unfamiliar R software, R packages constructed sub-components, named functions. single function typically allows specific task. example, may sum function sums numbers provide . function can one multiple parameters control functions behaviour. R parameters call function arguments. example, sum argument na.rm control needs done missing values. GGIR refer arguments parameters. GGIR comes large number functions parameters together form processing pipeline. ease interacting GGIR, one central function act interface functionality. function also named GGIR. need learn work function GGIR, important understand background function interacts functions GGIR. , important understand GGIR package structured two complementary ways: Parts: Reflecting computational components running GGIR. GGIR 6 parts numbered 1 6 reflect order executed. reason GGIR split parts avoids re-run preceding parts want make small change downstream parts. parts together form pipeline. Parameter themes: Reflecting themes around user can control GGIR, e.g. controlling sleep detected controlling output stored stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"parts-of-the-pipeline","dir":"Articles","previous_headings":"The GGIR function","what":"Parts of the pipeline","title":"2. The GGIR pipeline","text":"GGIR, computational structure six parts applied sequentially data: Part 1: Loads data, works data quality, stores derived summary measures per time interval, also known signal features metrics, needed following parts. Part 2: Basic data quality assessment based extract metrics description data per day, per file, optionally per day segment. Part 3: Estimation rest periods, needed input Part 4. Part 4: Labels rest periods derived Part 3 sleep per night per file. Part 5: Compiles time series classification sleep physical behaviour categories re-using information derived part 2, 3, 4. includes detection behavioural bouts, time segments behaviour sustained duration specified user. Next, Part 5 generates descriptive summary time spent average acceleration per behavioural category, also behavioural fragmentation. Part 6: Facilitates analyses span full recording household co-analysis circadian rhythm analysis. specific order content parts evolved time, Part 1 2 created 2011-2013, Part 3 4 created 2013-2015, Part 5 created 2017-2020, Part 6 created 2023-2024. , parts also reflect historical expansion GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"milestone-data","dir":"Articles","previous_headings":"The GGIR function > Parts of the pipeline","what":"Milestone data","title":"2. The GGIR pipeline","text":"part, run, stores output R-data file .RData extension, refer milestone data. user, unlikely ever need interact directly milestone data files relevant output stored csv pdf files output folder results. milestone files read next GGIR part. advantage design offers internal modularity. example, can run part 1 now continue part 2 another time without repeat part 1 . , design eases re-processing also helpful us developing testing GGIR code. milestone files stored sub-folders output folder show . Note output folder named output_mystudy example exact name may differ . Part 1 milestone data stored output_mystudy/meta/basic. Part 2 milestone data stored output_mystudy/meta/ms2.. Part 3 milestone data stored output_mystudy/meta/ms3.. Part 4 milestone data stored output_mystudy/meta/ms4.. Part 5 milestone data stored output_mystudy/meta/ms5.. Part 6 milestone data stored output_mystudy/meta/ms6.. milestone files potentially useful following reasons: copying milestone files new computer, may continue analyses without access original data files. can example helpful process subsets study different computers, pooling resulting milestone data allows finalise analysis single computer. Remember preserve folder structure. run problem, milestone files may allow share problem reproducible example problem without share original large data file.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"parameter-themes","dir":"Articles","previous_headings":"The GGIR function","what":"Parameter themes","title":"2. The GGIR pipeline","text":"parameters GGIR package functions can used parameter GGIR function. parameters internally grouped thematically, independently six parts used : params_rawdata: parameters related handling raw data resampling calibrating. params_metrics: parameters related aggregating raw data epoch level summary measures (metrics). params_sleep: parameters related sleep detection. params_phyact: parameters related physical ()activity. params_247: parameters related 24/7 behaviours fall typical sleep physical ()activity research category measures circadian rhythm 24 hour data description techniques. params_output: parameters relating whether output stored. params_general: general parameters covered categories GGIR user need remember theme parameter belongs . However, may notice documentation structure parameter theme ease navigating parameters. couple ways inspect parameters parameter category default values:","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"ggir-function-documentation","dir":"Articles","previous_headings":"The GGIR function > Parameter themes","what":"GGIR function documentation:","title":"2. The GGIR pipeline","text":"","code":"?GGIR"},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"parameters-vignette","dir":"Articles","previous_headings":"The GGIR function > Parameter themes","what":"Parameters vignette:","title":"2. The GGIR pipeline","text":"Documentation meaning parameter, default value, expected value(s) can found vignette: GGIR configuration parameters.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"from-r-command-line","dir":"Articles","previous_headings":"The GGIR function > Parameter themes","what":"From R command line:","title":"2. The GGIR pipeline","text":"interested one specific category like sleep: interested e.g. parameter HASIB.algo sleep_params object: parameters accepted parameter function GGIR, GGIR like shell around GGIR functionality. However, params_ objects provided input GGIR.","code":"library(GGIR) print(load_params()) library(GGIR) print(load_params()$params_sleep) library(GGIR) print(load_params()$params_sleep[[\"HASIB.algo\"]])"},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"configuration-file-","dir":"Articles","previous_headings":"The GGIR function > Parameter themes","what":"Configuration file.","title":"2. The GGIR pipeline","text":"GGIR stores parameter values csv-file named config.csv. file stored run GGIR root output folder, overwriting existing config.csv file. , like add annotations file, e.g. fourth column, need store somewhere outside output folder specify path file parameter configfile. Note parameters datadir outputdirdiscussed always need specified directly part configfile. practical value eases replication analysis, instead share R script colleagues, sharing config.csv file sufficient. Please make sure GGIR R version installed using reproducibility. See guidance install older package versions.","code":"library(GGIR) GGIR(datadir = \"C:/mystudy/mydata\", outputdir = \"D:/myresults\", configfile = \"D:/myconfigfiles/config.csv\")"},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"parameter-extraction-order","dir":"Articles","previous_headings":"The GGIR function > Parameter themes","what":"Parameter extraction order","title":"2. The GGIR pipeline","text":"parameters provided GGIR call, GGIR always uses . parameters provided GGIR call, GGIR checks whether config.csv file either output folder specified via parameter configfile loads values. parameter neither specified GGIR function call available config.csv file, GGIR use default value’s can inspected discussed section . , important realise consequence logic GGIR revert default parameter values repeated run GGIR unless remove parameter function call delete config.csv file specify original (default) value parameter explicitly GGIR call. ensure clear example: GGIR used first time without specifying parameter mvpathreshold, use default value, 100. specify mvpathreshold = 120, GGIR use instead store config.csv file. run GGIR time delete mvpathreshold = 120 GGIR call, GGIR fall back value 120 now stored config.csv file. delete config.csv file run GGIR , value 100 used .","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"raw-data","dir":"Articles","previous_headings":"Input files","what":"Raw data","title":"2. The GGIR pipeline","text":"GGIR currently works following accelerometer brands formats: GENEActiv .bin Axivity AX3 AX6 .cwa ActiGraph .csv .gt3x (.gt3x newer format generated firmware versions 2.5.0. Serial numbers start “NEO” “MRA” firmware version 2.5.0 earlier use older format .gt3x file). want work .csv exports via commercial ActiLife software, note option export data timestamps, turned . cope absence timestamps GGIR calculate timestamps sample frequency, start time, start date presented file header. Movisens data stored folders. accelerometer brand generates csv output, see documentation functions read.myacc.csv parameter rmc.noise vignette Reading csv files raw data GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"externally-derived-epoch-level-data","dir":"Articles","previous_headings":"Input files","what":"Externally derived epoch-level data","title":"2. The GGIR pipeline","text":"default GGIR assumes data raw discussed chapter 1. However, studies raw data available epoch level aggregate. example, done external software done inside accelerometer device. Although can introduce severe limitations transparency flexibility analysis, GGIR makes attempt facilitate analysis externally performed aggregations raw data. Please find overview file format currently facilitated: Note: Actiwatch ActiGraph, physical activity description sleep classification needs tailored count-specific algorithms: .neishabouricounts = TRUE, acc.metric = \"NeishabouriCount_x\", HASPT.algo = \"NotWorn\" HASIB.algo = \"NotWorn\"; Note 2: UK Biobank csv epoch data, GGIR facilitate sleep analysis arm angle exported. See GGIR CookBook example recipes working external data. process files, GGIR loads content saves GGIR part 1 milestone data, essentially fooling rest GGIR think GGIR part 1 created based raw data input. discussed chapter 3, GGIR non-wear detection two steps: first step done part 1 second step done part 2. relation externally derived epoch data non-wear detected looking consecutive zeros one hour (Actiwatch, ActiGraph) derived file (UK Biobank csv). accelerometer data need analysed stored one folder subfolders folder. Make sure folder contain files accelerometer data. Choose appropriate name folder, preferable reference study project related rather just ‘data’, name folder used identifier dataset integrated name output folder GGIR creates.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"how-to-run-your-analysis","dir":"Articles","previous_headings":"","what":"How to run your analysis?","title":"2. The GGIR pipeline","text":"bare minimum input needed GGIR : Parameter datadir allows specify stored accelerometer data outputdir allows specify like output analyses stored. equal datadir. copy paste code new R script (file ending .R) Source R(Studio), dataset processed output stored specified output directory. GGIR refers file directories folders. unfamiliar term directory: folder. Next, can add parameter mode tell GGIR part(s) run, e.g. mode = 1:5 tells GGIR run five parts default. parameter overwrite, can tell GGIR whether overwrite previously produced milestone data . , parameter idloc tells GGIR find participant ID. default setting likely work data formats, important tailor value parameter study setting. example, files start participant ID followed underscore set idloc=2. See documentation parameter idloc examples. GGIR stores output csv files comma default column separator dot default decimal separator standard UK/US. However, computer configured different region world can modified parameters sep_reports dec_reports, respectively.","code":"library(GGIR) GGIR(datadir = \"C:/mystudy/mydata\", outputdir = \"D:/myresults\")"},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"from-the-r-console-on-your-own-desktoplaptop","dir":"Articles","previous_headings":"How to run your analysis?","what":"From the R console on your own desktop/laptop","title":"2. The GGIR pipeline","text":"Create R-script put library(GGIR) next line GGIR call GGIR(datadir=\"yourdatapath\", outputdir=\"yourdatapath\"). Next, can source R-script source button RStudio: source(\"pathtoscript/myshellscript.R\") GGIR default supports multi-thread processing used process one input file per process, speeding processing data. can turned setting parameter .parallel = FALSE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"in-a-cluster","dir":"Articles","previous_headings":"How to run your analysis?","what":"In a cluster","title":"2. The GGIR pipeline","text":"processing data GGIR desktop/laptop fast enough, advise using GGIR computing cluster. way Sun Grid Engine cluster shown . Please note commands specific computing cluster working . Please consult local cluster specialist explore run GGIR cluster. , share . three files SGE setting: submit.sh run-mainscript.sh myshellscript.R need update ... last line parameters used GGIR. Note f0=f0,f1=f1 essential work. values f0 f1 passed bash script. setup, need call bash submit.sh command line. help computing clusters, GGIR successfully run world’s largest accelerometer datasets UK Biobank German NAKO study.","code":"for i in {1..707}; do n=1 s=$(($(($n * $[$i-1]))+1)) e=$(($i * $n)) qsub /home/nvhv/WORKING_DATA/bashscripts/run-mainscript.sh $s $e done #! /bin/bash #$ -cwd -V #$ -l h_vmem=12G /usr/bin/R --vanilla --args f0=$1 f1=$2 < /home/nvhv/WORKING_DATA/test/myshellscript.R options(echo=TRUE) args = commandArgs(TRUE) if(length(args) > 0) { for (i in 1:length(args)) { eval(parse(text = args[[i]])) } } GGIR(f0=f0,f1=f1,...)"},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"processing-time","dir":"Articles","previous_headings":"","what":"Processing time","title":"2. The GGIR pipeline","text":"time process typical seven-day recording anywhere 3 10 minutes depending sample frequency recording, sensor brand, data format, exact configuration GGIR, specifications computer. observing processing times 20 minutes longer seven-day recording probably slowed factors. tips may able address : Make sure data process machine GGIR run. Processing data located somewhere else computer network can substantially slow software. Make sure machine 8GB RAM memory. Using GGIR old machines 4GB known slow. However, total memory bottle neck. Also consider number processes (threads) CPU can run relative amount memory. Ending 2GB per process seems good target. can helpful turn parallel processing .parallel = FALSE. Avoid computational activities machine running GGIR. example, use DropBox OneDrive make sure sync running GGIR. probably best use machine using GGIR process large datasets. Make sure machine configured automatically turn X hours terminate GGIR. , may want configure machine fall asleep pauses GGIR. Lower value parameter maxNcores default uses number available cores derived command parallel::detectCores() minus 1. might cases demanding operating system. Reduce amount data GGIR loads memory parameter chunksize, can useful machines limited memory processing many files parallel. chunksize value 0.2 make GGIR load data chunks 20% size relative chunks loads default, approximately 12 hours data auto-calibration routine 24 hours data calculation signal metrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"ggir-output","dir":"Articles","previous_headings":"","what":"GGIR output","title":"2. The GGIR pipeline","text":"GGIR always creates output folder location specified parameter outputdir. output folder name constructed output_ followed name dataset derived distal folder name data directory specified datadir. recommend approach ensures output folder data directory matching names. way less likely confusion data folder output relates . However, possible use datadir specify vector paths individual files, may helpful want process set files position move new folder. scenario, need set parameter studyname tell GGIR dataset name . Inside output folder GGIR create two subfolders: meta results discussed earlier chapter. Inside results find folder named QC (Quality Checks). name QC (Quality Checks) possibly somewhat confusing. Data quality checks best started files stored results folder, files QC subfolder offer complementary information help quality check. GGIR generates reports parts 2, 4, 5, 6 pipeline. parameter .report can specify parts want reports generated. example, .report = c(2, 5) generate report parts 2 5. full GGIR analysis expect least following output files: Output files results subfolder: detailed discussion output can found chapters. Output files results/QC subfolder: detailed discussion output can found chapters. Output files meta/ms5.outraw subfolder: detailed discussion output can found chapters.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"time-gaps-identification-and-imputation","dir":"Articles","previous_headings":"","what":"Time gaps identification and imputation","title":"3. Data Quality Assurance","text":"Accelerometer data stored binary format (e.g. .bin .cwa) typically structured data blocks. data block header top constant number data points often represent seconds data. Axivity accelerometer data stored ‘.cwa’ file format blocks can, rare occasions, corrupted unreadable, therefore creating gap information recorded. ActiGraph accelerometer, also sensor brands export data ‘csv’ file format, possible recording stops certain time starts recording time, therefore creating time gap. GGIR developed efficiently identify manage time gaps.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"time-gaps-in-axivity-cwa-files","dir":"Articles","previous_headings":"Time gaps identification and imputation","what":"Time gaps in Axivity cwa files","title":"3. Data Quality Assurance","text":"Although expected occur often, Axivity cwa data can come faulty data blocks. ‘faulty’ mean data block interpretable. example, faulty blocks may occur device recording mode connected computer USB cable. address , R package GGIRread, used GGIR read cwa files, identifies faulty blocks imputes last recorded non-faulty acceleration value normalised 1 g (g unit gravitational acceleration). sampling rate accelerometer refers number data points recorded stored per second. Axivity devices expected design slightly variable sampling rate time, accounted interpolating data loaded R. example, data may collected 99.7 Hertz one block, interpolation technique interpolate data 100 Hertz. interpolation happens inside R package GGIRread. exact technique used interpolation set parameter interpolationType uses linear interpolation default (interpolationType = 1), can also set nearest neighbour interpolation (interpolationType = 2). quality assurance, GGIRread keeps track variation sampling rate per data block automatically imputes blocks (smallest segment data cwa file, typically seconds long) sampling rate deviates 10% expected sampling rate. imputation technique time gaps detailed earlier section. unhappy 10% threshold possibility changing percentage parameter frequency_tol. Biased sampling rates kind expected extremely rare expected affect normal research conditions, nonetheless like able account . Additionally, monitor process handling faulty blocks outliers sampling rate, GGIRread logs series file health statistics stored GGIR ‘data_quality_report.csv’ file located within ‘QC’ folder output directory ‘results’ (see previous chapter discussion GGIR output). data quality report, comes variable names prefixed ‘filehealth’, detailing number duration time gaps detected recording(s), well number epochs 5-10% 10% bias sampling rate.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"time-gaps-in-actigraph-gt3x-and-ad-hoc-csv-files","dir":"Articles","previous_headings":"Time gaps identification and imputation","what":"Time gaps in ActiGraph gt3x and ad-hoc csv files","title":"3. Data Quality Assurance","text":"manufacturers incorporate functionalities devices let stop recording long episode movement, aiming conserve battery life reduce data size. However, feature results recorded signals containing intermittent time gaps must accounted data processing. example, ActiGraph option called ‘idle sleep mode’ devices, pauses data collection movement detected sustained period time. ActiGraph’s idle sleep mode explained manufacturer’s website. time gaps data considered non-wear time GGIR. GGIR imputes gaps shorter 90 minutes raw data level, using last recorded value (meaning gap) normalised 1 g. approach assumes accelerometer kept orientation last observed. contrary, gaps longer 90 minutes imputed epoch level make data processing memory efficient faster. epoch level imputation discussed chapter 6. number duration time gaps found logged GGIR ‘data_quality_report.csv’ file located within ‘QC’ folder output directory ‘results’ (see previous chapter discussion GGIR output). Studies often forget clarify whether accelerometers configured pause data collection periods movement , , resulting time gaps accounted data processing. Especially, device firmware manufacturer software already imputes time gaps can cause significant bias GGIR estimates. generally speaking, advise : Report whether ‘idle sleep mode’ similar functionalities used. Disable functionality, possible, harms transparency reproducibility research. Indeed, mechanism exists replicate time gaps accelerometer brands, likely challenge accurate assessment sleep sedentary behaviour. data collected ‘idle sleep mode’ similar functionalities referred raw data accelerometry, data collection process involved proprietary pre-processing steps violate core principle raw data collection.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"specific-note-on-actigraph-idle-sleep-mode","dir":"Articles","previous_headings":"Time gaps identification and imputation","what":"Specific note on ActiGraph idle sleep mode","title":"3. Data Quality Assurance","text":"ActiGraph files might exported gt3x csv formats. idle sleep mode used, data files different. gt3x files, time gaps can found signal, imputation made ActiLife software. However, csv files exported ActiLife imputed values three axes periods movement. Note imputation ActiLife software changed point time. Initially imputation zeros recent versions ActiLife imputation uses last recorded value axis. Therefore, need aware GGIR take care time gap imputation relative idle sleep mode using gt3x files, using ActiGraph csv files (latter come time gaps already imputed).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"accelerometer-sensor-calibration","dir":"Articles","previous_headings":"","what":"Accelerometer sensor calibration","title":"3. Data Quality Assurance","text":"Many measurement tools require calibration ranging weighting scales Oxygen sensor accelerometers. Without good calibration risk error causes lack calibration undermines accurate reliable measurement. Confusingly accelerometers, field long time assumed accelerometer need calibrated relative energy expenditure. incorrect energy expenditure entirely different construct. true reference accelerometer sensors acceleration can calibrate gravitational acceleration reference. acceleration sensor works based principle acceleration captured mechanically converted electrical signal. relationship electrical signal acceleration usually assumed linear, involving offset gain factor. familiar terms, compare simple regression equation offset Beta0 (Y-intercept) gain Beta1 (slope). Therefore, offset number add signal adjust systematic error (bias) gain number multiply signal scale , order adjust relative error. shall refer establishment offset gain factor sensor calibration procedure. three types calibration: Factory calibration, done industry (always done, may need refinement afterward). Manual calibration, done researcher (advisable cases even possible. Auto-calibration, done algorithms real life study data (common scenario refine factory calibration). Accelerometers usually calibrated part manufacturing process non-movement conditions using local gravitational acceleration reference, referred factory calibration. manufacturer calibration can later evaluated holding sensor axis parallel () perpendicular direction gravity; readings axis ±1.000 0.000 g, respectively. one derive correction coefficients per axis. However, procedure can cumbersome studies high throughput. Furthermore, calibration check possible data collected past corresponding accelerometer device exist anymore. reason calibraton advisable cases possible. Finally, auto-calibration type calibration done algorithm using already collected real world data withoutb need additional experiments, explain detail.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"auto-calibration-algorithm","dir":"Articles","previous_headings":"Accelerometer sensor calibration","what":"Auto-calibration algorithm","title":"3. Data Quality Assurance","text":"general principle techniques recording acceleration screened non-movement periods. Next, rolling average non-movement periods taken three orthogonal sensor axes used generate three-dimensional ellipsoid representation ideally sphere radius 1 g. , deviations radius three-dimensional ellipsoid 1 g (ideal calibration) can used derive correction factors sensor axis-specific calibration error. auto-calibration performed GGIR uses technique detailed description demonstration can found published paper. success auto-calibration depends number non-movement periods variation accelerometer orientation periods available algorithm. result, auto-calibration expected perform less short recordings (e.g., less day) recordings participant wear accelerometer time. cases, can use recordings sensor -movement periods higher variation orientations derive calibration coefficients, apply coefficients recording interest. , use parameter backup.cal.coef. auto-calibration algorithm applied default can turned parameter .cal = FALSE. recommend turning auto-calibration unless strong reasons .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"non-wear-detection","dir":"Articles","previous_headings":"","what":"Non-wear detection","title":"3. Data Quality Assurance","text":"can happen study participant wear accelerometer. can happen variety reasons: getting tired wearing accelerometer, forgetting put accelerometer back short moment wearing , getting instructed researcher take . However, accelerometer worn, still collect data. accelerometer lying still, data collected looks like participant supposed wear moving. left undetected, wearing accelerometer bias estimates time spent inactive behaviours. Accelerometer non-wear time detected GGIR looking standard deviation range raw acceleration signals. time window statistical values calculated long enough, turn reliable indicators whether accelerometer worn . specifically, standard deviation value range (.e., maximum value minus minimum value) calculated per 60 minute windows start every 15 minutes (e.g. 14:00, 14:15, etc.) . overlapping nature time windows needed improve precision. time window labelled non-wear, least statistical values 2 3 axes meet brand specific thresholds. result, since multiple overlapping time windows classify 15 minutes, 15 minute window classified multiple times. non-wear criteria met windows overlap 15-minute window, labelled non-wear. brands 13.0 mg less 50 mg. size time window (60 minutes) size time intervals 15 minutes defined parameter windowsizes, three values. specifically, first value used non-wear detection discussed next chapter, second value defines mentioned intervals 15 minutes , third value mentioned 60 minutes time window. non-wear classification, discussed , default 2023. Prior , GGIR slightly different non-wear detection algorithm still available via parameter nonwear_approach recommend use .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"identifying-implausible-wear-time","dir":"Articles","previous_headings":"Non-wear detection","what":"Identifying implausible wear time","title":"3. Data Quality Assurance","text":"can happen time classified wear time implausible example accelerometer post moved around researcher ahead actually intended wear period. example, accelerometer post long periods non-wear briefly interrupted periods movement, interpreted algorithm monitor wear. Therefore, GGIR part 2, detected non-wear GGIR part 1 checked implausible wear periods relabelled non-wear. sure mean part 1 2 see chapter 1, gives overview. GGIR part 2 performs check follows: First , detected wear-periods last less six hours, duration less 30% combined duration bordering non-wear periods, relabelled non-wear. Second, remaining wear-periods less three hours, form less 80% bordering non-wear periods, classified non-wear. motivation selecting relatively high criterion (< 30%) combination long period (6 hrs) low criterion (< 80%) combination short period (3 hrs) long periods likely actually related monitor wear time. illustrate algorithm created visual model, see picture . , units time presented squares marked grey detected non-wear time. Period C detected wear-time borders non-wear periods B D. length C less six hours C divided sum B D less 0.3 first criteria met block C turned non-wear period. Visual inspection >100 traces large observational study revealed applying stage three times iteratively allowed improved classification periods characterised intermittent periods non-wear apparent wear.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"implausible-wear-at-the-beginning-and-end-of-the-recording","dir":"Articles","previous_headings":"Non-wear detection","what":"Implausible wear at the beginning and end of the recording","title":"3. Data Quality Assurance","text":"Based experience, participants take accelerometer final 24 hours recording actual end. However, may hard detect accelerometer may still moved. Therefore, GGIR relabels wear-periods final 24 hrs recording shorter three hours preceded least one hour non-wear time non-wear. Finally, recording starts ends period less three hours wear followed preceded non-wear (length), period wear classified non-wear. additional criteria screening beginning end accelerometer file intended filter movements related attaching accelerometer start downloading data accelerometer end. final check can turned parameter nonWearEdgeCorrection, may relevant processing accelerometer data collected single-night polysomnography studies.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"clipping-detection","dir":"Articles","previous_headings":"","what":"Clipping detection","title":"3. Data Quality Assurance","text":"GGIR part 1 also screens acceleration signal “clipping”, .e., sustained unusual high (raw) acceleration values non compatible human movement. 30% data points 15-minute window (used non-wear) close maximal values (technical term dynamic range) sensor, corresponding time period considered potentially unreliable, may explained sensor getting stuck extreme value accelerometers used inappropriately (attached heavily accelerating object). example, dynamic range 8g, accelerations 7.5g marked “clipping”. window also classified clipping value window larger 150% dynamic range sensor. Given clipping rarely happens reported GGIR part non-wear time. clipping non-wear treated merging arrive single indicator amount invalid data. However, keep track occurrence clipping time, GGIR report fraction 15-minute windows recording clipping occurs, see section output .","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"time-gap-imputation","dir":"Articles","previous_headings":"Key parameters","what":"Time gap imputation","title":"3. Data Quality Assurance","text":"imputeTimegaps","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"auto-calibration","dir":"Articles","previous_headings":"Key parameters","what":"Auto-calibration","title":"3. Data Quality Assurance","text":".cal backup.cal.coef","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"non-wear-detection-1","dir":"Articles","previous_headings":"Key parameters","what":"Non-wear detection","title":"3. Data Quality Assurance","text":"windowsizes nonwear_approach nonWearEdgeCorrection","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"clipping-detection-1","dir":"Articles","previous_headings":"Key parameters","what":"Clipping detection","title":"3. Data Quality Assurance","text":"windowsizes dynrange","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"3. Data Quality Assurance","text":"van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Autocalibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Oct 1;117(7):738-44. PMID: 25103964 link van Hees VT, Gorzelniak L, Dean León EC, Eder M, Pias M, Taherian S, Ekelund U, Renström F, Franks PW, Horsch , Brage S. Separating movement gravity components acceleration signal implications assessment human daily physical activity. PLoS One. 2013 Apr 23","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"why-do-we-need-to-extract-metrics","dir":"Articles","previous_headings":"","what":"Why do we need to extract metrics","title":"4. From Raw Data to Acceleration Metrics","text":"Wearable accelerometers widely used health research study physical activity, sleep, behaviours. modern accelerometers can collect store least 30 values per second expressed units gravitational acceleration (g). data collected, important extract kinematically meaningful information . data processing, summary measures describe signal referred metrics signal features. knowledge accelerometer works typical approach metric calculation calculate possible statistical properties acceleration signal like mean, standard deviation, entropy, skewness. However, discussed chapter 1, favour approach try use knowledge sensor. knowledge sensor tells us acceleration signal comes three components need separated: acceleration related gravitational acceleration. absence movement three acceleration signals inform us orientation accelerometer relative gravity proxy posture. Accelerations decelerations related movement, can interpret proxy muscle contractions energy expenditure needed contractions . Measurement error bias. example, signal noise caused electronical components introducing minor variation acceleration signal even real acceleration constant. variation due noise typically small compared variation due movement. Another example calibration errors discussed chapter 3. Finding metric able separate three components provide informative value relation orientation magnitude acceleration proxies mentioned posture muscle contractions, respectively.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"metric-aggregation-per-epoch","dir":"Articles","previous_headings":"","what":"Metric aggregation per epoch","title":"4. From Raw Data to Acceleration Metrics","text":"metrics first calculated resolution raw data, reflects tiny fraction second. exact number data points per second also known sampling rate can vary studies. different sampling rate values directly comparable. However, aggregating metric values per larger time window, known epoch, can make values comparable. , GGIR aggregates values per epoch (e.g. 5 seconds). Aside harmonising data across studies, aggregation per epoch also advantages: Evidence value accelerometer data based epoch-level aggregates, reference values like Oxygen consumption sleep reliably derived sub-second resolution. Aggregating leads less data points makes lot practical work . GGIR, epoch length kept constant across GGIR parts allow consistent interpretation. epoch length set first value parameter windowsizes (default 5 seconds) used throughout steps GGIR, following exceptions: GGIR part 2, time spent MVPA variables (discussed chapter 11) done multiple epoch lengths, one output variable. However, per output variable epoch length held constant throughout recording, GGIR never mixes epoch lengths epoch length affects interpretation value. like reading overview article car speeds alternates unit speed every sentence (.e., miles per hour, meters per second, km per hour, etc). GGIR part 5, user option aggregate epochs 1 minute length parameter part5_agg2_60seconds. example, using 5 second epochs parts 1, 2, 3 4, can informative run part 5 1 minute epoch length.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"acceleration-metrics-available-in-ggir","dir":"Articles","previous_headings":"","what":"Acceleration metrics available in GGIR","title":"4. From Raw Data to Acceleration Metrics","text":"find list metrics GGIR can apply. Multiple metrics can derived GGIR run. acceleration metrics derived GGIR function g.applymetrics. Neishabouri counts GGIR relies R package actifelifecounts. Please see code respective package documentation information exact calculations. use metrics, add parameters GGIR call, e.g.:","code":"GGIR(do.enmo = TRUE, do.mad = TRUE, do.bfen = TRUE, …)"},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"approach-to-removing-the-gravitational-signal-component","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR","what":"Approach to removing the gravitational signal component","title":"4. From Raw Data to Acceleration Metrics","text":"table metrics overview indicates approach used separate gravitation component acceleration signal. two approaches design metrics: Magnitude, metric makes assumption magnitude gravitational acceleration component. Frequency, metric makes assumption frequency content gravitational acceleration component. assumptions known always true conditions, acceleration metric perfect.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"handling-high-frequency-components-in-the-signal","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR","what":"Handling high frequency components in the signal","title":"4. From Raw Data to Acceleration Metrics","text":"argue high frequency components signal treated noise removed. However, likely represent harmonics low frequency movements thus part description movement. elaborate reflection , please see blog post. metrics, listed , letters LF BF name attempt suppress high frequency content signal. , GGIR user can decide whether prefer filter higher frequencies .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"why-ggir-uses-enmo-as-a-default-","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR","what":"Why GGIR uses ENMO as a default.","title":"4. From Raw Data to Acceleration Metrics","text":"one metric can default. Acceleration metric ENMO (Euclidean Norm Minus One negative values rounded zero) default metric since GGIR created. 2013, investigated different ways summarising raw acceleration data (van Hees et al. PLoS ONE 2013). short, different metrics exist little literature support superiority metric time. long different studies use different metrics, findings comparable. Therefore, choice metric ENMO merely pragmatic. GGIR uses ENMO default : 1. ENMO demonstrated value describing variance daily energy expenditure, correlated questionnaire data, able describe patterns physical activity. 2. ENMO easy describe mathematically , therefore, improves reproducibility across studies software tools. 3. ENMO attempts quantify acceleration universal units collapse signal abstract scale. 4. 2013 paper showed ENMO used combination auto-calibration, similar validity filter-based metrics like HFEN BFEN, conceptually similar metrics proposed later MIMSunit, MAD, AI0. 5. Studies criticised ENMO consistently failed apply auto-calibration, attempted apply auto-calibration lab setting, ignoring fact auto-calibration designed short lab settings. needs free-living data work properly. , studies often clear problematic zero imputation idle sleep mode ActiGraph devices dealt .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"notes-on-implementation-of-zero-crossing-counts","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR","what":"Notes on implementation of zero crossing counts","title":"4. From Raw Data to Acceleration Metrics","text":"implementation zero-crossing count GGIR attempt imitate zero-crossed counts previously described Sadeh, Cole, Kripke colleagues late 1980s 1990s. However, guaranteed exact copy original approach, used AMA-32 Motionlogger Actigraph Ambulatory-monitoring Inc. (“AMI”). complete publicly accessible description approach exists.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"missing-information","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR > Notes on implementation of zero crossing counts","what":"Missing information","title":"4. From Raw Data to Acceleration Metrics","text":"missing information calculation : Sadeh specified calculations done based data Y-axis direction Y-axis clarified. Therefore, unclear whether Y-axis time corresponded Y-axis modern sensors. frequency filter used, properties filter missing. Sensitivity sensor: now guessing Motionlogger sensitivity 0.01 g without direct proof. Relationship piezo-electric acceleration signal used time modern piezo-capacitive acceleration signals. personal correspondence AMI, learnt technique kept proprietary never shared sold actigraphy manufacturers (time correspondence October 2021). Based correspondence AMI, can conclude even Actiwatch, ActiGraph, manufacturers, facilitated use 1990s sleep classification algorithms, guarantee exact replication original studies.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"our-guess-on-the-missing-information","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR > Notes on implementation of zero crossing counts","what":"Our guess on the missing information","title":"4. From Raw Data to Acceleration Metrics","text":"Following challenges, implementation zero-crossing count GGIR based educated guess used information find literature product documentation. relation missing information listed : allow specify axis want use parameter Sadeh_axis choose default second axis. use 0.25 - 3 Hertz band-pass filter order 2, can modify parameters zc.lb, zc.hb, zc.order. use 0.01 g stop band, can change parameter zc.sb. assume band-passed signal comparable absence evidence contrary. evaluation, zero-crossing count value range looks plausible compared value range original publications. note ActiGraph users: decide compare GGIR Cole-Kripke estimates ActiLife’s Cole Kripke estimates, aware ActiLife may adopted different Cole-Kripke algorithm original publication presented four algorithms. potential source variation. , ActiLife may used different educated guesses Motionlogger counts calculated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"embedding-your-own-metrics","dir":"Articles","previous_headings":"","what":"Embedding your own metrics","title":"4. From Raw Data to Acceleration Metrics","text":"GGIR users may like use metrics covered GGIR. facilitate , allow external function embedding discussed vignette Embedding external functions GGIR. fact, allows include entire algorithms step detection new sleep classification algorithm like test inside GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"related-output","dir":"Articles","previous_headings":"","what":"Related output","title":"4. From Raw Data to Acceleration Metrics","text":"GGIR part 2, output derived acceleration metric derived GGIR part 1 except metrics anglex, angley, anglez. GGIR part 4, output derived metrics used sleep detection, typically angle count (Neishabouri counts zero-crossing count). GGIR part 5, output derived single metric specified parameter acc.metric. reason constraint part 5 produces many variables creating multiple metrics computationally expensive substantially increase complexity underlying code.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"4. From Raw Data to Acceleration Metrics","text":"compiled list related articles may find useful: Van Hees et al. 2011 Estimation Daily Energy Expenditure Pregnant Non-Pregnant Women Using Wrist-Worn Tri-Axial Accelerometer. van Hees et al. 2013 Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. Migueles et al. 2019 Comparability accelerometer signal aggregation metrics across placements dominant wrist cut points assessment physical activity adults. Aittasalo et al. 2015 Mean amplitude deviation calculated raw acceleration data: novel method classifying intensity adolescents’ physical activity irrespective accelerometer brand. Neishabouri et al. 2022 Quantification acceleration activity counts ActiGraph. Karas et al. 2022 Comparison accelerometry-based measures physical activity: retrospective observational data analysis study. van Hees 2019 Ten Misunderstandings surrounding Information Extraction Wearable Accelerometer data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter5_StudyProtocol.html","id":"selectingmasking-the-data","dir":"Articles","previous_headings":"","what":"Selecting/Masking the data","title":"5. Accounting for Study Protocol","text":"important GGIR masks data outside time window participant instructed wear accelerometer. Study protocols differ duration expected wear period, GGIR offers variety ways account study protocol. main parameter data_masking_strategy. requires numeric value indicating one following strategies: data_masking_strategy = 1 indicate specific number hours masked start /end recording, specified parameters hrs.del.start hrs.del.end, respectively. data_masking_strategy = 2 indicate data first last midnight recording considered. data_masking_strategy = 3 indicate active X 24-h blocks starting time day used, X specified parameter ndayswindow. Note can combined aforementioned parameters hrs.del.start hrs.del.end, trim window start end recording. data_masking_strategy = 4 indicate data first midnight considered. data_masking_strategy = 5 similar data_masking_strategy = 3, yet selects X complete calendar days, X specified parameter ndayswindow. Additionally, can set maximum duration accelerometer worn recording starts. Use parameter maxdur specify duration number 24 hour blocks parameter max_calendar_daysfor number calendar days.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter5_StudyProtocol.html","id":"key-parameters","dir":"Articles","previous_headings":"","what":"Key parameters","title":"5. Accounting for Study Protocol","text":"data_masking_strategy hrs.del.start hrs.del.end ndayswindow maxdur max_calendar_days","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter6_DataImputation.html","id":"imputation-of-invalid-epoch-data","dir":"Articles","previous_headings":"","what":"Imputation of invalid epoch data","title":"6. How GGIR Deals with Invalid Data","text":"time segments classified non-wear clipping (see Chapter 3) masked study protocol (see Chapter 5) treated invalid data. GGIR part 2, epoch level metric values imputed, log kept epochs imputed. subsequent analysis done GGIR, imputed time series used. time series without invalid segments used analyses: Weighted average full recording Cosinor analysis (see Chapter 10) specific non-default configuration sleep analysis (see Chapter 8) imputation epoch data done based mean metric value corresponding valid values time day days recording. However, time interval marked invalid across recorded days, value imputed zero, except metric EN imputed 1. example, imagine 5-day recording following ENMO metric data two specific epochs day across five days: imputed shown average 3, 4, 3 3 3.25:","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter6_DataImputation.html","id":"controlling-the-imputation","dir":"Articles","previous_headings":"","what":"Controlling the imputation","title":"6. How GGIR Deals with Invalid Data","text":"worth noting option disable imputation setting parameter .imp = FALSE. means values kept imputed omitted. Disabling imputation recommended use-cases, can relevant studies controlled sleep exercise laboratories sensor known worn throughout experiment. alternative way control imputation specify time segments invalid epochs imputed zeros (ones metric EN) instead following standard GGIR imputation method. , use parameter TimeSegments2ZeroFile.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter6_DataImputation.html","id":"key-parameters","dir":"Articles","previous_headings":"","what":"Key parameters","title":"6. How GGIR Deals with Invalid Data","text":".imp, TimeSegments2ZeroFile","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter6_DataImputation.html","id":"related-output","dir":"Articles","previous_headings":"","what":"Related output","title":"6. How GGIR Deals with Invalid Data","text":"GGIR part 2, plots check data quality highlight segments file considered invalid imputed. plots can found folder “results/QC/”. GGIR part 5, time series produced optionally stored within folder “meta/ms5out.raw/” either csv RData format. time series contain indicator epochs considered invalid imputed.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"data-quality-indicators","dir":"Articles","previous_headings":"","what":"Data quality indicators","title":"7. Describing the Data Without Knowing Sleep","text":"GGIR part 2 summarises data quality checks done previous four chapters, ranging report successfulness auto-calibration procedure number valid days. way, GGIR part 2 ideal place start data quality assurance.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"basic-descriptives","dir":"Articles","previous_headings":"","what":"Basic descriptives","title":"7. Describing the Data Without Knowing Sleep","text":"Descriptive variables calculated reported valid days , criteria valid day defined parameter includedaycrit.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"average-acceleration","dir":"Articles","previous_headings":"Basic descriptives","what":"Average acceleration","title":"7. Describing the Data Without Knowing Sleep","text":"Average acceleration known correlated activity-related energy expenditure. GGIR part 2 provide two types average acceleration: Average per day, stored day considered valid. Note descriptive descriptives also stored GGIR averages across days, weekend days, weekdays, discuss detail later . Weighted average valid data points recording, weighted timing day valid epochs, regardless whether come days whole classified valid .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"acceleration-distribution","dir":"Articles","previous_headings":"Basic descriptives","what":"Acceleration distribution","title":"7. Describing the Data Without Knowing Sleep","text":"get detailed description data, looking distribution acceleration values can informative. GGIR facilitates two ways: specifying quantiles distribution parameter qlevels, fed build-R function quantile, GGIR gives us metric values corresponding quantiles (quantile multiplied 100 percentile). describing time spent acceleration ranges, defined parameter ilevels . distribution acceleration values often referred intensity distribution physical activity literature.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"sets-of-quantiles-mx-metrics-by-rowlands-et-al-","dir":"Articles","previous_headings":"Derived descriptives","what":"Sets of quantiles (MX metrics by Rowlands et al.)","title":"7. Describing the Data Without Knowing Sleep","text":"quantiles, discussed , can used describe accelerations participants exceed active “X” accumulated minutes day. specific approach, proposed Rowlands et al., quantiles referred MX metrics. MX metrics confused active continuous X hours, e.g. M10, used circadian rhythm research also can derived GGIR (see parameter winhr). use MX metrics proposed Rowlands et al., specify durations 24h day want identify accelerations values. example, generate minimum acceleration value active accumulated 30 minutes, can call qlevels = (1410/1440). parameter also accepts nested terms generate multiple MX metrics. example, call M60, M30, M10, can specify following: qlevels = c(c(1380/1440), c(1410/1440), c(1430/1440)). Note: time segments shorter 24 hours specified parameter qwindow, 8-hour school day (described Fairclough et al 2020), denominator qlevels change 1440 (24h) specific segment length. example, use 480 (8h). Accordingly, argument call M60, M30, M10 : qlevels = c(c(1380/1440), c(1410/1440), c(1430/1440)). moment, works one segment length GGIR facilitate generation MX metrics multiple unequal time segments within GGIR function call. output part 2 summary files refer percentile day. Thus, 24-h day, M30 appear “p97.91666_ENMO_mg_0.24hr”. create radar plots MX metrics first described Rowlands et al., GitHub repository provides R code detailed instructions make radar plots using data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"intensity-gradient","dir":"Articles","previous_headings":"Derived descriptives","what":"Intensity gradient","title":"7. Describing the Data Without Knowing Sleep","text":"plot time spent equally spaced acceleration ranges, end asymptotic-shaped curve, indicating little time spent high intensities (acceleration levels) much time spent low intensities. shape distribution may informative hard quantify single number standard form. Therefore, new concept called intensity gradient proposed Rowlands colleagues. intensity gradient defines slope log-transformed axes intensity distribution. specifically, calculate time accumulated incremental acceleration bins (bin size = 25 mg) also keep track mid-point intensity bin, e.g. 62.5 mg bin ranging 50 75 mg. mid-point acceleration bin expressed mg time spent bin expressed minutes log-transformed. log-transformation expected change asymptotic-shaped curve straight line. Subsequently, linear regression fitted data points. slope regression line represents intensity gradient. , calculate correlation coefficient data points help verify degree form straight line (R^2). intensity gradient calculated default. include metric part 2 output, set iglevels = TRUE. , want methodological research , can use parameter define alternative acceleration bins, e.g. using bins 20 instead 25 mg iglevels = c(seq(0, 4000, = 20), 8000).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"key-arguments","dir":"Articles","previous_headings":"","what":"Key arguments","title":"7. Describing the Data Without Knowing Sleep","text":"includedaycrit ilevels qlevels iglevels qwindow .report","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"related-output","dir":"Articles","previous_headings":"","what":"Related output","title":"7. Describing the Data Without Knowing Sleep","text":"GGIR part 2 generates three csv reports: part2_daysummary.csv, part2_summary.csv, data_quality_report.csv. data_quality_report.csv discussed chapter 3, focus first two reports chapter. variables part2_summary.csv recording level aggregates variables part2_daysummary.csv. , variable names starting “AD_” refer average across days, “WD” refers average across weekdays, “” refers average across weekend days, “WWE” refers weighted weekend days ensure weekend days contribute equally, “WWD” refers weighted weekdays ensure weekdays contribute equally. , GGIR part 2 generates report named part2_daysummary_longformat.csv, generated GGIR used day segment analysis, see documentation parameter qwindow. report contains exact information part2_daysummary.csv, long format instead wide format. part2_daysummary_longformat.csv, row represents one segment one day one recording, part2_daysummary.csv, row contains one day one recording segments day organised different columns.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"descriptive-variables","dir":"Articles","previous_headings":"Related output","what":"Descriptive variables","title":"7. Describing the Data Without Knowing Sleep","text":"clarify b refers part2_summary.csv part2_daysummary.csv, r refers part2_summary.csv .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"sib-vanhees2015","dir":"Articles","previous_headings":"","what":"SIB: vanHees2015","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"algorithm looks periods time z-angle change 5 degrees least 5 minutes. algorithm proposed 2015 article. idea behind algorithm interpretable heuristic compared conventional approaches use magnitude acceleration distinguish sustained inactivity bouts. reason assume vanHees2015 better worse reflection sleep, advancement purely intended terms interpretability. vanHees2015 algorithm default. values 5 5 algorithm can modified parameters anglethreshold timethreshold, currently see basis recommend advise sticking default values.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"sib-notworn-experimental","dir":"Articles","previous_headings":"","what":"SIB: NotWorn (EXPERIMENTAL)","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"Disclaimer: status SIB algorithm experimental described evaluated peer-reviewed publication yet. means revisions algorithm can expected algorithm matures. algorithms named “NotWorn” sib guider (next chapter) designed studies instruction wear accelerometer night. obvious facilitate meaningful sleep analysis. Nonetheless need crude estimate night time versus day time order GGIR part 5 characterise day time behaviours. case dataset use guider setting HASPT.algo = \"NotWorn\" discussed next chapter. , recommend combining using “NotWorn” : .imp = FALSE, HASPT.ignore.invalid = NA, ignorenonwear = FALSE. detection sib periods based acceleration metric defined parameter acc.metric.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"combined-with-count-acceleration-metrics","dir":"Articles","previous_headings":"SIB: NotWorn (EXPERIMENTAL)","what":"Combined with count acceleration metrics","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"using count accelereration metric set HASIB.algo = \"NotWorn\". part 4 sib set equal detected guider window. , effectively guider sib algorithm identical case.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"combined-with-gravitational-unit-acceleration-metrics","dir":"Articles","previous_headings":"SIB: NotWorn (EXPERIMENTAL)","what":"Combined with gravitational unit acceleration metrics","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"using acceleration metrics expresses acceleration gravitational units set HASIB.algo accelerometer expected worn specify second guider parameter HASPT.algo discussed int next chapter, e.g. HASPT.algo = c(\"NotWorn\", \"HDCZA)\". way GGIR first search long non-wear periods indicator sleep use define sleep window found fall back sib-algortihm specified HASIB.algo, e.g. \"vanHees2015\".","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"sib-count-based-algorithms-experimental","dir":"Articles","previous_headings":"","what":"SIB: Count based algorithms (EXPERIMENTAL)","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"Disclaimer: status SIB algorithm experimental described evaluated peer-reviewed publication yet. means revisions algorithm can expected algorithm matures. Accelerometers used sleep research since 1990s. However, initial accelerometers store data gravitational units sub-second level use nowadays stored data 30 60 second epoch aggregates. Although aggregates referred counts many manufacturers calculation counts differs manufacturer. attempted facilitate several sleep detection algorithms literature period “Sadeh1994”, “ColeKripke1992”, “Galland2012”. problem algorithms preprocessing done generate counts insufficiently described literature. zero-crossing count used Sadeh1994 ColeKripke1992 attempt made collect much information found made educated guess missing information. zero-crossing counts discussed chapter 4 acceleration metrics. counts calculated can use following SIB algorithms. uncertain whether Y-axis direction modern accelerometers matches direction Y-axis literature old studies direction Y-axis knowledge never clarified.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"sadeh1994","dir":"Articles","previous_headings":"SIB: Count based algorithms (EXPERIMENTAL)","what":"Sadeh1994","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"algorithm proposed Sadeh et al. link. use set parameter HASIB.algo = \"Sadeh1994\" argument Sadeh_axis = \"Y\" indicate algorithm use Y-axis sensor.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"galland2012","dir":"Articles","previous_headings":"SIB: Count based algorithms (EXPERIMENTAL)","what":"Galland2012","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"algorithm proposed Galland et al. link. use implementation Galland2012 algorithm specify parameter HASIB.algo = \"Galland2012\". , set Sadeh_axis = \"Y\" specify algorithm use Y-axis.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"colekripke1992","dir":"Articles","previous_headings":"SIB: Count based algorithms (EXPERIMENTAL)","what":"ColeKripke1992","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"algorithm proposed Cole et al. link, specifically GGIR uses algortihm proposed paper 10-second non-overlapping epochs counts expressed average per minute. skip re-scoring steps paper showed marginal added value added complexity. use GGIR implementation algortihm, specify parameters HASIB.algo = \"ColeKripke1992\" Sadeh_axis = \"Y\" indicate algorithm use Y-axis sensor.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"dealing-with-expected-or-detected-nonwear-time-segments","dir":"Articles","previous_headings":"","what":"Dealing with expected or detected nonwear time segments","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"Depending study protocol may want interpret invalid data (typically non-wear) differently. set parameter ignorenonwear=TRUE (default) ignore non-wear period SIB detection. useful prevent nonwear episodes going bed waking contributing sleep.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"time-window-used-for-sleep-analyses","dir":"Articles","previous_headings":"","what":"Time window used for sleep analyses","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"default sleep analysis considers window noon-noon, ideal shift workers may go bed early day wake noon. address , GGIR changes window analysis seems case: sleep log indicates person woke noon, sleep analysis part 4 done window 6pm-6pm. Similarly, guider indicates person woke 11 , sleep analysis part 3 4 done window 6pm-6pm. way method sensitive individuals main sleep period starting noon ending noon, referred daysleepers output. example case shift workers. Note guider L5+/-12 (discussed ) able , consider noon-noon time window.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-sleeplog","dir":"Articles","previous_headings":"Guiders","what":"Guider: Sleeplog","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"sleep log (diary) already used studies. way GGIR uses sleeplog first described 2015 article. Two sleeplog file structures supported: -called basic advanced sleeplog. use guider set location sleeplog value parameter loglocation. General notes GGIR uses sleeplogs guider: GGIR expects start end sleep window specified. one missing sleeplog data assumed missing entire night. GGIR impute sleeplog data. feel imputation desirable running GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"basic-sleep-log","dir":"Articles","previous_headings":"Guiders > Guider: Sleeplog","what":"Basic sleep log","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Example basic sleeplog: One column participant id, first column. Specify column argument colid. Alternatingly one column onset time one column waking time. Specify column column first night argument coln1, example coln1=2. Timestamps stored without date hh:mm:ss hour values ranging 0 23 (24). onset corresponds lights intention fall asleep, specify sleepwindowType = \"TimeInBed\". can multiple sleeplogs spreadsheet. row representing single recording. First row: first row spreadsheet needs filled column names. basic sleep log format matter column names . first night basic sleeplog assumed correspond first recorded night accelerometer recording. know sleep log start later day make sure add columns labels without timestamps. Note recorded night mean data regardless whether data valid. , participant wear accelerometer first night still first night recording.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"advanced-sleep-log","dir":"Articles","previous_headings":"Guiders > Guider: Sleeplog","what":"Advanced sleep log","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Example advanced sleeplog two recordings: Relative basic sleeplog format advanced sleep log format comes following changes: Recording stored rows, information per days stored columns. Information per day preceded one columns holds calendar date. GGIR designed recognise handle date format assumes used date format consistently sleeplog. Per calendar date column wakeup time followed column onset -bed time. Note different basic sleep log, wakeup time follows column onset -bed time. , advanced sleep log calendar date oriented: asking participant woke fell asleep certain date. However, sleep onset time 2am, still fill 02:00:00, even though 02:00:00 next calendar date. can add columns relating self-reported napping time nonwear time. used sleep analysis g.part3 g.part4, used g.part5 facilitate napping analysis, see argument .sibreport paragraph naps. Multiple naps multiple nonwear periods can entered per day. Leave cells missing values blank. Column names critical advanced sleeplog format: Date columns recognised GGIR column name word “date” . advanced sleep log format recognised GGIR looking occurrence least two column names word “date” name. Wakeup times recognised words “wakeup” column name. Sleeponset, bed bed times recognised columns following character combinations name: “onset”, “inbed”, “tobed”, “lightsout”. Napping times recognised columns word “nap” name. Nonwear times recognised columns word “nonwear” name. GGIR guesses data format looping common date formats. date falls within 30 days start date accelerometer recording date format assumed found. starts attempting “Y-m-d” (2015-06-25).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-hdcza","dir":"Articles","previous_headings":"Guiders","what":"Guider: HDCZA","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"HDCZA algorithm designed studies wrist-worn accelerometer (raw) data sleep log available. algorithm first described 2018 article, modified slightly: Step 6 Figure 1 replaced single threshold (0.2 default). short, step 1-6 attempt classify time periods limited change posture. Next, step 7 extracts time blocks longer 30 minutes, step 8 includes intermittent time periods shorter 60 minutes, step 9 looks longest resulting block day, step 10 represents guider window. Note step 10 Figure 1 paper gives false impression step represents final classification SPT window. way guider used identify SPT window described chapter 10. time segment HDCZA derived default noon noon. However, ends 11am noon applied 6pm-6pm time segment. use guider set parameter HASPT.algo = \"HorAngle\".","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-l5-12-legacy-algorithm","dir":"Articles","previous_headings":"Guiders","what":"Guider: L5+/-12 (LEGACY ALGORITHM)","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Disclaimer: legacy algorithm used publications therefore kept inside GGIR. performance expected less available algorithm, recommend using . guider reflects twelve hour window centred around least active 5 hours day. crude approach likely inferior guiders, easy describe. first presented 2018 article. use guider set parameter def.noc.sleep = c().","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-setwindow-legacy-algorithm","dir":"Articles","previous_headings":"Guiders","what":"Guider: setwindow (LEGACY ALGORITHM)","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Disclaimer: legacy algorithm used publications therefore kept inside GGIR. performance expected less available algorithm, recommend using . guider uses set window day recording. Start end time specified argument def.noc.sleep. example, use guider window 10pm 8am set parameter def.noc.sleep = c(22, 8).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-horangle-experimental","dir":"Articles","previous_headings":"Guiders","what":"Guider: HorAngle (EXPERIMENTAL)","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Disclaimer: status guider experimental described evaluated peer-reviewed publication yet. means revisions algorithm can expected algorithm matures. guider designed hip-worn accelerometer (raw) data, looking longest period horizontal trunk. needs GGIR part 1 2 derived angle longitudinal axis. Setting parameter sensor.location=\"hip\" triggers identification longitudinal axis looking angle strongest 24-hour lagged correlation. can also force GGIR use specific axis longitudinal axis parameter longitudinal_axis. Next, algorithm identifies horizontal axis -45 45 degrees considers horizontal posture. Next, used identify largest time bed period, considering horizontal time segments least 30 minutes, looking longest horizontal period day gaps less 60 minutes ignored. Therefore, last 4 steps algorithm identical last four steps HDCZA algorithm. use guider set parameter HASPT.algo = \"HorAngle\"","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-notworn-experimental","dir":"Articles","previous_headings":"Guiders","what":"Guider: NotWorn (EXPERIMENTAL)","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Disclaimer: status guider experimental described evaluated peer-reviewed publication yet. means revisions algorithm can expected algorithm matures. already referenced previous chapter NotWorn guider designed studies instruction wear accelerometer night. obvious facilitate meaningful sleep analysis. Nonetheless need crude estimate night time versus day time order GGIR part 5 characterise day time behaviours. First NotWorn algorithm calculates 5 minute rolling average acceleration metric values (.e., acceleration metric defined parameter acc.metric) applies threshold 5% standard deviation resulting signal. However, threshold less minimum value signal threshold set equal 10th percentile distribution. Next, used identify largest non-movement period, considering segments least 30 minutes, looking longest segment day gaps less 60 minutes ignored. Therefore, last 4 steps algorithm identical last four steps HDCZA HorAngle algorithms. algorithm expected work acceleration metric, count-type metrics metrics gravitational units. use guider set parameter HASPT.algo = \"NotWorn\". , recommend combining using “NotWorn” : .imp = FALSE ignorenonwear = FALSE. Internally HASPT.ignore.invalid always set NA “NotWorn” used. used also define resulting window SIB period ignore identified SIB window ensure entire window treated sleep. , SIB periods detected ignored. However, know experience participants occasionally wear accelerometer night even told . GGIR offers solution working count data accelerometer metrics gravitational units. case, possible specify second guider use accelerometer worn less 25% time detection window (noon-noon 6pm-6pm). happens check whether parameter HASPT.algo two guiders specified. use second one. example, HASPT.algo = c(\"NotWorn\", \"HDCZA\") HASPT.algo = c(\"NotWorn\", \"HorAngle\").","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"dealing-with-expected-or-detect-nonwear-time-segments","dir":"Articles","previous_headings":"","what":"Dealing with expected or detect nonwear time segments","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Depending study protocol may want interpret invalid data (typically non-wear) differently: want rely available time series invalid time segments imputed leave parameter HASPT.ignore.invalid = FALSE default. want guider ignore invalid segment despite efforts impute , see HASPT.ignore.invalid = TRUE. approach may helpful studies accelerometer often worn waking hour day. want guider consider invalid segments movement period set parameter HASPT.ignore.invalid = NA. approach may helpful studies accelerometer often worn night.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"in--awd-format","dir":"Articles","previous_headings":"Handling externally derived data > Actiwatch data","what":"in .AWD format","title":"Cookbook","text":"","code":"GGIR(datadir = \"/media/actiwatch_awd\", # folder with epoch level .AWD file outputdir = \"/media/myoutput\", dataFormat = \"actiwatch_awd\", extEpochData_timeformat = \"\\%m/\\%d/\\%Y \\%H:\\%M:\\%S\", windowsizes = c(60, 900, 3600), # 60 is the expected epoch length HASIB.algo = \"Sadeh1994\", def.noc.sleep = c()) # <= because we cannot use HDCZA for ZCY"},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"in--csv-format","dir":"Articles","previous_headings":"Handling externally derived data > Actiwatch data","what":"in .CSV format","title":"Cookbook","text":"","code":"GGIR(datadir = \"/media/actiwatch_csv\", # folder with epoch level .AWD file outputdir = \"/media/myoutput\", dataFormat = \"actiwatch_csv\", extEpochData_timeformat = \"\\%m/\\%d/\\%Y \\%H:\\%M:\\%S\", windowsizes = c(15, 900, 3600), # 15 is the expected epoch length HASIB.algo = \"Sadeh1994\", def.noc.sleep = c()) # <= because we cannot use HDCZA for ZCY"},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"uk-biobank-data-in--csv-format","dir":"Articles","previous_headings":"Handling externally derived data","what":"UK Biobank data in .CSV format","title":"Cookbook","text":"","code":"GGIR(datadir = \"/media/ukbiobank\", outputdir = \"/media/myoutput\", dataFormat = \"ukbiobank_csv\", extEpochData_timeformat = \"\\%m/\\%d/\\%Y \\%H:\\%M:\\%S\", windowsizes = c(5, 900, 3600), # We know that data was stored in 5 second epoch desiredtz = \"Europe/London\") # We know that data was collected in the UK"},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"actigraph-count-data-in--csv-format","dir":"Articles","previous_headings":"Handling externally derived data","what":"ActiGraph count data in .CSV format","title":"Cookbook","text":"","code":"GGIR(datadir = \"/examplefiles\", outputdir = \"\", dataFormat = \"actigraph_csv\", windowsizes = c(5, 900, 3600), threshold.in = round(100 * (5/60), digits = 2), threshold.mod = round(2500 * (5/60), digits = 2), threshold.vig = round(10000 * (5/60), digits = 2), extEpochData_timeformat = \"\\%m/\\%d/\\%Y \\%H:\\%M:\\%S\", do.neishabouricounts = TRUE, acc.metric = \"NeishabouriCount_x\")"},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"senwear-data-in--xls-format","dir":"Articles","previous_headings":"Handling externally derived data","what":"Senwear data in .xls format","title":"Cookbook","text":"","code":"GGIR(datadir = \"C:/yoursenseweardatafolder\", outputdir = \"D:/youroutputfolder\", windowsizes = c(60, 900, 3600), threshold.in = 1.5, threshold.mod = 3, threshold.vig = 6, dataFormat = \"sensewear_xls\", extEpochData_timeformat = \"\\%d-\\%b-\\%Y \\%H:\\%M:\\%S\", HASPT.algo = \"NotWorn\")"},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"not-worn-during-night","dir":"Articles","previous_headings":"Handling study protocol","what":"Not worn during night","title":"Cookbook","text":"Data type: Study protocol: Worn day, taken night Wear location: “NotWorn” specified second guider can supplied parameter shown . second guider used accelerometer worn 75 percent night. example shows HDCZA.","code":"GGIR(HASPT.algo = c(\"NotWorn\", \"HDCZA\"), HASIB.algo = \"vanHees2015\", do.imp = FALSE, # Do not impute nonwear because sensor was never worn 24/7 HASPT.ignore.invalid = NA, # Treat nonwear as potential part of guider window ignorenonwear = FALSE, # Consider nonwear as potential sleep includenightcrit = 8, includedaycrit = 8)"},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"considerations","dir":"Articles","previous_headings":"","what":"Considerations","title":"Published cut-points and how to use them in GGIR","text":"physical activity research field used called cut-points segment accelerometer time series based level intensity. vignette compiled list published cut-points instructions use GGIR. Please note GGIR refers cut-points thresholds, referring thing: value set values help split levels movement intensity. newer cut-points frequently published list may date. Please let us know aware published cut-points missed!","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-expressed-in-gravitational-units-this-vignette","dir":"Articles","previous_headings":"Considerations","what":"Cut-points expressed in gravitational units (this vignette)","title":"Published cut-points and how to use them in GGIR","text":"vignette focuses cut-points metrics attempt quantify average acceleration per epoch gravitational units. strength metrics values affected sampling rate epoch length improving comparability across studies.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-not-expressed-in-gravitational-units-not-in-this-vignette","dir":"Articles","previous_headings":"Considerations","what":"Cut-points NOT expressed in gravitational units (not in this vignette)","title":"Published cut-points and how to use them in GGIR","text":"However, GGIR also facilitates metrics whose values expressed gravitational units historically used. example, metric described Neishabouri (see GGIR argument .neishabouricounts) reflects indicator accumulated body movement time, referred counts, calculated ActiLife software ActiGraph accelerometer brand. Cut-points counts corresponding ActiGraph brand recurrently proposed literature, example, see systematic review stratification age group. Note cut-points ActiGraph counts proposed introduction multiday raw data collection likely hardware-based calculations may perfectly align ActiGraph software-based (Actilife) calculations counts Neishabouri described. result, older cut-points may need used caution. cut-points find literature ActiGraph counts applied Neishabouri counts directly epoch length specific. cut-points literature need corrected conversion factor. conversion factor calculated epoch length new study (e.g. 5 seconds) divided epoch length original study (e.g. 60 seconds). Note correction differences sampling rate needed Neishabouri counts already account via -sampling. want use cut-point “100 counts per minute” literature 5 second epoch data, GGIR function call look like :","code":"GGIR([...], mode = 1:5, windowsizes = c(5, 900, 3600), do.neishabouricounts = TRUE, acc.metric = \"NeishabouriCount_y\", threshold.in = 100 * (5/60), [...])"},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"relevant-arguments-to-use-cut-points-in-ggir","dir":"Articles","previous_headings":"","what":"Relevant arguments to use cut-points in GGIR","title":"Published cut-points and how to use them in GGIR","text":"argument mvpathreshold used part 2 quantify time accumulated user-specified threshold moderate--vigorous intensity expected occur. mvpathreshold applied metrics extracted part 1 arguments .metric (e.g., .enmo, .mad, .neishabouricounts). part 5, threshold.lig, threshold.mod, threshold.vig used indicate thresholds separate inactivity light, light moderate, moderate vigorous, respectively.thresholds applied metric defined acc.metric (default = “ENMO”). summary table parameters definition calculate acceleration metrics previously used calibration cut-points define used physical activity intensity classification cut-points.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-for-preschoolers","dir":"Articles","previous_headings":"Summary of published cut-points","what":"Cut-points for preschoolers","title":"Published cut-points and how to use them in GGIR","text":"*publications used acceleration metrics sum values per epoch rather average per epoch like GGIR . , use cut-point GGIR, provide scaled version cut-points presented paper : (CutPointFromPaper_in_gsecs/85.7) * 1000. Note sample frequency 87.5 reported publication incorrect based correspondence authors replaced 85.7.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-for-childrenadolescents","dir":"Articles","previous_headings":"Summary of published cut-points","what":"Cut-points for children/adolescents","title":"Published cut-points and how to use them in GGIR","text":"*publications used acceleration metrics sum values per epoch rather average per epoch like GGIR . , use cut-point GGIR, provide scaled version cut-points presented paper : (CutPointFromPaper_in_gmins/(sampleRateFromPaper * EpochLengthInSecondsPaper)) * 1000 ** publication used acceleration metrics expressed cut-points g units. , use cut-point GGIR, provide cut-point multiplied 1000.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-for-adults","dir":"Articles","previous_headings":"Summary of published cut-points","what":"Cut-points for adults","title":"Published cut-points and how to use them in GGIR","text":"*publications used acceleration metrics sum values per epoch rather average per epoch like GGIR . , use cut-point GGIR, provide scaled version cut-points presented paper : (CutPointFromPaper_in_gmins/(sampleRateFromPaper * EpochLengthInSecondsPaper)) * 1000 † publication, cut-point based data sampled 30 Hz 100 Hz. scaling cut-points specified (*), resulting thresholds virtually (ones presented table).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-for-older-adults","dir":"Articles","previous_headings":"Summary of published cut-points","what":"Cut-points for older adults","title":"Published cut-points and how to use them in GGIR","text":"*Cut-points derived applying Youden index ROC curves. ** Cut-points derived increasing Sensitivity Specificity light vice versa moderate ROC curves (see paper details).† publications used acceleration metrics sum values per epoch rather average per epoch like GGIR . , use cut-point GGIR, provide scaled version cut-points presented paper : (CutPointFromPaper_in_gmins/(sampleRateFromPaper * EpochLengthInSecondsPaper)) * 1000 ‡ cut-points excluding data aided walking washing activities can found publication.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"notes-on-cut-point-validity","dir":"Articles","previous_headings":"","what":"Notes on cut-point validity","title":"Published cut-points and how to use them in GGIR","text":"Sensor calibration studies , excluding Hildebrand et al. 2016, effort made calibrate acceleration sensors relative gravitational acceleration prior cut-point development. Theoretically can expected cause bias cut-point estimates proportional calibration error device, especially cut-points based acceleration metrics rely assumption accurate calibration metrics: ENMO, EN, ENMOa, also metric SVMgs used studies Esliger 2011, Phillips 2013, Dibben 2020. Idle sleep mode ActiGraph discussed main package vignette, studies using ActiGraph sensor often forget clarify whether idle sleep mode used , accounted data processing. criticism towards cut-point methods? elaborate reflection limitations cut-points motivation cut-points still value GGIR see: https://www.accelting.com/updates/--ggir-facilitate-cut-points/","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Published cut-points and how to use them in GGIR","text":"Aittasalo 2015: https://bmcsportsscimedrehabil.biomedcentral.com/articles/10.1186/s13102-015-0010-0 Bammann 2021: https://doi.org/10.1371/journal.pone.0252615 Dibben 2020: https://bmcsportsscimedrehabil.biomedcentral.com/articles/10.1186/s13102-020-00196-7 Dillon 2016: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4858250/ Esliger 2011: https://journals.lww.com/acsm-msse/Fulltext/2011/06000/Validation_of_the_GENEA_Accelerometer.22.aspx Fraysse 2020: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7843957/ Hildebrand 2014: https://journals.lww.com/acsm-msse/Fulltext/2014/09000/Age_Group_Comparability_of_Raw_Accelerometer.17.aspx Hildebrand 2016: https://doi.org/10.1111/sms.12795 Migueles 2021: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8150960/ Phillips 2013: https://doi.org/10.1016/j.jsams.2012.05.013 Sanders 2018: https://doi.org/10.1080/02640414.2018.1555904 Schaefer 2014: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3960318/ Roscoe 2017: https://link.springer.com/article/10.1007/s00431-017-2948-2 Vähä-Ypyä 2015: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0134813","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Embedding external functions in GGIR","text":"like GGIR want use algorithms raw data included GGIR external function embedding feature can solution. example, may want pilot new machine learned classifiction algorithm want write data cleaning aggregation steps needed analysis real life ‘lab’ acceleormeter data. works: Internally GGIR loads raw accelerometer data memory blocks 24 hours. data memory, corrected calibration error, resampled sample rate required function, GGIR applies default algorithms well external function provided (Python R). external function expected take input: three-column matrix acceleration data corresponding three acceleration axes, optional parameters argument can R format (character, list, vector, data.frame, etc). output external function expected produce matrix data.frame one multiple columns corresponding output external function.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"example-with-external-r-function","dir":"Articles","previous_headings":"","what":"Example with external R function","title":"Embedding external functions in GGIR","text":"example apply function counts() R package activityCounts raw data, produces estimate Actigraph counts per second.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"write-external-function","dir":"Articles","previous_headings":"Example with external R function","what":"Write external function","title":"Embedding external functions in GGIR","text":"Create file calculateCounts.R insert following code:","code":"calculateCounts = function(data=c(), parameters=c()) { # data: 3 column matrix with acc data # parameters: the sample rate of data library(\"activityCounts\") if (ncol(data) == 4) data= data[,2:4] mycounts = counts(data=data, hertz=parameters, x_axis=1, y_axis=2, z_axis=3, start_time = Sys.time()) mycounts = mycounts[,2:4] #Note: do not provide timestamps to GGIR return(mycounts) }"},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"provide-external-function-to-ggir","dir":"Articles","previous_headings":"Example with external R function","what":"Provide external function to GGIR","title":"Embedding external functions in GGIR","text":"Create new .R file running GGIR analysis, e.g. named myscript.R, insert following code. forget update filepath first line point calculateCounts.R file. code creates object myfun type list expected come following elements: FUN character string specifying location external function want apply. parameters parameters used function, can stored format (vector, matrix, list, data.frame). user make sure external function can handle object. expected_sample_rate Expected sample rate, inputdata difference sample rate, data resampled. expected_unit Expected unit acceleration external function: “mg”, “g” “ms2”. input data different converted. colnames Character vector names columns produced external function. outputres resolution (seconds) output produced external function. Note, needs equal multitude short epoch size g.part1 output (5 seconds) short epoch size multitude resolution. way GGIR can aggregate repeat external function output used inside GGIR. minlength minimum length (seconds) input data needed, typically window per output provided. outputtype Character indicate type external function output. Set “numeric” data stored numbers (numeric format), “character” character string. aggfunction data needs aggregated match short epoch size g.part1 output (5 seconds) element specifies function used aggregation, e.g. mean, sum, median. timestamp Boolean indicated whether timestamps (seconds since 1-1-1970) passed external function first columm data matrix.. reporttype Character indicate type reporting GGIR: “scalar” averaged per day, “event” summed per day, “type” categorical variable can aggregated per day tabulating . Next, add call GGIR function GGIR myfun provided one arguments: Please see information function GGIR.","code":"source(\"~/calculateCounts.R\") myfun = list(FUN=calculateCounts, parameters= 30, expected_sample_rate= 30, expected_unit=\"g\", colnames = c(\"countsX\",\"countsY\",\"countsZ\"), outputres = 1, minlength = 1, outputtype=\"numeric\", aggfunction = sum, timestamp=F, reporttype=\"scalar\") library(GGIR) GGIR(datadir=\"~/myaccelerometerdata\", outputdir=\"~/myresults\", mode=1:2, epochvalues2csv = TRUE, do.report=2, myfun=myfun) #<= this is where object myfun is provided to GGIR"},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"example-with-external-python-function","dir":"Articles","previous_headings":"","what":"Example with external Python function","title":"Embedding external functions in GGIR","text":"example use external Python function estimate dominant signal frequency per acceleration axis. Note can also done R, shows even Python functions can provided.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"write-external-function-1","dir":"Articles","previous_headings":"Example with external Python function","what":"Write external function","title":"Embedding external functions in GGIR","text":"Create dominant_frequency.py insert code shown : Create dominant_frequency.R calls python function insert following code:","code":"import numpy def dominant_frequency(x, sf): # x: vector with data values # sf: sample frequency fourier = numpy.fft.fft(x) frequencies = numpy.fft.fftfreq(len(x), 1/sf) magnitudes = abs(fourier[numpy.where(frequencies > 0)]) peak_frequency = frequencies[numpy.argmax(magnitudes)] return peak_frequency dominant_frequency = function(data=c(), parameters=c()) { # data: 3 column matrix with acc data # parameters: the sample rate of data source_python(\"dominant_frequency.py\") sf=parameters N = nrow(data) ws = 5 # windowsize if (ncol(data) == 4) data= data[,2:4] data = data.frame(t= floor(seq(0,(N-1)/sf,by=1/sf)/ws), x=data[,1], y=data[,2], z=data[,3]) df = aggregate(data, by = list(data$t), FUN=function(x) {return(dominant_frequency(x,sf))}) df = df[,-c(1:2)] return(df) } }"},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"provide-external-function-to-ggir-1","dir":"Articles","previous_headings":"Example with external Python function","what":"Provide external function to GGIR","title":"Embedding external functions in GGIR","text":"Create new .R file running GGIR analysis, e.g. named myscript.R, insert following blocks code. Specification Python environment use, can also conda environment docker container (see documentation R package details). Make sure Python environment required dependencies external function, need numpy. Specify myfun object explained R example. forget update filepath \"~/dominant_frequency.R\" file. Add call function GGIR myfun provided argument. Note , .parallel set FALSE. Unfortunately Python embedding R package reticulate multi-threading R package foreach used GGIR combine well.","code":"library(\"reticulate\") use_virtualenv(\"~/myvenv\", required = TRUE) # Local Python environment py_install(\"numpy\", pip = TRUE) source(\"~/dominant_frequency.R\") myfun = list(FUN=dominant_frequency, parameters= 30, expected_sample_rate= 30, expected_unit=\"g\", colnames = c(\"domfreqX\", \"domfreqY\", \"domfreqZ\"), minlength = 5, outputres = 5, outputtype=\"numeric\", aggfunction = median timestamp=F, reporttype=\"scalar\") library(GGIR) GGIR(datadir=\"~/myaccelerometerdata\", outputdir=\"~/myresults\", mode=1:2, epochvalues2csv = TRUE, do.report=2, myfun=myfun, do.parallel = FALSE)"},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"part-1","dir":"Articles","previous_headings":"Integration in GGIR output","what":"Part 1","title":"Embedding external functions in GGIR","text":"external function output included time series produced function GGIR function g.part1 stored RData-file /output_nameofstudy/meta/basic. resolution output GGIR set GGIR argument windowsizes, c(5,900,3600) default. , first element 5 specifies short epoch size seconds. output external function less resolution aggregated function specificied aggfunction myfun object. count example used sum dominant frequency example used median.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"part-2","dir":"Articles","previous_headings":"Integration in GGIR output","what":"Part 2","title":"Embedding external functions in GGIR","text":"Next, part2 GGIR aims detect non-wear periods imputes . impute time series can found part 2 milestone data folder: /output_nameofstudy/meta/ms2.. want directly stored csv file set argument epochvalues2csv = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"external-functions-released-by-ggir-collaborators","dir":"Articles","previous_headings":"","what":"External functions released by GGIR collaborators:","title":"Embedding external functions in GGIR","text":"Wrist-based step detection algorithm: https://github.com/ShimmerEngineering/Verisense-Toolbox/tree/master/Verisense_step_algorithm Wrist-based sleep classification described Sundararajan et al. 2021 link paper, corresponding code : https://github.com/wadpac/Sundararajan-SleepClassification-2021/tree/master/ggir_ext","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"ggir-part-1","dir":"Articles","previous_headings":"","what":"GGIR Part 1","title":"GGIR output","text":"GGIR part 1, outputs RData files used GGIR part 2. RData files intended direct use GGIR user.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"ggir-part-2","dir":"Articles","previous_headings":"","what":"GGIR Part 2","title":"GGIR output","text":"Part 2 generates following output: part2_summary.csv: Person level summary (see ) part2_daysummary.csv: Day level summary (see ) QC/data_quality_report.csv: Overview calibration results whether file corrupt short processed, QC/plots check data quality 1.pdf: pdf visualisation acceleration time series 15 minute resolution invalid data segments highlighted colours (yellow: non-wear based standard deviation threshold, brown: non-wear extra filtering step (introduced 2013), purple: clipping)","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"day-level-summary-csv","dir":"Articles","previous_headings":"GGIR Part 2","what":"Day level summary (csv)","title":"GGIR output","text":"non-exhaustive list, concepts explained summary.csv","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"data_quality_report-csv","dir":"Articles","previous_headings":"GGIR Part 2","what":"Data_quality_report (csv)","title":"GGIR output","text":"data_quality_report.csv stored subfolder folder results/QC.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"ggir-part-3","dir":"Articles","previous_headings":"","what":"GGIR Part 3","title":"GGIR output","text":"GGIR part 3, outputs RData files used GGIR part 4 5. RData files intended direct use GGIR user.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"ggir-part-4","dir":"Articles","previous_headings":"","what":"GGIR Part 4","title":"GGIR output","text":"Part 4 generates following output:","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"night-level-summaries-csv","dir":"Articles","previous_headings":"GGIR Part 4","what":"Night level summaries (csv)","title":"GGIR output","text":"part4_nightsummary_sleep_cleaned.csv QC/part4_nightsummary_sleep_full.csv latter ’_full’ name intended aid clarifying nights () excluded cleaned summary report. Although, nights accelerometer worn excluded . , 30 day recording accelerometer worn day 7 onward find last 22 nights either csv-report. csv. files contain variables shown . Non-default variables part 4 csv report additional stored used sleeplog captures time bed, using guider HorAngle hip-worn accelerometer data. either applies set argument sleepwindowType “TimeInBed”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"person-level-summaries-csv","dir":"Articles","previous_headings":"GGIR Part 4","what":"Person level summaries (csv)","title":"GGIR output","text":"part4_summary_sleep_cleaned.csv QC/part4_summary_sleep_full.csv person level report variables derived variables night level summary. Minor extensions variable names explain variables aggregated across days. Please find extra clarification variable names meaning may obvious:","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"visualisation-pdf","dir":"Articles","previous_headings":"GGIR Part 4","what":"Visualisation (pdf)","title":"GGIR output","text":"Visualisation support data quality checks: - visualisation_sleep.pdf (optional) input argument .visual set TRUE GGIR can show following visual comparison time window asleep (bed) according sleeplog detected sustained inactivity bouts according accelerometer data. visualisation stored results folder visualisation_sleep.pdf. Explanation image: line represents one night. Colours used distinguish definitions sustained inactivity bouts (2 definitions case) indicate existence absence overlap sleeplog. argument outliers.set FALSE visualise available nights dataset. outliers.set TRUE visualise nights difference onset waking time sleeplog sustained inactivity bouts larger value argument criterror. visualisation outliers.set TRUE critererror set 4 powerful identify entry errors sleeplog data van Hees et al PLoSONE 2015. 25 thousand nights data, visualisation allowed us quickly zoom problematic nights investigate possible mistakes GGIR mistakes data entry.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"ggir-part-5","dir":"Articles","previous_headings":"","what":"GGIR Part 5","title":"GGIR output","text":"output part 5 dependent parameter configuration, generate many output files unique combination three thresholds provided. example, following files generated threshold configuration 30 light activity, 100 moderate 400 vigorous activity: part5_daysummary_MM_L30M100V400_T5A5.csv part5_daysummary_WW_L30M100V400_T5A5.csv part5_personsummary_MM_L30M100V400_T5A5.csv part5_personsummary_WW_L30M100V400_T5A5.csv file summary reports/Report_nameofdatafile.pdf","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"day-level-summary-csv-1","dir":"Articles","previous_headings":"GGIR Part 5","what":"Day level summary (csv)","title":"GGIR output","text":"Special note working compositional data analysis: duration dur_ variables _total_ name add total length waking hours day. Similarly, duration dur_ variables excluding variables _total_ name excluding variable dur_day_min, dur_spt_min, dur_day_spt_min also add length full day. Motivation default boutcriter.= 0.9: idea allow bouts 30 minutes make sense allow breaks 20 percent (6 minutes!) used stringent criteria highest category. Please note can change criteria via arguments boutcriter.mvpa, boutcriter., boutcriter.lig.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"person-level-summary-csv-1","dir":"Articles","previous_headings":"GGIR Part 5","what":"Person level summary (csv)","title":"GGIR output","text":"variables person level summary derived day level summary, extended _pla indicate variable calculated plain average across valid days. Variables extended _wei represent weighted average across days weekend days always weighted 2/5 relative contribution week days.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"default-argument-values","dir":"Articles","previous_headings":"","what":"Arguments/parameters description","title":"GGIR configuration parameters","text":"information shown auto-generated identical information provided GGIR package pdf manual.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"mode","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"mode","title":"GGIR configuration parameters","text":"Numeric (default = 1:5). Specify five parts need run, e.g., mode = 1 makes g.part1 run; mode = 1:5 makes whole GGIR pipeline run, g.part1 g.part5. Optionally mode can also include number 6 tell GGIR run g.part6 currently development.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"datadir","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"datadir","title":"GGIR configuration parameters","text":"Character (default = c()). Directory accelerometer files stored, e.g., “C:/mydata”, list accelerometer filenames directories, e.g. c(“C:/mydata/myfile1.bin”, “C:/mydata/myfile2.bin”).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"outputdir","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"outputdir","title":"GGIR configuration parameters","text":"Character (default = c()). Directory output needs stored. Note function attempt create folders directory uses folder keep output.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"studyname","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"studyname","title":"GGIR configuration parameters","text":"Character (default = c()). datadir folder, study given name data directory. datadir list filenames studyname specified input argument used name study.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"f0","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"f0","title":"GGIR configuration parameters","text":"Numeric (default = 1). File index start (default = 1). Index refers filenames sorted alphabetical order.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"f1","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"f1","title":"GGIR configuration parameters","text":"Numeric (default = 0). File index finish (defaults number files available).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-report","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"do.report","title":"GGIR configuration parameters","text":"Numeric (default = c(2, 4, 5, 6)). parts generate summary spreadsheet: 2, 4, 5, /6. Default c(2, 4, 5, 6). report generated based available milestone data. creating milestone data multiple machines advisable turn report generation generating milestone data, value = c(), merge milestone data turn report generation back setting overwrite FALSE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"configfile","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"configfile","title":"GGIR configuration parameters","text":"Character (default = c()). Configuration file previously generated function GGIR. See details.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"myfun","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"myfun","title":"GGIR configuration parameters","text":"List (default = c()). External function object applied raw data. See package vignette detailed tutorial examples use function embedding: https://cran.r-project.org/package=GGIR/vignettes/ExternalFunction.html","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"overwrite","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"overwrite","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). want overwrite analysis milestone data exists? overwrite = FALSE, milestone data previous analysis used available visual reports created .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"acc-metric","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"acc.metric","title":"GGIR configuration parameters","text":"Character (default = “ENMO”). one acceleration metrics want use acceleration magnitude analyses GGIR part 5 visual report? example: “ENMO”, “LFENMO”, “MAD”, “NeishabouriCount_y”, “NeishabouriCount_vm”. one acceleration metric can specified selected metric needs calculated part 1 (see g.part1) via arguments .enmo = TRUE .mad = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"maxncores","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"maxNcores","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Maximum number cores use argument .parallel set true. GGIR default uses either maximum number available cores number files process (whichever lower), argument allows set lower maximum.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"print-filename","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"print.filename","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). Whether print filename analysing (case .parallel = FALSE). Printing filename can useful investigate problems (e.g., verify file read).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-parallel","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"do.parallel","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). Whether use multi-core processing (works least 4 CPU cores available).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"windowsizes","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"windowsizes","title":"GGIR configuration parameters","text":"Numeric vector, three values (default = c(5, 900, 3600)). indicate lengths windows c(window1, window2, window3): window1 short epoch length seconds, default 5, time window acceleration angle metrics calculated; window2 long epoch length seconds non-wear signal clipping defined, default 900 (expected multitude 60 seconds); window3 window length data used non-wear detection default 3600 seconds. , window3 larger window2 use overlapping windows, window2 equals window3 non-wear periods assessed non-overlapping windows.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"desiredtz","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"desiredtz","title":"GGIR configuration parameters","text":"Character (default = ““, .e., system timezone). Timezone device configured experiments took place. experiments took place different timezone, use argument timezone experiments took place argument configtz specify device configured. Use ”TZ identifier” specified ://en.wikipedia.org/wiki/Zone.tabhttps://en.wikipedia.org/wiki/Zone.tab set desiredtz, e.g., “Europe/London”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"configtz","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"configtz","title":"GGIR configuration parameters","text":"Character (default = ““, .e., system timezone). moment functional GENEActiv .bin, AX3 cwa, ActiGraph .gt3x, ad-hoc csv file format. Timezone accelerometer configured. use argument timezone configuration timezone recording took place different. Use ”TZ identifier” specified ://en.wikipedia.org/wiki/Zone.tabhttps://en.wikipedia.org/wiki/Zone.tab set configtz, e.g., “Europe/London”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"idloc","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"idloc","title":"GGIR configuration parameters","text":"Numeric (default = 1). idloc = 1 code assumes ID number stored obvious header field. Note ActiGraph data ID never stored file header. value set 2, 5, 6, 7, GGIR looks filename extracts character string preceding first occurance “_” (idloc = 2), ” ” (space, idloc = 5), “.” (dot, idloc = 6), “-” (idloc = 7), respectively. may noticed idloc 3 4 skipped, used one study 2012, actively maintained anymore, legacy code omitted.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dayborder","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"dayborder","title":"GGIR configuration parameters","text":"Numeric (default = 0). Hour days start end (dayborder = 4 mean 4 ).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"part5_agg2_60seconds","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"part5_agg2_60seconds","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). Whether use aggregate epochs 60 seconds part GGIR g.part5 analysis. Aggregation doen averaging. Note working count metrics Neishabouri counts means threshold can stay part 2, threshold expressed relative original epoch size, even averaged per minute. example want use cut-point 100 count per minute specify mvpathreshold = 100 * (5/60) well `threshold.mod = 100 * (5/60) regardless whether set part5_agg2_60seconds TRUE FALSE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sensor-location","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"sensor.location","title":"GGIR configuration parameters","text":"Character (default = “wrist”). indicate sensor location, default wrist. hip, HDCZA algorithm sleep detection also requires longitudinal axis sensor -45 +45 degrees.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"expand_tail_max_hours","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"expand_tail_max_hours","title":"GGIR configuration parameters","text":"Numeric (default = NULL). parameter replaced recordingEndSleepHour.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"recordingendsleephour","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"recordingEndSleepHour","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Time (hours) recording end (later) expand g.part1 output synthetic data trigger sleep detection last night. Using argument recordingEndSleepHour implies assumption participant fell asleep end recording recording ended recordingEndSleepHour hour last day. assumption may always hold true used caution. synthetic data metashort entails: timestamps continuing regularly, zeros acceleration metrics EN, one EN. Angle columns created way triggers sleep detection using equation: round(sin((1:length_expansion) / (900/epochsize))) * 15. keep track tail expansion g.part1 stores length expansion RData files, passed via g.part2, g.part3, g.part4 g.part5. g.part5 tail expansion size included additional variable csv-reports. g.part4 csv-report last night omitted, know sleep estimates last night trustworthy. Similarly, g.part5 output columns related sleep assessment omitted last window avoid biasing averages. , synthetic data also ignored visualizations time series output avoid biased output.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dataformat","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"dataFormat","title":"GGIR configuration parameters","text":"Character (default = “raw”). indicate format data datadir. Alternatives: ukbiobank_csv, actiwatch_csv, actiwatch_awd, actigraph_csv, sensewear_xls, correspond epoch level data files , respecitively, UK Biobank csv format, Actiwatch csv format, Actiwatch awd format, ActiGraph csv format, Sensewear xls format (also works xlsx). , assumed epoch size UK Biobank csvdata 5 seconds. epoch size non-raw data formats flexible, make sure set first value argument windowsizes accordingly. Also working non-raw data formats specify argument extEpochData_timeformat documented . ukbiobank_csv nonwear column data , actiwatch_csv, actiwatch_awd, actigraph_csv, sensewear_xls non-wear detected 60 minute rolling zeros. length window can modified third value argument windowsizes expressed seconds.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"maxrecordinginterval","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"maxRecordingInterval","title":"GGIR configuration parameters","text":"Numeric (default = NULL). indicate maximum gap hours repeated measurements ID recordings appended. , assumption ID can matched, make sure argument idloc set correctly. argument maxRecordingInterval set NULL (default) recordings appended. recordings overlap GGIR use data latest recording. recordings separated timegap recordings filled data points resemble monitor worn. maximum value maxFile gap 504 (21 days). recordings accelerometer brand appended. part 2 csv report show number appended recordings, sampling rate , time overlap gap names filenames respective recording.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"extepochdata_timeformat","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"extEpochData_timeformat","title":"GGIR configuration parameters","text":"Character (default = “%d-%m-%Y %H:%M:%S”). specify time format used external epoch level data argument dataFormat set “actiwatch_csv”, “actiwatch_awd”, “actigraph_csv” “sensewear_xls”. example “%Y-%m-%d %:%M:%S %p” “2023-07-11 01:24:01 PM” “%m/%d/%Y %H:%M:%S” “2023-07-11 13:24:01”","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"chunksize","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"chunksize","title":"GGIR configuration parameters","text":"Numeric (default = 1). Value specify size chunks loaded fraction approximately 12 hour period auto-calibration procedure fraction 24 hour period metric calculation, e.g., 0.5 equals 6 12 hour chunks, respectively. machines less 4Gb RAM memory < 2GB memory per process using .parallel = TRUE value 1 recommended. value constrained GGIR lower 0.05. Please note setting 0.05 produce output 3rd value parameter windowsizes 3600.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"spherecrit","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"spherecrit","title":"GGIR configuration parameters","text":"Numeric (default = 0.3). minimum required acceleration value (g) sides 0 g axis. Used judge whether sphere sufficiently populated","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"minloadcrit","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"minloadcrit","title":"GGIR configuration parameters","text":"Numeric (default = 168). minimum number hours code needs read autocalibration procedure effective (sensitive multitudes 12 hrs, values ceiled). loading hours extra data loaded calibration error reduced 0.01 g.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"printsummary","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"printsummary","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE print summary calibration procedure console done.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-cal","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"do.cal","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). Whether apply auto-calibration g.calibrate. Recommended setting TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"backup-cal-coef","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"backup.cal.coef","title":"GGIR configuration parameters","text":"Character (default = “retrieve”). Option use backed-calibration coefficient instead deriving calibration coefficients analysing file twice. Argument backup.cal.coef two usecase. Use case 1: auto-calibration fails user option provide back-calibration coefficients via argument. value argument needs name directory csv-spreadsheet following column names subsequent values: “filename” names accelerometer files calibration coefficients need applied case auto-calibration fails; “scale.x”, “scale.y”, “scale.z” scaling coefficients; “offset.x”, “offset.y”, “offset.z” offset coefficients, ; “temperature.offset.x”, “temperature.offset.y”, “temperature.offset.z” temperature offset coefficients. can useful analysing short lasting laboratory experiments insufficient sphere data perform auto-calibration, calibration coefficients can derived alternative way. users responsibility compile csv-spreadsheet. Instead building file user can also Use case 2: user wants avoid performing auto-calibration repeatedly file. backup.cal.coef value set “retrieve” (default) GGIR look “data_quality_report.csv” file outputfolder QC, holds previously generated calibration coefficients. want happen, deleted data_quality_report.csv QC folder set value “redo”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dynrange","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"dynrange","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Provide dynamic range 8 gravity.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"minimumfilesizemb","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"minimumFileSizeMB","title":"GGIR configuration parameters","text":"Numeric (default = 2). Minimum File size MB required enter processing. argument can help avoid short uninformative files enter analyses. Given typical accelerometer collects several MBs per hour, default setting skip tiny files.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-dec","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.dec","title":"GGIR configuration parameters","text":"Character (default = “.”). Decimal used numbers, dec argument [utils]read.csv [data.table]fread.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-firstrow-acc","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.firstrow.acc","title":"GGIR configuration parameters","text":"Numeric (default = NULL). First row (number) acceleration data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-firstrow-header","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.firstrow.header","title":"GGIR configuration parameters","text":"Numeric (default = NULL). First row (number) header. Leave blank file header.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-header-length","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.header.length","title":"GGIR configuration parameters","text":"Numeric (default = NULL). file header, specify header length (number rows).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-col-acc","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.col.acc","title":"GGIR configuration parameters","text":"Numeric, three values (default = c(1, 2, 3)). Vector three column (numbers) acceleration signals stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-col-temp","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.col.temp","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Scalar column (number) temperature stored. Leave default setting temperature available. temperature used g.calibrate.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-col-time","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.col.time","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Scalar column (number) timestamps stored. Leave default setting timestamps stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-unit-acc","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.unit.acc","title":"GGIR configuration parameters","text":"Character (default = “g”). Character unit acceleration values: “g”, “mg”, “bit”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-unit-temp","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.unit.temp","title":"GGIR configuration parameters","text":"Character (default = “C”). Character unit temperature values: (K)elvin, (C)elsius, (F)ahrenheit.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-unit-time","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.unit.time","title":"GGIR configuration parameters","text":"Character (default = “POSIX”). Character unit timestamps: “POSIX”, “UNIXsec” (seconds since origin, see argument rmc.origin), “character”, “ActivPAL” (exotic timestamp format used ActivPAL activity monitor).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-format-time","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.format.time","title":"GGIR configuration parameters","text":"Character (default = “%Y-%m-%d %H:%M:%OS”). Character giving date-time format used [base]strptime. used rmc.unit.time: character POSIX.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-bitrate","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.bitrate","title":"GGIR configuration parameters","text":"Numeric (default = NULL). unit acceleration bit provide bit rate, e.g., 12 bit.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-dynamic_range","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.dynamic_range","title":"GGIR configuration parameters","text":"Numeric character (default = NULL). unit acceleration bit provide dynamic range deviation g zero, e.g., +/-6g mean argument needs 6. give argument character value code search file header elements name equal character value use corresponding numeric value next dynamic range.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-unsignedbit","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.unsignedbit","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). unsignedbit = TRUE means bits positive numbers. unsignedbit = FALSE bits positive negative.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-origin","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.origin","title":"GGIR configuration parameters","text":"Character (default = “1970-01-01”). Origin time unit time UNIXsec, e.g., 1970-1-1.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-desiredtz","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.desiredtz","title":"GGIR configuration parameters","text":"Character (default = NULL). Timezone experiments took place. argument scheduled deprecated now used overwrite desiredtz provided.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-configtz","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.configtz","title":"GGIR configuration parameters","text":"Character (default = NULL). Timezone device configured. argument scheduled deprecated now used overwrite configtz provided.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-sf","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.sf","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Sample rate Hertz, stored file header used instead (see argument rmc.headername.sf).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-headername-sf","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.headername.sf","title":"GGIR configuration parameters","text":"Character (default = NULL). file header: Row name sample frequency can found.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-headername-sn","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.headername.sn","title":"GGIR configuration parameters","text":"Character (default = NULL). file header: Row name serial number can found.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-headername-recordingid","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.headername.recordingid","title":"GGIR configuration parameters","text":"Character (default = NULL). file header: Row name recording ID can found.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-header-structure","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.header.structure","title":"GGIR configuration parameters","text":"Character (default = NULL). Used split header name header value, e.g., “:” ” “.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-check4timegaps","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.check4timegaps","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). indicate whether gaps time imputed zeros. sensing equipment provides accelerometer gaps time. rest GGIR designed , setting argument TRUE gaps time filled zeros.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-noise","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.noise","title":"GGIR configuration parameters","text":"Numeric (default = 13). Noise level acceleration signal m-units, used working ad-hoc .csv data formats using read.myacc.csv. read.myacc.csv take rmc.noise argument, interacting GGIR g.part1 rmc.noise used.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"nonwear_range_threshold","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"nonwear_range_threshold","title":"GGIR configuration parameters","text":"Numeric (default 150) used define maximum value range per axis non-wear detection, used combination brand specific standard deviation per axis.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-col-wear","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.col.wear","title":"GGIR configuration parameters","text":"Numeric (default = NULL). external wear detection outcome stored part data can used GGIR. argument specifies column wear detection (Boolean) stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-doresample","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.doresample","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). indicate whether resample data based available timestamps extracted sample rate file header.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"interpolationtype","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"interpolationType","title":"GGIR configuration parameters","text":"Integer (default = 1). indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"imputetimegaps","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"imputeTimegaps","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). indicate whether timegaps larger 1 sample imputed. Currently used .gt3x data ActiGraph .csv format, timegaps can expected result Actigraph’s idle sleep.mode configuration.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"frequency_tol","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"frequency_tol","title":"GGIR configuration parameters","text":"Number (default = 0.1) passed readAxivity GGIRread package. Represents frequency tolerance fraction 0 1. relative bias per data block larger fraction data block imputed lack movement gravitational oriationed guessed recent valid data block. applicable Axivity .cwa data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-scalefactor-acc","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.scalefactor.acc","title":"GGIR configuration parameters","text":"Numeric value (default 1) scale acceleration signals via multiplication. example, data provided m/s2 setting 1/9.81 derive gravitational units.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-anglex","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.anglex","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates angle X axis relative horizontal: = (^-1_rollmedian(x)(acc_rollmedian(y))^2 + (acc_rollmedian(z))^2) * 180/","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-angley","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.angley","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates angle Y axis relative horizontal: = (^-1_rollmedian(y)(acc_rollmedian(x))^2 + (acc_rollmedian(z))^2) * 180/","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-anglez","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.anglez","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE, calculates angle Z axis relative horizontal: = (^-1_rollmedian(z)(acc_rollmedian(x))^2 + (acc_rollmedian(y))^2) * 180/","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-zcx","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.zcx","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric zero-crossing count x-axis. computation specifics see source code function g.applymetrics","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-zcy","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.zcy","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric zero-crossing count y-axis. computation specifics see source code function g.applymetrics","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-zcz","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.zcz","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric zero-crossing count z-axis. computation specifics see source code function g.applymetrics","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-enmo","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.enmo","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE, calculates metric: = _x^2 + acc_y^2 + acc_z^2 - 1 (ENMO < 0, ENMO = 0).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-lfenmo","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.lfenmo","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric ENMO low-pass filtered accelerations (computation specifics see source code function g.applymetrics). filter bound defined parameter hb.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-en","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.en","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates Euclidean Norm raw accelerations: = _x^2 + acc_y^2 + acc_z^2","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-mad","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.mad","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates Mean Amplitude Deviation: = 1n|r_i - |","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-enmoa","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.enmoa","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric: = _x^2 + acc_y^2 + acc_z^2 - 1 (ENMOa < 0, ENMOa = |ENMOa|).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-roll_med_acc_x","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.roll_med_acc_x","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-roll_med_acc_y","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.roll_med_acc_y","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-roll_med_acc_z","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.roll_med_acc_z","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-dev_roll_med_acc_x","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.dev_roll_med_acc_x","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-dev_roll_med_acc_y","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.dev_roll_med_acc_y","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-dev_roll_med_acc_z","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.dev_roll_med_acc_z","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-bfen","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.bfen","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-hfen","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.hfen","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-hfenplus","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.hfenplus","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-lfen","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.lfen","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-lfx","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.lfx","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-lfy","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.lfy","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-lfz","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.lfz","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-hfx","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.hfx","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-hfy","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.hfy","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-hfz","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.hfz","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-bfx","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.bfx","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-bfy","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.bfy","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-bfz","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.bfz","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-brondcounts","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.brondcounts","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). option deprecated (October 2022) due issues activityCounts package used dependency. TRUE, calculated metric via R package activityCounts. called BrondCounts large number activity counts physical activity sleep research field. calling brondcounts clarify counts proposed Jan Brønd implemented R Ruben Brondeel. brondcounts intended imitation counts produced one closed source ActiLife software ActiGraph.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-neishabouricounts","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.neishabouricounts","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric via R package actilifecounts, implementation algorithm used closed-source software ActiLife ActiGraph (methods published doi: 10.1038/s41598-022-16003-x). use name first author (instead ActiLifeCounts) paper call NeishabouriCount uncertainty ActiLife implement algorithm time. use Neishabouri counts physical activity intensity classification part 5 (.e., metric threshold.lig, threshold.mod, threshold.vig applied), acc.metric argument needs set one following: “NeishabouriCount_x”, “NeishabouriCount_y”, “NeishabouriCount_z”, “NeishabouriCount_vm” use counts x-, y-, z-axis vector magnitude, respectively.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"hb","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"hb","title":"GGIR configuration parameters","text":"Numeric (default = 15). Higher boundary frequency filter (Hertz) used filter-based metrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"lb","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"lb","title":"GGIR configuration parameters","text":"Numeric (default = 0.2). Lower boundary frequency filter (Hertz) used filter-based metrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"n","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"n","title":"GGIR configuration parameters","text":"Numeric (default = n). Order frequency filter used filter-based metrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"zc-lb","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"zc.lb","title":"GGIR configuration parameters","text":"Numeric (default = 0.25). Used zero-crossing counts . Lower boundary cut-frequency filter.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"zc-hb","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"zc.hb","title":"GGIR configuration parameters","text":"Numeric (default = 3). Used zero-crossing counts . Higher boundary cut-frequencies filter.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"zc-sb","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"zc.sb","title":"GGIR configuration parameters","text":"Numeric (default = 0.01). Stop band used calculation zero crossing counts. Value acceleration threshold g units acceleration rounded zero.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"zc-order","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"zc.order","title":"GGIR configuration parameters","text":"Numeric (default = 2). Used zero-crossing counts . Order frequency filter.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"zc-scale","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"zc.scale","title":"GGIR configuration parameters","text":"Numeric (default = 1) Used zero-crossing counts . Scaling factor applied counts calculated (GGIR part 3).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"actilife_lfe","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"actilife_LFE","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates NeishabouriCount metric low-frequency extension filter proposed closed source ActiLife software ActiGraph. applicable metric NeishabouriCount.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"includedaycrit","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"includedaycrit","title":"GGIR configuration parameters","text":"Numeric (default = 16). Minimum required number valid hours calendar day specific analysis part 2. specify two values c(16, 16) first value used part 2 second value used part 5 applied criterion full part 5 window. Note applied addition parameter includedaycrit.part5 looks valid data waking hours.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ndayswindow","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"ndayswindow","title":"GGIR configuration parameters","text":"Numeric (default = 7). data_masking_strategy set 3 5, size window number days. data_masking_strategy 3 value can fractional, e.g. 7.5, data_masking_strategy 5 needs integer.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"strategy","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"strategy","title":"GGIR configuration parameters","text":"Deprecated replaced data_masking_strategy. strategy specified value passed used data_masking_strategy.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"data_masking_strategy","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"data_masking_strategy","title":"GGIR configuration parameters","text":"Numeric (default = 1). deal knowledge study protocol. data_masking_strategy = 1 means select data based hrs.del.start hrs.del.end. data_masking_strategy = 2 makes data first midnight last midnight used. data_masking_strategy = 3 selects active X days file X specified argument ndayswindow, days series 24-h blocks starting time day (X hours beginning end period can deleted arguments hrs.del.start hrs.del.end) data_masking_strategy = 4 use data first midnight. data_masking_strategy = 5 similar data_masking_strategy = 3, selects X complete calendar days X specified argument ndayswindow (X hours beginning end period can deleted arguments hrs.del.start hrs.del.end).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"maxdur","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"maxdur","title":"GGIR configuration parameters","text":"Numeric (default = 0). many DAYS start experiment experiment definitely stop? (set zero unknown).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"hrs-del-start","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"hrs.del.start","title":"GGIR configuration parameters","text":"Numeric (default = 0). many HOURS start experiment wearing monitor start? Used GGIR g.part2 data_masking_strategy = 1.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"hrs-del-end","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"hrs.del.end","title":"GGIR configuration parameters","text":"Numeric (default = 0). many HOURS end experiment wearing monitor definitely end? Used GGIR g.part2 data_masking_strategy = 1.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"includedaycrit-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"includedaycrit.part5","title":"GGIR configuration parameters","text":"Numeric (default = 2/3). Inclusion criteria used part 5 number valid hours waking hours day, value smaller equal 1 used fraction waking hours, value 1 used absolute number valid hours required. confuse argument argument includedaycrit used GGIR part 2 applies entire day.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"excludefirstlast-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"excludefirstlast.part5","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE first last window (waking-waking, midnight-midnight, sleep onset-onset) ignored g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"timesegments2zerofile","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"TimeSegments2ZeroFile","title":"GGIR configuration parameters","text":"Character (default = NULL). Takes path csv file columns “windowstart” “windowend” refer start end time time windows format “2024-10-12 20:00:00”, “filename” GGIR milestone data file without “meta_” segment name. GGIR part 2 uses set acceleration values zero non-wear classification zero (meaning sensor worn). Motivation: accelerometer worn night GGIR automatically labels invalid, user may like treat zero movement. Disclaimer: functionality developed 2019. hindsight generic enough need revision. Please contact GGIR maintainers like us invest time improving functionality.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-imp","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"do.imp","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). Whether impute missing values (e.g., suspected monitor non-wear clippling) g.impute GGIR g.part2. Recommended setting TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"data_cleaning_file","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"data_cleaning_file","title":"GGIR configuration parameters","text":"Character (default = NULL). Optional path csv file create holds four columns: ID, day_part5, relyonguider_part4, night_part4. ID hold participant ID. Columns day_part5 night_part4 allow specify day(s) night(s) need excluded g.part5 g.part4, respectively. including multiple day(s)/night(s) create new line day/night. , done regardless whether rest GGIR thinks day(s)/night(s) valid. Column relyonguider_part4 allows specify nights g.part4 fully rely guider. See also package vignette.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"minimum_mm_length-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"minimum_MM_length.part5","title":"GGIR configuration parameters","text":"Numeric (default = 23). Minimum length hours MM day included cleaned g.part5 results.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"excludefirstlast","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"excludefirstlast","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE first last night measurement ignored sleep assessment g.part4.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"includenightcrit","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"includenightcrit","title":"GGIR configuration parameters","text":"Numeric (default = 16). Minimum number valid hours per night (24 hour window noon noon), used sleep assessment g.part4.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"excludefirst-part4","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"excludefirst.part4","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE first night measurement ignored sleep assessment g.part4.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"excludelast-part4","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"excludelast.part4","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE last night measurement ignored sleep assessment g.part4.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"max_calendar_days","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"max_calendar_days","title":"GGIR configuration parameters","text":"Numeric (default = 0). maximum number calendar days include (set zero unknown).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"nonwearedgecorrection","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"nonWearEdgeCorrection","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE non-wear detection around edges recording (first last 3 hours) corrected following description vanHees2013 default since . functionality advisable working sleep clinic exercise lab data typically lasting less day.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"nonwear_approach","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"nonwear_approach","title":"GGIR configuration parameters","text":"Character (default = “2023”). Whether use traditional version non-wear detection algorithm (nonwear_approach = “2013”) new version (nonwear_approach = “2023”). 2013 version use longsize window (windowsizes[3], one hour default) check conditions nonwear identification flag nonwear mediumsize window (windowsizes[2], 15 min default) middle. 2023 version differs flag nonwear full longsize window. 2013 method longsize window centered centre mediumsize window, 2023 method longsizewindow aligned left edge left edge mediumsize window.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"segmentwearcrit-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"segmentWEARcrit.part5","title":"GGIR configuration parameters","text":"Numeric (default = 0.5). Fraction qwindow segment expected valid part 5, 0.3 indicates least 30 percent time valid.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"segmentdaysptcrit-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"segmentDAYSPTcrit.part5","title":"GGIR configuration parameters","text":"Numeric vector length 2 (default = c(0.9, 0)). Inclusion criteria proportion segment classified day (awake) spt (sleep period time) considered valid. interested comparing time spent behaviour better set one two numbers 0, defines proportion segment classified day spt, respectively. default setting focus waking hour segments includes segments overlap least 90 percent waking hours. order shift focus SPT use c(0, 0.9) ensures segments overlap least 90 percent SPT included. Setting zero problematic comparing time spent behaviours days individuals: complete segment averaged incomplete segments (someone going bed waking middle segment) longer clear whether person less active sleeps segment. Similarly clear whether person wakefulness SPT segment woke went bed segment.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"study_dates_file","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"study_dates_file","title":"GGIR configuration parameters","text":"Character (default = c()). Full path csv file containing first last date expected wear period every study participant (dates provided per individual). Expected format activity diary : First column headers followed one row per recording. three columns: first column recording ID, needs match ID GGIR extracts accelerometer file; second column contain first date study; third column last date study. Date columns default format “23-04-2017”, date format specified argument study_dates_dateformat (). specified (default), GGIR use first last day recording beginning end study. Note dates used top data_masking_strategy selected.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"study_dates_dateformat","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"study_dates_dateformat","title":"GGIR configuration parameters","text":"Character (default = “%d-%m-%Y”). specify date format used study_dates_file used [base]strptime.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"anglethreshold","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"anglethreshold","title":"GGIR configuration parameters","text":"Numeric (default = 5). Angle threshold (degrees) sustained inactivity periods detection. algorithm look periods time (timethreshold) angle variability lower anglethreshold. can specified multiple thresholds, implemented, e.g., anglethreshold = c(5,10).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"timethreshold","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"timethreshold","title":"GGIR configuration parameters","text":"Numeric (default = 5). Time threshold (minutes) sustained inactivity periods detection. algorithm look periods time (timethreshold) angle variability lower anglethreshold. can specified multiple thresholds, implemented, e.g., timethreshold = c(5,10).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ignorenonwear","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"ignorenonwear","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE ignore detected monitor non-wear periods avoid confusion monitor non-wear time sustained inactivity.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"haspt-algo","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"HASPT.algo","title":"GGIR configuration parameters","text":"Character (default = “HDCZA”). indicate algorithm used sleep period time detection. Default “HDCZA” Heuristic algorithm looking Distribution Change Z-Angle described van Hees et al. 2018. options included: “HorAngle”, based HDCZA replaces non-movement detection HDCZA algorithm looking time segments angle longitudinal sensor axis angle relative horizontal plane -45 +45 degrees. “NotWorn” also HDCZA looks time segments rolling average acceleration magnitude 5 per cent standard deviation, see Cookbook vignette Annexes https://wadpac.github.io/GGIR/ detailed guidance use “NotWorn”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"hasib-algo","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"HASIB.algo","title":"GGIR configuration parameters","text":"Character (default = “vanHees2015”). indicate algorithm used define sustained inactivity bouts (.e., likely sleep). Options: “vanHees2015”, “Sadeh1994”, “Galland2012”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sadeh_axis","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"Sadeh_axis","title":"GGIR configuration parameters","text":"Character (default = “Y”). indicate axis use Sadeh1994 algorithm, algortihms relied count-based Actigraphy Galland2012.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"longitudinal_axis","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"longitudinal_axis","title":"GGIR configuration parameters","text":"Integer (default = NULL). indicate axis longitudinal axis. provided, function estimate longitudinal axis axis highest 24 hour lagged autocorrelation. used sensor.location = “hip” HASPT.algo = “HorAngle”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"haspt-ignore-invalid","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"HASPT.ignore.invalid","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). indicate whether invalid time segments ignored heuristic guiders. FALSE (default), imputed angle activity metric invalid time segments used. TRUE, invalid time segments ignored (.e., contribute guider). NA, invalid time segments considered movement segments can contribute guider. HASPT.algo “NotWorn”, HASPT.ignore.invalid automatically set NA.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"loglocation","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"loglocation","title":"GGIR configuration parameters","text":"Character (default = NULL). Path csv file sleep log information. See package vignette format file.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"colid","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"colid","title":"GGIR configuration parameters","text":"Numeric (default = 1). Column number sleep log spreadsheet participant ID code stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"coln1","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"coln1","title":"GGIR configuration parameters","text":"Numeric (default = 2). Column number sleep log spreadsheet onset first night starts.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"nnights","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"nnights","title":"GGIR configuration parameters","text":"Numeric (default = NULL). argument deprecated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"relyonguider","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"relyonguider","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). Sustained inactivity bouts (sib) overlap guider labelled sleep. relyonguider = FALSE sib overlaps partially guider sib defines edge SPT window guider. relyonguider = TRUE sib overlaps partially guider guider defines edge SPT window sib. participants instructed wear accelerometer waking hours ignorenonware=FALSE set relyonguider=TRUE, scenarios set FALSE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"def-noc-sleep","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"def.noc.sleep","title":"GGIR configuration parameters","text":"Numeric (default = 1). time window sustained inactivity assumed represent sleep, e.g., def.noc.sleep = c(21, 9). used sleep log entry available. left blank def.noc.sleep = c() 12 hour window centred least active 5 hours 24 hour period used instead. , L5 hardcoded change changing argument winhr function g.part2. def.noc.sleep filled single integer, e.g., def.noc.sleep=c(1) window detected based built algorithms. See argument HASPT.algo HASPT specifying algorithms use.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sleeplogsep","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"sleeplogsep","title":"GGIR configuration parameters","text":"Character (default = NULL). argument deprecated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sleepwindowtype","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"sleepwindowType","title":"GGIR configuration parameters","text":"Character (default = “SPT”). indicate type information sleeplog, “SPT” sleep period time. Set “TimeInBed” sleep log recorded time bed enable calculation sleep latency sleep efficiency.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"possible_nap_window","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"possible_nap_window","title":"GGIR configuration parameters","text":"Numeric (default = c(9, 18)). Numeric vector length two range clock hours naps assumed take place, e.g., possible_nap_window = c(9, 18). Currently used context explorative nap classification algortihm trained 3.5 year olds.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"possible_nap_dur","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"possible_nap_dur","title":"GGIR configuration parameters","text":"Numeric (default = c(15, 240)). Numeric vector length two range duration (minutes) nap, e.g., possible_nap_dur = c(15, 240). Currently used context explorative nap classification algortihm trained 3.5 year olds.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"nap_model","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"nap_model","title":"GGIR configuration parameters","text":"Character (default = NULL). specify classification model. Currently option “hip3yr”, corresponds model trained hip data 3-3.5 olds trained parent diary data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sleepefficiency-metric","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"sleepefficiency.metric","title":"GGIR configuration parameters","text":"Numeric (default = 1). 1 (default), sleep efficiency calculated detected sleep time SPT window divided log-derived time bed. 2, sleep efficiency calculated detected sleep time SPT window divided detected duration sleep period time plus sleep latency (sleep latency refers difference time bed sleep onset). sleepefficiency.metric considered argument sleepwindowType = “TimeInBed”","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"possible_nap_edge_acc","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"possible_nap_edge_acc","title":"GGIR configuration parameters","text":"Numeric (default = Inf). Maximum acceleration SIB nap considered. default allow possible naps.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"hdcza_threshold","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"HDCZA_threshold","title":"GGIR configuration parameters","text":"Numeric (default = c()) HASPT.algo set “HDCZA” HDCZA_threshold NULL, (e.g., HDCZA_threshold = 0.2), value used threshold 6th step diagram Figure 1 van Hees et al. 2018 Scientific Report (doi: 10.1038/s41598-018-31266-z). However, supported research yet intended facilitate methodological research, advise sticking default line publication. , HDCZA_threshold set numeric vector length 2, e.g. c(10, 15), used percentile multiplier mentioned 6th step.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"mvpathreshold","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"mvpathreshold","title":"GGIR configuration parameters","text":"Numeric (default = 100). Acceleration threshold MVPA estimation GGIR g.part2. can single number vector numbers, e.g., mvpathreshold = c(100, 120). latter case code estimate MVPA separately threshold. variable left blank, e.g., mvpathreshold = c(), MVPA estimated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutcriter","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutcriter","title":"GGIR configuration parameters","text":"Numeric (default = 0.8). number 0 1, defines fraction bout needs mvpathreshold, used GGIR g.part2.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"mvpadur","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"mvpadur","title":"GGIR configuration parameters","text":"Numeric (default = 10). bout duration(s) MVPA calculated. used GGIR g.part2.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutcriter-in","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutcriter.in","title":"GGIR configuration parameters","text":"Numeric (default = 0.9). number 0 1, defines fraction bout needs threshold.lig.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutcriter-lig","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutcriter.lig","title":"GGIR configuration parameters","text":"Numeric (default = 0.8). number 0 1, defines fraction bout needs threshold.lig threshold.mod.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutcriter-mvpa","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutcriter.mvpa","title":"GGIR configuration parameters","text":"Numeric (default = 0.8). number 0 1, defines fraction bout needs threshold.mod.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"threshold-lig","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"threshold.lig","title":"GGIR configuration parameters","text":"Numeric (default = 40). g.part5: Threshold light physical activity separate inactivity light. Value can one number vector multiple numbers, e.g., threshold.lig =c(30,40). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"threshold-mod","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"threshold.mod","title":"GGIR configuration parameters","text":"Numeric (default = 100). g.part5: Threshold moderate physical activity separate light moderate. Value can one number vector multiple numbers, e.g., threshold.mod = c(100, 120). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"threshold-vig","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"threshold.vig","title":"GGIR configuration parameters","text":"Numeric (default = 400). g.part5: Threshold vigorous physical activity separate moderate vigorous. Value can one number vector multiple numbers, e.g., threshold.vig =c(400,500). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutdur-mvpa","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutdur.mvpa","title":"GGIR configuration parameters","text":"Numeric (default = c(1, 5, 10)). Duration(s) MVPA bouts minutes extracted. start identification longest shortest duration. default setting, start 10 minute bouts, followed 5 minute bouts rest data, followed 1 minute bouts rest data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutdur-in","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutdur.in","title":"GGIR configuration parameters","text":"Numeric (default = c(10, 20, 30)). Duration(s) inactivity bouts minutes extracted. Inactivity bouts detected segments data labelled sleep MVPA bouts. start identification longest shortest duration. default setting, start identification 30 minute bouts, followed 20 minute bouts rest data, followed 10 minute bouts rest data. Note use term inactivity instead sedentary behaviour lowest intensity level behaviour. reason GGIR attempt classifying activity type sitting moment, feel using term sedentary behaviour fail communicate .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutdur-lig","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutdur.lig","title":"GGIR configuration parameters","text":"Numeric (default = c(1, 5, 10)). Duration(s) light activity bouts minutes extracted. Light activity bouts detected segments data labelled sleep, MVPA, inactivity bouts. start identification longest shortest duration. default setting, start identification 10 minute bouts, followed 5 minute bouts rest data, followed 1 minute bouts rest data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"frag-metrics","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"frag.metrics","title":"GGIR configuration parameters","text":"Character (default = NULL). Fragmentation metric extract. Can “mean”, “TP”, “Gini”, “power”, “CoV”, “NFragPM”, metrics “”. See package vignette description fragmentation metrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"part6_threshold_combi","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"part6_threshold_combi","title":"GGIR configuration parameters","text":"Character (default = “40_100_120”) indicate threshold combination derived part 5 used part 6","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"qwindow","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"qwindow","title":"GGIR configuration parameters","text":"Numeric character (default = c(0, 24)). specify windows variables calculated, e.g., acceleration distribution, number valid hours, LXMX analysis, MVPA. numeric, qwindow length two, e.g., qwindow = c(0, 24), variables calculated full 24 hours day. qwindow = c(8, 24) variables calculated window 0-8, 8-24 0-24. days recording segmented based values. want use day specific segmentation day can set qwindow full path activity diary file (character). Expected format activity diary : First column headers followed one row per recording, first column recording ID, needs match ID GGIR extracts accelerometer file. Followed date column format “23-04-2017”, date format specified argument qwindow_dateformat (). Use character combination date, Date DATE column name. followed one multiple columns start times activity types day format hours:minutes:seconds. header column used label activity type. Insert new date column continuing activity types next day. Leave missing values empty. activity log used individuals appear activity log still processed value qwindow = c(0, 24). Dates activity log data can skipped, need column date followed column next date. times activity diary multiple short window size (epoch length), next epoch considered (e.g., epoch 5 seconds, 8:00:02 redefined 8:00:05 activity log). using qwindow functionality combination GGIR part 5 make sure check arguments segmentWEARcrit.part5 segmentDAYSPTcrit.part5 specified research needs.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"qlevels","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"qlevels","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Vector percentiles value needs extracted. need expressed fraction 1, e.g., c(0.1, 0.5, 0.75). limit number percentiles. left empty percentiles extracted. Distribution derived short epoch metric data. Argument qlevels can example used MX-metrics (e.g. Rowlands et al) discussed ://cran.r-project.org/package=GGIR/vignettes/GGIR.htmlmain package vignette","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"qwindow_dateformat","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"qwindow_dateformat","title":"GGIR configuration parameters","text":"Character (default = “%d-%m-%Y”). specify date format used activity log used [base]strptime.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ilevels","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"ilevels","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Levels acceleration value frequency distribution m, e.g., ilevels = c(0,100,200). limit number levels. left empty intensity levels extracted. Distribution derived short epoch metric data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ivis_windowsize_minutes","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"IVIS_windowsize_minutes","title":"GGIR configuration parameters","text":"Numeric (default = 60). Window size Intradaily Variability (IV) Interdaily Stability () metrics minutes, needs able add 24 hours.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ivis_epochsize_seconds","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"IVIS_epochsize_seconds","title":"GGIR configuration parameters","text":"Numeric (default = NULL). argument deprecated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ivis-activity-metric","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"IVIS.activity.metric","title":"GGIR configuration parameters","text":"Numeric (default = 2). Metric used activity calculation. Value = 1, uses continuous scaled acceleration. Value = 2, tries collapse acceleration binary score rest versus active try simulate original approach.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ivis_acc_threshold","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"IVIS_acc_threshold","title":"GGIR configuration parameters","text":"Numeric (default = 20). Acceleration threshold distinguish inactive active.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"qm5l5","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"qM5L5","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Percentiles (quantiles) calculated L5 M5 window.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"mx-ig-min-dur","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"MX.ig.min.dur","title":"GGIR configuration parameters","text":"Numeric (default = 10). Minimum MX duration needed order intensity gradient calculated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"m5l5res","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"M5L5res","title":"GGIR configuration parameters","text":"Numeric (default = 10). Resolution L5 M5 analysis minutes.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"winhr","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"winhr","title":"GGIR configuration parameters","text":"Numeric (default = 5). Vector window size(s) (unit: hours) LX MX analysis, look least active consecutive number X hours.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"iglevels","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"iglevels","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Levels acceleration value frequency distribution mused intensity gradient calculation (according method Rowlands 2018). default argument empty intensity gradient calculation done. user can either provide single value () make intensity gradient use bins iglevels = c(seq(0,4000,=25), 8000) user specify distribution. constriction number levels.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"luxthresholds","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"LUXthresholds","title":"GGIR configuration parameters","text":"Numeric (default = c(0, 100, 500, 1000, 3000, 5000, 10000)). Vector numeric sequence corresponding thresholds used calculate time spent LUX ranges.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"lux_cal_constant","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"LUX_cal_constant","title":"GGIR configuration parameters","text":"Numeric (default = NULL). LUX_cal_constant LUX_cal_exponent provided LUX values converted based formula y = constant * exp(x * exponent)","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"lux_cal_exponent","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"LUX_cal_exponent","title":"GGIR configuration parameters","text":"Numeric (default = NULL). LUX_cal_constant LUX_cal_exponent provided LUX LUX values converted based formula y = constant * exp(x * exponent)","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"lux_day_segments","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"LUX_day_segments","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Vector hours day segmented LUX analysis.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"l5m5window","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"L5M5window","title":"GGIR configuration parameters","text":"Argument deprecated version 1.5-24. argument used define start end time, 24 hour clock hours, L5M5 needs calculated. Now done argument qwindow.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"cosinor","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"cosinor","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). Whether apply cosinor analysis ActCR package.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"part6cr","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"part6CR","title":"GGIR configuration parameters","text":"Boolean (default = FALSE) indicate whether circadian rhythm analysis run part 6.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"part6hca","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"part6HCA","title":"GGIR configuration parameters","text":"Boolean (default = FALSE) indicate whether Household Co Analysis run part 6.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"part6window","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"part6Window","title":"GGIR configuration parameters","text":"Character vector length two (default = c(“start”, “end”)) indicate start end time series used circadian rhythm analysis part 6. words, parameters used Household co-analysis. Alternative values : “Wx”, “Ox”, “Hx”, “x” number indicat xth wakeup, onset hour recording. Negative values “x” also possible count relative end recording. example, c(“W1”, “W-1”) goes first till last wakeup, c(“H5”, “H-5”) ignores first last 5 hours, c(“O2”, “W10”) goes second onset till 10th wakeup time.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"epochvalues2csv","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"epochvalues2csv","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). g.part2: TRUE epoch values exported csv file. , non-wear time imputed possible.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"save_ms5rawlevels","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"save_ms5rawlevels","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). g.part5: Whether save time series classification (levels) csv RData files (defined save_ms5raw_format). Note time stamps stored column timenum UTC format (.e., seconds 1970-01-01). convert timenum time stamp format, need specify desired time zone, e.g., .POSIXct(mdat$timenum, tz = “Europe/London”).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"save_ms5raw_format","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"save_ms5raw_format","title":"GGIR configuration parameters","text":"Character (default = “csv”). g.part5: specify data stored: either “csv” “RData”. used save_ms5rawlevels = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"save_ms5raw_without_invalid","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"save_ms5raw_without_invalid","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). g.part5: indicate whether remove invalid days time series output files. used save_ms5rawlevels = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"storefolderstructure","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"storefolderstructure","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). Store folder structure accelerometer data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"timewindow","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"timewindow","title":"GGIR configuration parameters","text":"Character (default = c(“MM”, “WW”)). g.part5: Timewindow summary statistics derived. Value can “MM” (midnight midnight), “WW” (waking time waking time), “OO” (sleep onset sleep onset), combination .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"viewingwindow","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"viewingwindow","title":"GGIR configuration parameters","text":"Numeric (default = 1). Centre day displayed around noon (viewingwindow = 1) around midnight (viewingwindow = 2) visual report generated visualreport = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dofirstpage","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"dofirstpage","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). indicate whether first page histograms summarizing whole measurement added file summary reports generated visualreport = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"visualreport","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"visualreport","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE, generate visual report based combined output g.part2 g.part4. Please note visual report initially developed provide something show study participants data quality checking purposes. time improved visual report also useful QC-ing data. However, scorings shown visual report created visual report may reflect scorings main GGIR analyses reported quantitative csv-reports. effort past 10 years gone making sure csv-report correct, visualreport mostly side project. unfortunate hope find funding future design new report specifically purpose QC-ing analyses done GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"week_weekend_aggregate-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"week_weekend_aggregate.part5","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). g.part5: indicate whether week weekend-days aggregates stored. turned default generates large number extra columns output report.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-part3-pdf","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"do.part3.pdf","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). g.part3: Whether generate pdf g.part3.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"outliers-only","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"outliers.only","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). g.part4: used .visual = TRUE. FALSE, available nights included visual representation data sleeplog. TRUE, nights difference onset waking time larger variable argument criterror included.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"criterror","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"criterror","title":"GGIR configuration parameters","text":"Numeric (default = 3). g.part4: used .visual = TRUE outliers.= TRUE. criterror specifies number minimum number hours difference sleep log accelerometer estimate night included visualisation.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-visual","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"do.visual","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). g.part4: TRUE, function generate pdf visual representation overlap sleeplog entries accelerometer detections. can used visually verify sleeplog entries come obvious mistakes.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-sibreport","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"do.sibreport","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). g.part4: indicate whether generate report sustained inactivity bouts (SIB). set TRUE advanced sleep diary available part 4 part 5 use generate summary statistics overlap self-reported nonwear napping SIB. , SIB can filter based argument possible_nap_edge_acc first value possible_nap_dur","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-part2-pdf","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"do.part2.pdf","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). g.part2: Whether generate pdf g.part2.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sep_reports","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"sep_reports","title":"GGIR configuration parameters","text":"Character (default = “,”). Value used sep argument [data.table]fwrite writing csv reports.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sep_config","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"sep_config","title":"GGIR configuration parameters","text":"Character (default = “,”). Value used sep argument [data.table]fwrite writing csv config file.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dec_reports","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"dec_reports","title":"GGIR configuration parameters","text":"Character (default = “.”). Value used dec argument [data.table]fwrite writing csv reports.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dec_config","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"dec_config","title":"GGIR configuration parameters","text":"Character (default = “.”). Value used dec argument [data.table]fwrite writing csv config file.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"visualreport_without_invalid","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"visualreport_without_invalid","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE, reports generated visualreport = TRUE show windows sufficiently valid data according includedaycrit viewingwindow = 1 includenightcrit viewingwindow = 2","code":""},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"accelerometer-file-names","dir":"Articles","previous_headings":"","what":"Accelerometer file names","title":"Household Co-Analysis","text":"household co-analysis requires households family member can recognised. assume following logic file names: StudyNumber-HouseholdID-MemberID_anyotherinformation.bin example .bin file, applies .cwa .csv files. example files: 001-002-001_12345-2023.bin 001-002-002_23456-2023.bin 001-002-M_23456-2023.bin recognised household ID 002 member IDs 001, 002, M.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"configuring-ggir","dir":"Articles","previous_headings":"","what":"Configuring GGIR","title":"Household Co-Analysis","text":"following input arguments needed run Household co-analysis: Household co-analysis integrated GGIR part 6, need run GGIR part 1 6, mode = 1:6. windowsizes = c(5, 60, 3600). Setting second value 60 ensures light temperature, available, aggregated per minute. part5_agg2_60seconds = TRUE. ensures GGIR part 5 stores time series 1 minute resolution. part6HCA = TRUE tell GGIR perform Household Co-Analysis. part6_threshold_combi = \"30_100_400\" 30, 100 400 need correspond accelerometer threshold combination used part 5 want use part 6. GGIR part 5 facilitates multiple threshold combinations part 6 need select one. GGIR arguments can set according needs. example:","code":"datadir = \"C:/projects/studyZ/binfiles\" outputdir = \"C:/projects/studyZ\" library(GGIR) GGIR(mode = 1:5, datadir = datadir, idloc = 2, outputdir = outputdir, do.report = c(2, 4, 5), do.parallel = TRUE, overwrite = FALSE, printsummary = TRUE, desiredtz = \"America/Halifax\", windowsizes = c(5, 60, 3600), threshold.lig = 30, threshold.mod = 100, threshold.vig = 400, part6_threshold_combi = \"30_100_400\", boutcriter.in = 1, boutcriter.lig = 1, boutcriter.mvpa = 0.9, boutdur.in = 30, boutdur.lig = 10, boutdur.mvpa = 5, part6HCA = TRUE, save_ms5rawlevels = TRUE, # Not necessary because GGIR will set this to TRUE when part6HCA is TRUE. save_ms5raw_without_invalid = FALSE, # <= Needed for household co-analysis part5_agg2_60seconds = TRUE, visualreport = FALSE)"},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"household-co-analysis","dir":"Articles","previous_headings":"","what":"Household co-analysis","title":"Household Co-Analysis","text":"GGIR part 1, 2, 3, 4, 5 recording processed individually without considering relations recordings. Next, part 6 subdivided alligning time series produced part 1 5 per household, pairwise analysis data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"align-individuals","dir":"Articles","previous_headings":"Household co-analysis","what":"Align individuals","title":"Household Co-Analysis","text":"Household members one member ignored. Next, per household per household member code loads merges time series produced GGIR part 1 part 5. Days, defined waking-waking-, removed less 20% valid data waking hours, sleep period time window, day whole. Next, time series completed indicates valid household member pairs time points. Finally, store: aligned time series per household separate csv files GGIR output directory (.../results/part6HouseholdCoAnalysis/alignedTimeseries). columns file documented . pdf file names timeseriesPlot.pdf plots aligned time series facilitate visual inspection data completeness per household.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"pairwise-analysis","dir":"Articles","previous_headings":"Household co-analysis","what":"Pairwise analysis","title":"Household Co-Analysis","text":"Per household identify possible member pairs loop pairs. Per member pair code identify wake-time pairs. , wake-times occur within last 15 minutes time series ignored need least recording time quantify behaviour waking . Per wake-pair assess woke first second, time difference, corresponding calendar dates waking . Next, code quantifies: Activity person first woke minute second person woke Activity second person wake woke LUX person first woke tminute second person woke LUX second person wake woke . Describe matching waking hours pairs: Correlation continuous acceleration values (ENMO metric) Derive binary class inactivity/active (ENMO metric, threshold < 50) ICC based binary scores (irr package, model=twoway, type=agreement, unit=single) Cohen’s Kappa (psych package) Similarity binary scores (calculation line Sleep Regularity Index) Describe noon-noon window stronger focus sleep: Describe binary class sleep/wakefulness (note: attempt classify daytime naps) ICC based binary scores (irr package, model=twoway, type=agreement, unit=single) Cohen’s Kappa (psych package) Similarity binary scores (calculation line Sleep Regularity Index) Describe wakefulness dynamics SPT prior wakeup: Look indices spt prior wakeup individuals SPT. Assess fraction data valid Identify wake times night wake-time: Assess whether persons woke time, person wake within 5 minutes, person wake within 5 minutes. Store output csv one row per unique household pair, columns clarify household members pair household .","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"alignedtimesieres","dir":"Articles","previous_headings":"Output variables","what":"alignedTimesieres","title":"Household Co-Analysis","text":"GGIR output folder .../results/part6HouseholdCoAnalysis/alignedTimeseries find csv files time series per household. data dictionary shows column names get household two members: X Y. columns copied time series output files, documented . Therefore, column documented .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"pairwise-summary-report","dir":"Articles","previous_headings":"Output variables","what":"Pairwise summary report","title":"Household Co-Analysis","text":"stored inside pairwise_summary_all_housholds.csv","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Reading csv files with raw data in GGIR","text":"GGIR can automatically read data -frequently used accelerometer brands field: GENEActiv .bin Axivity AX3 AX6 .wav, .csv .cwa ActiGraph .csv .gt3x (.gt3x newer format generated firmware versions 2.5.0). Note Actigraph users: want work .csv exports via ActiLife note option export data timestamps. Please causes memory issues GGIR. cope absence timestamps GGIR re-caculate timestamps sample frequency start time date presented file header Movisens data stored folders Genea (accelerometer commercially available anymore, used studies 2007 2012) .bin .csv However, accelerometer manufacturers proliferating increasing number brands market. reason, GGIR includes read.myacc.csv function, able read accelerometer raw triaxial data stored csv files, independently brand. vignette provides general introduction use GGIR read accelerometer raw data stored csv files. works: Internally GGIR loads csv files accelerometer data standardises output format make data compatible GGIR functions. Data format standardisation includes unit measurement, timestamp, header format, column locations.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"the-read-myacc-csv-function","dir":"Articles","previous_headings":"","what":"The read.myacc.csv function","title":"Reading csv files with raw data in GGIR","text":"rest GGIR functions, read.myacc.csv intended used within function GGIR. arguments read.myacc.csv can easily recognized start “rmc”. GGIR function checks whether argument rmc.firstrow.acc provided user; case, GGIR attempt read data read.myacc.csv. words always need specify rmc.firstrow.acc use read.myacc.csv.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"input-arguments","dir":"Articles","previous_headings":"The read.myacc.csv function","what":"Input arguments","title":"Reading csv files with raw data in GGIR","text":"read.myacc.csv function tries read csv files wide variety formats, key arguments specify depend characteristics csv file process. Overall, argument relevant, left default setting (e.g., csv file contain temperature data, arguments related temperature settings left default values). present summary available input arguments. Please see parameters vignette elaborate description input arguments. , arguments also covered function documentation read.myacc.csv function.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"general-arguments","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"General arguments","title":"Reading csv files with raw data in GGIR","text":"rmc.file - Filename file read working directory, full path file otherwise. rmc.nrow - Number rows read, nrow argument nrows . whole file read default (.e., rmc.nrow = Inf). rmc.skip - Number rows skip, skip argument . rmc.dec - Decimal separator used numbers, dec argument data.table::. “.” (default) usually “,”. rmc.firstrow.acc - First row (number) acceleration data. rmc.unit.acc - Character unit acceleration values: “g”, “mg”, “bit”. rmc.desiredtz - Timezone device worn. rmc.confgitz - Timezone device configured. rmc.sf - Sample rate Hertz, stored file header used instead.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"header","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments for files containing a header","title":"Reading csv files with raw data in GGIR","text":"rmc.firstrow.header - First row (number) header. Leave blank (default) file header. rmc.header.length - file header, specify header length (numeric). rmc.headername.sf - file header, row name (character) sample frequency can found. rmc.headername.sn - file header, row name (character) serial number can found. rmc.headername.recordingid - file header, row name (character) recording ID can found. rmc.header.structure - Character used split header name header value, e.g. “:” ” “.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"arguments-for-files-including-timestamps","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments for files including timestamps","title":"Reading csv files with raw data in GGIR","text":"rmc.col.time - Scalar column (number) timestamps stored. Leave default setting timestamps stored. rmc.unit.time - Character unit timestamps: “POSIX”, “UNIXsec” (seconds since origin, see argument rmc.origin), “character”, “ActivPAL” (exotic timestamp format used ActivPAL activity monitor). rmc.format.time - Character string giving date-time format used . used rmc.unit.time: character POSIX. rmc.origin - Origin time unit time UNIXsec, e.g. 1970-1-1.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"arguments-for-files-with-acceleration-stored-in-bits","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments for files with acceleration stored in bits","title":"Reading csv files with raw data in GGIR","text":"rmc.bitrate - Numeric: unit acceleration bit provide bit rate, e.g. 12 bit. rmc.dynamic_range - Numeric, unit acceleration bit provide dynamic range deviation g zero, e.g. +/-6g mean argument needs 6. give argument character value code search file header elements name equal character value use corresponding numeric value next dynamic range. rmc.unsignedbit - Boolean, unsignedbit = TRUE means bits positive numbers. unsignedbit = FALSE bits positive negative.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"arguments-for-files-including-temperature","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments for files including temperature","title":"Reading csv files with raw data in GGIR","text":"rmc.col.temp - Scalar column (number) temperature stored. Leave default setting temperature avaible. temperature used . rmc.unit.temp - Character unit temperature values: (K)elvin, (C)elsius, (F)ahrenheit.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"arguments-for-files-including-wear-time-information","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments for files including wear time information","title":"Reading csv files with raw data in GGIR","text":"rmc.col.wear - external wear detection outcome stored part data can used GGIR. argument specifies column wear detection (Boolean) stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"arguments-to-find-time-gaps-and-resampling","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments to find time gaps and resampling","title":"Reading csv files with raw data in GGIR","text":"rmc.check4timegaps - Boolean indicate whether gaps time imputed zeros. rmc.doresample - Boolean indicate whether resample data based available timestamps extracted sample rate file header interpolationType - Integer indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"usage-of-the-read-myacc-csv-function","dir":"Articles","previous_headings":"","what":"Usage of the read.myacc.csv function","title":"Reading csv files with raw data in GGIR","text":"section shows example real case read.myacc.csv function can used. csv file read following structure: file contains timestamps column 1 (formatted “%d/%m/%Y %H:%M:%OS”), acceleration signals (g’s) x, y, z axis columns 2, 3, 4, respectively, temperature information Celsius column 5. Also, file header. First, test read file using read.myacc.csv function GGIR follows.","code":"library(GGIR) read.myacc.csv(rmc.file = \"C:/mystudy/mydata/datafile.csv\", rmc.nrow = Inf, rmc.skip = 0, rmc.dec = \".\", rmc.firstrow.acc = 2, rmc.col.acc = 2:4, rmc.col.temp = 5, rmc.col.time=1, rmc.unit.acc = \"g\", rmc.unit.temp = \"C\", rmc.unit.time = \"POSIX\", rmc.format.time = \"%d/%m/%Y %H:%M:%OS\", rmc.desiredtz = \"Europe/London\", rmc.sf = 100)"},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"example-using-the-shell-function","dir":"Articles","previous_headings":"Usage of the read.myacc.csv function","what":"Example using the shell function","title":"Reading csv files with raw data in GGIR","text":"rmc.firstrow.acc argument defined within GGIR function, data read read.myacc.csv. GGIR needs user specify row starts accelerometer data within csv, argument must always explicitly specified user. Thus, call GGIR including rmc arguments look follows (note rmc.file, rmc.nrow, rmc.skip arguments used GGIR arguments already defined datadir, strategy, header arguments, respectively).","code":"library(GGIR) GGIR( mode=c(1,2,3,4,5), datadir=\"C:/mystudy/mydata/datafile.csv\", outputdir=\"D:/myresults\", do.report=c(2,4,5), #===================== # read.myacc.csv arguments #===================== rmc.nrow = Inf, rmc.dec = \".\", rmc.firstrow.acc = 2, rmc.col.acc = 2:4, rmc.col.temp = 5, rmc.col.time=1, rmc.unit.acc = \"g\", rmc.unit.temp = \"C\", rmc.unit.time = \"POSIX\", rmc.format.time = \"%d/%m/%Y %H:%M:%OS\", rmc.desiredtz = \"Europe/London\", rmc.sf = 100, rmc.noise = 0.013 )"},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Day segment analyses with GGIR","text":"specific person active morning afternoon? children active work hours leisure time? much inactivity occurs work office workers? Questions like can answered GGIR first specify parameters. main input argument specified qwindow, can used following ways: specify clock hours day based segmented day analyses take place. specify activity log (diary) used guide segmentation per individual per day recording. following sections discuss scenarios.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"clock-hour-based-segmentation","dir":"Articles","previous_headings":"","what":"Clock hour-based segmentation","title":"Day segment analyses with GGIR","text":"perform clock hour segmentation, need provide function GGIR argument qwindow assign numeric vector hours segmentation. start end day, explicitly provided vector GGIR add . Please find example values qwindow. number values used qwindow unlimited, aware analyses MX-metrics impossible small windows produce empty results. Day Saving Time (DST) taken account identifying start day, identifying day segments. words, 23 hour days processed 24 hours first midnight. ensure segment length identical across days week, needed ease comparison outcome variables across days.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"segmentation-guided-by-activity-log","dir":"Articles","previous_headings":"","what":"Segmentation guided by activity log","title":"Day segment analyses with GGIR","text":"perform activity-log based segmentation, need provide function GGIR argument qwindow assign full path activity log .csv format, e.g. qwindow=\"C:/myactivitylog.csv\". activity log expected .csv-file following structure: Rows: First row represents column headers row represents one accelerometer recording. ID-column: first column expected hold recording ID, needs match ID GGIR extracts accelerometer file. unsure format ID values, apply GGIR sample accelerometer files using default argument settings. ID column generated part 2 .csv reports show participant ID extracted GGIR. ID extracted, see documentation argument idloc, helps specify location participant file name file header. ID extraction fails accelerometer files matched corresponding activity log entries. Date-column: ID column followed date column first log day. ensure GGIR recognises date correctly, specify argument qwindow_dateformat. default format \"\\%d-\\%m-\\%Y\" 23-2-2021 indicate 23rd February 2021. date formatted 2-23-21 specify\"\\%m-\\%d-\\%y\". column name date column needs include character combination “date” “Date” “DATE”. Use date format consistently throughout activity diary. Start-times: date column followed one multiple columns start times activity types day format hours:minutes:seconds. provide dates cells. header column used label activity type. Insert new date column continuing activity types next day. Leave missing values empty. Missing values: values missing preceding succeeding time point used edges segment. example means define segment -C ID 1234, ID 6789 defined segments -B B-C, segment -C derived . Notes: - activity log collected individuals processed qwindow value c(0,24). - Dates activity log data can skipped, need column date followed column next date. - end time one activity assumed start time next activity. currently facilitate overlapping time segments.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"implementation-in-ggir","dir":"Articles","previous_headings":"","what":"Implementation in GGIR","title":"Day segment analyses with GGIR","text":"approaches implemented GGIR part 2 part 5. Therefore specific output variables calculated part 2 5 available per day, per person, per segment day based argument qwindow Note qwindow used part 5 timewindow includes \"MM\" (see specific documentation timewindow} parameters vignette) moment, specifying argument qwindow triggers calculation qwindow segments part 2 part 5, may result longer time finish analysis. interested segments either part 2 part 5, option might run GGIR parts 1:2 argument qwindow interest, set qwindow = NULL run GGIR parts 3:5 (vice versa: qwindow = NULL GGIR parts 1:2, desired qwindow segments running GGIR parts 3:5). information output variables calculated part pipeline, see main GGIR vignette.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"examples","dir":"Articles","previous_headings":"","what":"Examples","title":"Day segment analyses with GGIR","text":"information use GGIR function call see explanation main GGIR vignette.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"clock-hour-based-segmentation-1","dir":"Articles","previous_headings":"Examples","what":"Clock-hour based segmentation:","title":"Day segment analyses with GGIR","text":"","code":"library(\"GGIR\") GGIR(datadir = \"/your/data/directory\", outputdir = \"/your/output/directory\", mode = 1:5, # <= run GGIR parts 1 to 5 do.report = c(2, 5), # <= generate csv-report for GGIR part 2 and part 5 qwindow = c(0, 6, 12, 18, 24), timewindow = \"MM\")"},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"activity-log-based-segmentation","dir":"Articles","previous_headings":"Examples","what":"Activity log based segmentation:","title":"Day segment analyses with GGIR","text":"running code GGIR creates output folder output directory specified argument outputdir. subfolder results find csv files reports generated part 2 part 5 pipeline: Part 2 part2_summary.csv recording level summary, 1 row per recording recording level aggregates day segments columns. part2_daysummary.csv day level summary, 1 row per day day segment specific outcomes columns. part2_daysummary_longformat.csv day level summary long format, row represents one segment one day one recording. part2_summary.csv part2_daysummary.csv column names tell day segment correspond . example, column names ending _18-24hr refer time segment 18:00-24:00. part2_daysummary_longformat.csv time segment clarified via columns qwindow_timestamps qwindow_name. Part 5 part 5, information segments days exported different csv reports person-level day-level summaries. files include word “Segments” filename provided long format aggregated per day per person: part5_daysummary_Segments[...].csv day level summary long format, row represents one segment one day one recording. part5_personsummary_Segments[...].csv recording level summary long format, row represents average outcome one specific segments across days segment available per participant.","code":"library(\"GGIR\") GGIR(datadir = \"/your/data/directory\", outputdir = \"/your/output/directory\", mode = 1:5, # <= run GGIR parts 1 to 5 do.report = c(2, 5), # <= generate csv-report for GGIR part 2 and part 5 qwindow = \"/path/to/your/activity/log.csv\", timewindow = \"MM\")"},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"cleaning-parameters-for-day-segments-in-part-5","dir":"Articles","previous_headings":"","what":"Cleaning parameters for day segments (in part 5):","title":"Day segment analyses with GGIR","text":"part 5, analyses performed per segment day come possibility clean reports based information available segments. users can select include segments given amount wear time segment (segmentWEARcrit.part5), well given awake time sleep period time segment (segmentDAYSPTcrit.part5). arguments likely critical meaningful analysis data. presence sleep segment physical activity bias physical inactivity estimates presence physical activity segment sleep bias sleep estimates. become impossible quantify whether lack one presence behaviour drives association example health outcome.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"analyses-performed-per-day-segment","dir":"Articles","previous_headings":"","what":"Analyses performed per day segment","title":"Day segment analyses with GGIR","text":"analyses GGIR per segment day, include: Acceleration distribution (part 2): Derived argument ilevels specified. find variable names [0,36)_ENMO_mg means time spent 0 36 mg defined acceleration metric ENMO. Number valid hours data (part 2): recognise N_valid_hours_in_window tells number valid hours per time window, N_valid_hours number valid hours per day. Non-wear time percentage (part 5): nonwear_day_perc, nonwear_spt_perc, nonwear_day_spt_perc tell proportion segment classified non-wear awake time (day) sleep period time (spt). LXMX analysis (part 2 part5): LXMX analysis, stands least active X hours segment. recognise variable names like L5hr_ENMO_mg start time least active five hours defined metric ENMO, L5_ENMO_mg average acceleration hours. Intensity gradient analysis (part 2 part 5): find variables start ig_gradient_ See description GGIR part 2 output main GGIR vignette details. Time spent Moderate Vigorous Physical Activity (MVPA) (part 2 part 5): find variables MVPA_E5S_T201_ENMO MVPA_E5S_B1M80%_T201_ENMO. See description GGIR part 2 output main GGIR vignette details. Time spent sleeping, inactivity physical activity intensities (part 5): find variables part 5 reports, bouted, unbouted, total time version variables. See description GGIR part 5 output main GGIR vignette details.","code":""},{"path":"https://wadpac.github.io/GGIR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Vincent T van Hees. Author, maintainer. Jairo H Migueles. Author. Severine Sabia. Contributor. Matthew R Patterson. Contributor. Zhou Fang. Contributor. Joe Heywood. Contributor. Joan Capdevila Pujol. Contributor. Lena Kushleyeva. Contributor. Mathilde Chen. Contributor. Manasa Yerramalla. Contributor. Patrick Bos. Contributor. Taren Sanders. Contributor. Chenxuan Zhao. Contributor. Segantin Gaia. Contributor. Medical Research Council UK. Copyright holder, funder. Accelting. Copyright holder, funder. French National Research Agency. Copyright holder, funder.","code":""},{"path":"https://wadpac.github.io/GGIR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"van Hees V, Migueles J, Fang Z, Zhao J, Heywood J, Mirkes E, Sabia S (2024). GGIR: Raw Accelerometer Data Analysis. doi:10.5281/zenodo.1051064, R package version 3.1-2, https://CRAN.R-project.org/package=GGIR. van Hees V, Fang Z, Langford J, Assah F, MohammadMirkes , da Silva , Trenell M, White T, Wareham N, Brage S (2014). “Autocalibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents.” Journal Applied Physiology, 117(7), 738–744. https://doi.org/10.1152/japplphysiol.00421.2014. van Hees V, Sabia S, Anderson K, Denton S, Oliver J, Catt M, Abell J, Kivimaki M, Trenell M, Singh-Manoux (2015). “Novel, Open Access Method Assess Sleep Duration Using Wrist-Worn Accelerometer.” PLoS One, 10(11). doi:10.1371/journal.pone.0142533, https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0142533. van Hees V, Sabia S, Jones S, Wood , Anderson K, Kivimaki M, Frayling T, Pack , Bucan M, Trenell M, Mazzotti D, Gehrman P, Singh-Manoux , Weedon M (2018). “Estimating sleep parameters using accelerometer without sleep diary.” Scientific Reports, 8(1). doi:10.1038/s41598-018-31266-z, https://www.nature.com/articles/s41598-018-31266-z. Migueles J, Rowlands , Huber F, Sabia S, van Hees V (2019). “GGIR: Research Community-Driven Open Source R Package Generating Physical Activity Sleep Outcomes Multi-Day Raw Accelerometer Data.” Journal Measurement Physical Behavior, 2(3). doi:10.1123/jmpb.2018-0063, https://doi.org/10.1123/jmpb.2018-0063.","code":"@Manual{, title = {{GGIR}: Raw Accelerometer Data Analysis}, author = {Vincent T {van Hees} and Jairo H Migueles and Zhou Fang and Jing Hua Zhao and Joe Heywood and Evgeny Mirkes and Severine Sabia}, year = {2024}, note = {R package version 3.1-2}, doi = {10.5281/zenodo.1051064}, url = {https://CRAN.R-project.org/package=GGIR}, } @Article{, title = {Autocalibration of accelerometer data for free-living physical activity assessment using local gravity and temperature: an evaluation on four continents}, author = {Vincent T {van Hees} and Zhou Fang and Joss Langford and Felix Assah and A MohammadMirkes and Inacio C {da Silva} and Michael I Trenell and Tom White and Nicholas J Wareham and Soren Brage}, journal = {Journal of Applied Physiology}, volume = {117}, number = {7}, pages = {738--744}, year = {2014}, url = {https://doi.org/10.1152/japplphysiol.00421.2014}, } @Article{, title = {A Novel, Open Access Method to Assess Sleep Duration Using a Wrist-Worn Accelerometer}, author = {Vincent T {van Hees} and Severine Sabia and Kirstie N Anderson and Sarah J Denton and James Oliver and Michael Catt and Jesica G Abell and Mika Kivimaki and Michael I Trenell and Archana Singh-Manoux}, doi = {10.1371/journal.pone.0142533}, journal = {PLoS One}, volume = {10}, number = {11}, year = {2015}, url = {https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0142533}, } @Article{, title = {Estimating sleep parameters using an accelerometer without sleep diary}, author = {Vincent T {van Hees} and Severine Sabia and Samuel E Jones and Andrew R Wood and Kirstie N Anderson and Mika Kivimaki and Tim M Frayling and Allan I Pack and Maja Bucan and Michael I Trenell and Diego R Mazzotti and Philip R Gehrman and Archana Singh-Manoux and Michael N Weedon}, doi = {10.1038/s41598-018-31266-z}, journal = {Scientific Reports}, volume = {8}, number = {1}, year = {2018}, url = {https://www.nature.com/articles/s41598-018-31266-z}, } @Article{, title = {GGIR: A Research Community-Driven Open Source R Package for Generating Physical Activity and Sleep Outcomes From Multi-Day Raw Accelerometer Data}, author = {Jairo H Migueles and Alex V Rowlands and Florian Huber and Severine Sabia and Vincent T {van Hees}}, doi = {10.1123/jmpb.2018-0063}, journal = {Journal for the Measurement of Physical Behavior}, volume = {2}, number = {3}, year = {2019}, url = {https://doi.org/10.1123/jmpb.2018-0063}, }"},{"path":[]},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"interest fostering open welcoming environment, contributors maintainers pledge making participation project community harassment-free experience everyone, regardless age, body size, disability, ethnicity, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation.","code":""},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes creating positive environment include: Using welcoming inclusive language respectful differing viewpoints experiences Gracefully accepting constructive criticism Focusing best community Showing empathy towards community members Examples unacceptable behavior participants include: use sexualized language imagery unwelcome sexual attention advances Trolling, insulting/derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical electronic address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"our-responsibilities","dir":"","previous_headings":"","what":"Our Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Project maintainers responsible clarifying standards acceptable behavior expected take appropriate fair corrective action response instances unacceptable behavior. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, ban temporarily permanently contributor behaviors deem inappropriate, threatening, offensive, harmful.","code":""},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within project spaces public spaces individual representing project community. Examples representing project community include using official project e-mail address, posting via official social media account, acting appointed representative online offline event. Representation project may defined clarified project maintainers.","code":""},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported contacting main project maintainer v.vanhees@accelting.com. complaints reviewed investigated result response deemed necessary appropriate circumstances. project team obligated maintain confidentiality regard reporter incident. details specific enforcement policies may posted separately.","code":""},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 1.4, available https://www.contributor-covenant.org/version/1/4/code--conduct.html","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing guidelines","title":"Contributing guidelines","text":"welcome kind contribution software, simple comment question full fledged pull request. Please read follow Code Conduct. contribution can one following cases: question; think may found bug (including unexpected behavior); want make kind change code base (e.g. fix bug, add new feature, update documentation); want make new release code base. sections outline steps case.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contributing guidelines","text":"use search functionality see someone already experienced issue; search yield relevant results, start new conversation.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"bugs","dir":"","previous_headings":"","what":"Bugs","title":"Contributing guidelines","text":"use search functionality see someone already filed issue; issue search yield relevant results, make new issue, choose Bug report type. includes checklist make sure provide enough information rest community understand cause context problem.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"changes-or-additions","dir":"","previous_headings":"","what":"Changes or additions","title":"Contributing guidelines","text":"(important) announce plan rest community start working. announcement form (new) issue. Choose Feature request type, includes checklist things consider get discussion going; (important) wait kind consensus reached idea good idea; needed, fork repository Github profile create feature branch latest master commit. working feature branch, make sure stay date master branch pulling changes, possibly ‘upstream’ repository (follow instructions ); make sure existing tests still work running test suite RStudio; add tests (necessary); update expand documentation, see package documentation guidelines; make sure release notes inst/NEWS.Rd updated; add name contributors lists DESCRIPTION file; push feature branch (fork ) GGIR repository GitHub; create pull request, e.g. following instructions . pull request template includes checklist items. case feel like ’ve made valuable contribution, don’t know write run tests , generate documentation: don’t let discourage making pull request; can help ! Just go ahead submit pull request, keep mind might asked append additional commits pull request.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"coding-style","dir":"","previous_headings":"Changes or additions","what":"Coding style","title":"Contributing guidelines","text":"loosely follow tidyverse style guide, enforce every rule strictly. instance, prefer = instead <- default assignment operator. doubt style use, don’t hesitate get touch. general guidelines try adhere : Use standard R much possible, keep dependencies minimum. Keep loops minimum. Don’t make lines long. first time contributor, don’t worry coding style much. help get things shape.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"package-documentation","dir":"","previous_headings":"Changes or additions","what":"Package documentation","title":"Contributing guidelines","text":"currently three sources documenting package: reference manual, including package basic information functions documentation files. package vignettes. github.io website (built pkgdown package).","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"reference-manual","dir":"","previous_headings":"Changes or additions > Package documentation","what":"Reference manual","title":"Contributing guidelines","text":"reference manual gets information .Rd documents within man folder package repository. Therefore, updating information files automatically update reference manual. Note GGIR functions intended direct interaction user, , documentation arguments centralized details section man/GGIR.Rd. example want add extra parameter params_247 documented . , forget include new argument functions .","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"package-vignettes","dir":"","previous_headings":"Changes or additions > Package documentation","what":"Package vignettes","title":"Contributing guidelines","text":"folder vignettes GGIR repository contains .Rmd files. .Rmd files start word ‘chapter’ used traditional package vignettes hosted CRAN. Use files edit existing vignette, use structure vignettes build new one. .Rmd files name starts word ‘chapter’ ignored. chapter-vignettes used github.io website (see next section). create new vignette CRAN create new package vignette CRAN, please use usethis::use_vignette() make sure name vignette file start “chapter”. example, want create new vignette sleep CRAN, may following: create new “sleep.Rmd” file within vignettes folder GGIR repository. can edit file build vignette. remove vignette CRAN two ways remove vignette CRAN: Removing Rmd file corresponding vignette vignettes folder, note file information lost. Adding path vignette .Rbuildignore file available GGIR repository. example, remove GGIRParameters vignette CRAN, can add:","code":"usethis::use_vignette(name = \"sleep\", title = \"How to analyse your sleep data in GGIR\") ^vignettes/GGIRParameters.Rmd"},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"githubio-website","dir":"","previous_headings":"Changes or additions > Package documentation","what":"github.io website","title":"Contributing guidelines","text":"updating adding information github.io website, need use pkgdown configuration file can found repositories root directory, well chapter vignettes discussed . edit information existing chapter Open vignette corresponding chapter wish edit (see _pkgdown.yml) file chapter vignette path (href). Make changes vignette. Run pkgdown::build_site() function. add new chapter Create Rmd file vignette via usethis::use_vignette() make sure name vignette starts “chapter”, example: Open _pkgdown.yml file fill name reference new chapter menu. Make sure follow coding structure rest chapters. Run pkgdown::build_site() function. remove chapter Remove lines corresponding chapter _pkgdown.yml file line 42 onwards. Optionally may remove Rmd file corresponding chapter, step 1, chapter appear github.io website. Run pkgdown::build_site() function. edit name chapter Chapter names defined twice, _pkgdown.yml file vignette file . need make sure titles match first used drop-list github.io website specific page chapter.","code":"usethis::use_vignette(name = \"chapterSleep\", title = \"10. How to analyse your sleep data in GGIR\")"},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"adding-the-changes-to-the-master-branch","dir":"","previous_headings":"Changes or additions > Package documentation","what":"Adding the changes to the master branch","title":"Contributing guidelines","text":"last step committing pushing changes github making pull request contribution package. Note , running pkgdown::build_site() function edit files within docs folder, probably add new files. applies editing information github.io website. important changes files docs folder also part pull requests, otherwise website updated.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"new-release","dir":"","previous_headings":"","what":"New release","title":"Contributing guidelines","text":"GGIR follows release cycle process described document.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/appendRecords.html","id":null,"dir":"Reference","previous_headings":"","what":"Append GGIR milestone data from neighbouring or overlapping recordings — appendRecords","title":"Append GGIR milestone data from neighbouring or overlapping recordings — appendRecords","text":"Append GGIR part 1 milestone data format neighbouring overlapping recording. recordings overlap use data newest recordings. time gap larger 2 days recordings appended. intended direct use user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/appendRecords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Append GGIR milestone data from neighbouring or overlapping recordings — appendRecords","text":"","code":"appendRecords(metadatadir, desiredtz = \"\", idloc = 1, maxRecordingInterval = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/appendRecords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Append GGIR milestone data from neighbouring or overlapping recordings — appendRecords","text":"metadatadir See g.part2 desiredtz See GGIR idloc See GGIR maxRecordingInterval See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/appendRecords.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Append GGIR milestone data from neighbouring or overlapping recordings — appendRecords","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyCosinorAnalyses.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply Cosinor Analyses to time series — applyCosinorAnalyses","title":"Apply Cosinor Analyses to time series — applyCosinorAnalyses","text":"Wrapper function around cosinorAnalyses first prepares time series applying cosinorAnlayses","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyCosinorAnalyses.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply Cosinor Analyses to time series — applyCosinorAnalyses","text":"","code":"applyCosinorAnalyses(ts, qcheck, midnightsi, epochsizes)"},{"path":"https://wadpac.github.io/GGIR/reference/applyCosinorAnalyses.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply Cosinor Analyses to time series — applyCosinorAnalyses","text":"ts Data.frame timestamps acceleration metric. qcheck Vector equal length number rows ts value 1 invalid timestamps, 0 otherwise. midnightsi Indices midnights time series epochsizes Epoch size ts qcheck respectively","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyCosinorAnalyses.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Apply Cosinor Analyses to time series — applyCosinorAnalyses","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply external function to acceleration data. — applyExtFunction","title":"Apply external function to acceleration data. — applyExtFunction","text":"Applies external function raw acceleration data within GGIR. makes easier new algorithms developed pilotted accelerometer data taking advantage existing comprehensive GGIR data management analysis infrastructure. function direct interaction user, please supply object myfun GGIR g.part1. Object myfun list detailed .","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply external function to acceleration data. — applyExtFunction","text":"","code":"applyExtFunction(data, myfun, sf, ws3, interpolationType=1)"},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply external function to acceleration data. — applyExtFunction","text":"data Data data.frame present internally g.getmeta. least four columns first timestamp followed x, y, z acceleration. myfun See details, short: myfun list object holds external function applied data various parameters aid process. sf Sample frequency (Hertz) data object ws3 Short epoch size (first value windowsizes g.getmeta). interpolationType Integer indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Apply external function to acceleration data. — applyExtFunction","text":"output external algorithm aggregated repeated fit short epoch length GGIR. Therefore, short epoch length GGIR multitude resolution external function output, visa versa.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Apply external function to acceleration data. — applyExtFunction","text":"See package vignette detailed tutorial examples use function embedding: https://cran.r-project.org/web/package=GGIR/vignettes/applyExtFunction.pdf Function applyExtFunction typically used GGIR user directly.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Apply external function to acceleration data. — applyExtFunction","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"Calculates Sleep Regularity Index per day pair proposed Phillips colleagues 2017 expanded day-pair level estimates.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"","code":"CalcSleepRegularityIndex(data = c(), epochsize = c(), desiredtz= c())"},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"data Data.frame produced function g.sib.det. epochsize Numeric value epoch size seconds. desiredtz Character timezone database name, see also g.getmeta","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"Data.frame columns: day (day number); Sleep Regularity Index, definition must lie range -100 (reversed regularity), 0 (random pattern), 100 (perfect regularity); weekday (e.g. Wednesday); frac_valid, number 0 1 indicating fraction 24 hour period valid data available current next day, ; date.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"Calculates Sleep Regularity Index per day pair. Absense missing data used criteria calculation. Instead code asses fraction time matching valid data points found days. Later g.part4 fraction used include exclude days based excludenightcrit criteria also uses sleep variables. g.report.part4 day-level SRI values stored, also aggregated across recording days, weekend days, weekend days, respectively. Therefore, function broader functionality algorithm proposed Phillips colleagues 2017.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"Andrew J. K. Phillips, William M. Clerx, et al. Irregular sleep/wake patterns associated poorer academic performance delayed circadian sleep/wake timing. Scientific Reports. 2017 June 12","code":""},{"path":"https://wadpac.github.io/GGIR/reference/checkMilestoneFolders.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks for existence of folders to process — checkMilestoneFolders","title":"Checks for existence of folders to process — checkMilestoneFolders","text":"Checks whether milestone folders exist, create needed, check whether folders empty. done part 1 5 part 6, different handled inside g.part6.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/checkMilestoneFolders.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks for existence of folders to process — checkMilestoneFolders","text":"","code":"checkMilestoneFolders(metadatadir, partNumber)"},{"path":"https://wadpac.github.io/GGIR/reference/checkMilestoneFolders.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks for existence of folders to process — checkMilestoneFolders","text":"metadatadir Character, path root outputfolder. partNumber Numeric, number set 2, 3, 4 5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/checkMilestoneFolders.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks for existence of folders to process — checkMilestoneFolders","text":"value produced","code":""},{"path":"https://wadpac.github.io/GGIR/reference/checkMilestoneFolders.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Checks for existence of folders to process — checkMilestoneFolders","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_log.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to revise format of user-provided logs — check_log","title":"Function to revise format of user-provided logs — check_log","text":"Function revise format missing values dates user-provided","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_log.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to revise format of user-provided logs — check_log","text":"","code":"check_log(log, dateformat, colid = 1, datecols = c(), logPath, logtype)"},{"path":"https://wadpac.github.io/GGIR/reference/check_log.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to revise format of user-provided logs — check_log","text":"log Data frame log read data.table::fread. dateformat Character specifying expected date format used log. colid Numeric column containing file ID. datecols Numeric column/s containing dates. logPath Character containing full path activity log checked. logtype Character accepts \"activity log\" \"study dates log\" moment. used warning messages.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_log.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to revise format of user-provided logs — check_log","text":"Data.frame containing revised log.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_log.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to revise format of user-provided logs — check_log","text":"Vincent T van Hees Jairo H Migueles ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_myfun.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks myfun object before it is passed to applyExtfunction — check_myfun","title":"Checks myfun object before it is passed to applyExtfunction — check_myfun","text":"Checks object myfun list check elements list : element names expected, value element expected type length.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_myfun.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks myfun object before it is passed to applyExtfunction — check_myfun","text":"","code":"check_myfun(myfun, windowsizes)"},{"path":"https://wadpac.github.io/GGIR/reference/check_myfun.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks myfun object before it is passed to applyExtfunction — check_myfun","text":"myfun See applyExtFunction windowsizes See g.getmeta).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_myfun.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks myfun object before it is passed to applyExtfunction — check_myfun","text":"0 checkes passed, 1 one checks pass. Error message printed console feedback checks pass.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_myfun.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Checks myfun object before it is passed to applyExtfunction — check_myfun","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Check default parameters — check_params","title":"Check default parameters — check_params","text":"Checks parameter objects class logical combinations. Called extract_params. intended direct use GGIR users.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check default parameters — check_params","text":"","code":"check_params(params_sleep = c(), params_metrics = c(), params_rawdata = c(), params_247 = c(), params_phyact = c(), params_cleaning = c(), params_output = c(), params_general = c())"},{"path":"https://wadpac.github.io/GGIR/reference/check_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check default parameters — check_params","text":"params_sleep List sleep parameters params_metrics List parameters related metrics params_rawdata List parameters related raw data reading processing params_247 List parameters related 24/7 behavioural analysis, includes anything fit physical activity sleep research params_phyact List parameters related physical activity analysis params_cleaning List parameters related cleaning time series, including masking imputation params_output List parameters related GGIR stores output params_general List parameters related general topics","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check default parameters — check_params","text":"Lists updated parameter objects","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_params.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check default parameters — check_params","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/convertEpochData.html","id":null,"dir":"Reference","previous_headings":"","what":"convert external Epoch data to GGIR part 1 milestone data format — convertEpochData","title":"convert external Epoch data to GGIR part 1 milestone data format — convertEpochData","text":"convert externally created Epoch data GGIR part 1 milestone data format. Function intended direct use user. aim allow using GGIR top extrnally derived epoch data. See argument dataFormat GGIR details use functionality.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/convertEpochData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"convert external Epoch data to GGIR part 1 milestone data format — convertEpochData","text":"","code":"convertEpochData(datadir = c(), metadatadir = c(), params_general = c(), verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/convertEpochData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"convert external Epoch data to GGIR part 1 milestone data format — convertEpochData","text":"datadir See GGIR metadatadir See GGIR params_general Parameters object see GGIR verbose See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/convertEpochData.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"convert external Epoch data to GGIR part 1 milestone data format — convertEpochData","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/correctOlderMilestoneData.html","id":null,"dir":"Reference","previous_headings":"","what":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","title":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","text":"older versions GGIR stored milestone data part 1 factor. function identifies occurs convert affected columns appropriate class (e.g., numeric).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/correctOlderMilestoneData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","text":"","code":"correctOlderMilestoneData(x)"},{"path":"https://wadpac.github.io/GGIR/reference/correctOlderMilestoneData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","text":"x Data frame metashort metalong data generated g.part1","code":""},{"path":"https://wadpac.github.io/GGIR/reference/correctOlderMilestoneData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","text":"Data frame class fixed appropriate columns (.e., light temperature columns)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/correctOlderMilestoneData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","text":"","code":"if (FALSE) { # \\dontrun{ correctOlderMilestoneData(x) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/cosinorAnalyses.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply cosinor anlaysis and extended cosinor analysis — cosinorAnalyses","title":"Apply cosinor anlaysis and extended cosinor analysis — cosinorAnalyses","text":"Applies cosinor anlaysis ActCR package time series","code":""},{"path":"https://wadpac.github.io/GGIR/reference/cosinorAnalyses.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply cosinor anlaysis and extended cosinor analysis — cosinorAnalyses","text":"","code":"cosinorAnalyses(Xi, epochsize = 60, timeOffsetHours = 0)"},{"path":"https://wadpac.github.io/GGIR/reference/cosinorAnalyses.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply cosinor anlaysis and extended cosinor analysis — cosinorAnalyses","text":"Xi Vector time series movement indicators epochsize Numeric epochsize seconds timeOffsetHours Numeric time hours relative next midnight","code":""},{"path":"https://wadpac.github.io/GGIR/reference/cosinorAnalyses.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Apply cosinor anlaysis and extended cosinor analysis — cosinorAnalyses","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/createConfigFile.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates Config File based on variables in function GGIR environment — createConfigFile","title":"Creates Config File based on variables in function GGIR environment — createConfigFile","text":"used inside GGIR. intended direct use user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/createConfigFile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates Config File based on variables in function GGIR environment — createConfigFile","text":"","code":"createConfigFile(config.parameters = c(), GGIRversion = \"\")"},{"path":"https://wadpac.github.io/GGIR/reference/createConfigFile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates Config File based on variables in function GGIR environment — createConfigFile","text":"config.parameters List arguments used GGIR. GGIRversion GGIR version mumber incorported ConfigFile.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/createConfigFile.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Creates Config File based on variables in function GGIR environment — createConfigFile","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_acc_csv.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates csv data file for testing purposes — create_test_acc_csv","title":"Creates csv data file for testing purposes — create_test_acc_csv","text":"Creates file Actigraph csv data format dummy data can used testing. file includes accelerometer data bouts higher acceleration, variations non-movement periods range accelerometer positions allow testing auto-calibration functionality.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_acc_csv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates csv data file for testing purposes — create_test_acc_csv","text":"","code":"create_test_acc_csv(sf=3,Nmin=2000,storagelocation=c(), start_time = NULL, starts_at_midnight = FALSE)"},{"path":"https://wadpac.github.io/GGIR/reference/create_test_acc_csv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates csv data file for testing purposes — create_test_acc_csv","text":"sf Sample frequency Hertz, default low minimize file size Nmin Number minutes (minimum 720) storagelocation Location test file named testfile.csv stored value provided function uses current working directory start_time Start time recording, hh:mm:ss format. starts_at_midnight Boolean indicating whether recording start midnight. Ignored start_time specified.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_acc_csv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates csv data file for testing purposes — create_test_acc_csv","text":"function produce output values. file stored","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_acc_csv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates csv data file for testing purposes — create_test_acc_csv","text":"","code":"if (FALSE) { # \\dontrun{ create_test_acc_csv() } # }"},{"path":"https://wadpac.github.io/GGIR/reference/create_test_sleeplog_csv.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","title":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","text":"Creates sleeplog file format expected g.part4 dummy data (23:00 onset, 07:00 waking time every night).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_sleeplog_csv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","text":"","code":"create_test_sleeplog_csv(Nnights = 7, storagelocation = c(), advanced = FALSE, sep = \",\", begin_date = \"2016/06/25\")"},{"path":"https://wadpac.github.io/GGIR/reference/create_test_sleeplog_csv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","text":"Nnights Number nights (minimum 1) storagelocation Location test file named testfile.csv stored value provided function uses current working directory advanced Boolean indicate whether create advanced sleeplog also includes logs nap times nonwear sep Character indicate column separator csv file. begin_date Character indicate first date (format \"2016/06/25\") used advanced sleeplog format. Ignored generated basic sleeplog format.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_sleeplog_csv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","text":"function produce output values. file stored","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_sleeplog_csv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","text":"","code":"if (FALSE) { # \\dontrun{ create_test_sleeplog_csv() } # }"},{"path":"https://wadpac.github.io/GGIR/reference/data.calibrate.html","id":null,"dir":"Reference","previous_headings":"","what":"Example output from g.calibrate — data.calibrate","title":"Example output from g.calibrate — data.calibrate","text":"data.calibrate example output g.calibrate","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.calibrate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example output from g.calibrate — data.calibrate","text":"","code":"data(data.calibrate)"},{"path":"https://wadpac.github.io/GGIR/reference/data.calibrate.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example output from g.calibrate — data.calibrate","text":"format : chr \"data.calibrate\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.calibrate.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example output from g.calibrate — data.calibrate","text":"data collected one individual testing purposes","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.calibrate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example output from g.calibrate — data.calibrate","text":"","code":"data(data.calibrate)"},{"path":"https://wadpac.github.io/GGIR/reference/data.getmeta.html","id":null,"dir":"Reference","previous_headings":"","what":"Example output from g.getmeta — data.getmeta","title":"Example output from g.getmeta — data.getmeta","text":"data.getmeta example output g.getmeta","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.getmeta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example output from g.getmeta — data.getmeta","text":"","code":"data(data.getmeta)"},{"path":"https://wadpac.github.io/GGIR/reference/data.getmeta.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example output from g.getmeta — data.getmeta","text":"format : chr \"data.getmeta\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.getmeta.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example output from g.getmeta — data.getmeta","text":"data collected one individual testing purposes","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.getmeta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example output from g.getmeta — data.getmeta","text":"","code":"data(data.getmeta)"},{"path":"https://wadpac.github.io/GGIR/reference/data.inspectfile.html","id":null,"dir":"Reference","previous_headings":"","what":"Example output from g.inspectfile — data.inspectfile","title":"Example output from g.inspectfile — data.inspectfile","text":"data.inspectfile example output g.inspectfile","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.inspectfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example output from g.inspectfile — data.inspectfile","text":"","code":"data(data.inspectfile)"},{"path":"https://wadpac.github.io/GGIR/reference/data.inspectfile.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example output from g.inspectfile — data.inspectfile","text":"format : chr \"data.inspectfile\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.inspectfile.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example output from g.inspectfile — data.inspectfile","text":"data collected one individual testing purposes","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.inspectfile.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example output from g.inspectfile — data.inspectfile","text":"","code":"data(data.inspectfile)"},{"path":"https://wadpac.github.io/GGIR/reference/data.metalong.html","id":null,"dir":"Reference","previous_headings":"","what":"Metalong object as part of part 1 milestone data — data.metalong","title":"Metalong object as part of part 1 milestone data — data.metalong","text":"data.metalong example metalong data.frame stored g.part1","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.metalong.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Metalong object as part of part 1 milestone data — data.metalong","text":"","code":"data(data.metalong)"},{"path":"https://wadpac.github.io/GGIR/reference/data.metalong.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Metalong object as part of part 1 milestone data — data.metalong","text":"format : chr \"data.metalong\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.metalong.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Metalong object as part of part 1 milestone data — data.metalong","text":"data collected one individual testing purposes","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.metalong.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Metalong object as part of part 1 milestone data — data.metalong","text":"","code":"data(data.metalong)"},{"path":"https://wadpac.github.io/GGIR/reference/data.ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Time series data.frame stored by part 5 — data.ts","title":"Time series data.frame stored by part 5 — data.ts","text":"data.ts example data.frame stored g.part5","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Time series data.frame stored by part 5 — data.ts","text":"","code":"data(data.ts)"},{"path":"https://wadpac.github.io/GGIR/reference/data.ts.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Time series data.frame stored by part 5 — data.ts","text":"format : chr \"data.ts\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.ts.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Time series data.frame stored by part 5 — data.ts","text":"data collected one individual testing purposes matches data object data.metalong","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.ts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Time series data.frame stored by part 5 — data.ts","text":"","code":"data(data.ts)"},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":null,"dir":"Reference","previous_headings":"","what":"Generates vector of file names out of datadir input argument — datadir2fnames","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"Uses input argument datadir g.part1 output isfilelist generate vector filenames","code":""},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"","code":"datadir2fnames(datadir,filelist)"},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"datadir See g.part1 filelist Produced isfilelist","code":""},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"Character vector filenames","code":""},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"","code":"if (FALSE) { # \\dontrun{ datadir2fnames(datadir = \"C:/mydatafolder\",filelist=TRUE) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":null,"dir":"Reference","previous_headings":"","what":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"Detects periods accelerometer worn accelerometer signal stuck close dynamic range limit accelerometer.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"","code":"detect_nonwear_clipping(data = c(), windowsizes = c(5, 900, 3600), sf = 100, clipthres = 7.5, sdcriter = 0.013, racriter = 0.05, nonwear_approach = \"2013\", params_rawdata = c())"},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"data Matrix raw accelerometer data X, Y, Z axes. windowsizes Numeric vector length three, short, long epoch window size seconds. sf Sample frequency Hertz. clipthres Threschold detect clipping _g_ units. Usually 0.5 _g_ dynamic range accelerometer. sdcriter Criteria define non-wear time, defined estimated noise measured raw accelerometer data. racriter Absolute criteria absolute range accelerations define non-wear time. nonwear_approach Whether use traditional version non-wear detection algorithm (nonwear_approach = \"2013\", default) new version (nonwear_approach = \"2023\"). 2013 version use longsize window (windowsizes[3], one hour default) check conditions nonwear identification flag nonwear mediumsize window (windowsizes[2], 15 min default) middle. 2023 version differs flag nonwear full longsize window. 2013 method longsize window centered centre mediumsize window, 2023 method longsizewindow aligned left edge left edge mediumsize window. params_rawdata See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"List containing next numeric vectors: NWav (non-wear score), 1 3 indicating number axes met non wear criteria. CWav (clipping score), binary, 0-1 indicating non-clipping clipping, respectively. nmin minimum numebr windows block data. number vectors represent long epoch duration (.e., ws2, 900 seconds default).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"Vincent T van Hees Jairo Hidalgo Migueles ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"van Hees et al. 2011, doi: 10.1371/journal.pone.0022922. van Hees et al. 2013, doi: 10.1371/journal.pone.0061691 (supplementary material).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"","code":"if (FALSE) { # \\dontrun{ detect_nonwear_clipping(data = data, windowsizes = c(900, 3600), sf = sf, clipthres = clipthres, sdcriter = sdcriter, racriter = racriter, nonwear_approach = \"old\") } # }"},{"path":"https://wadpac.github.io/GGIR/reference/extractID.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract ID from file header object — extractID","title":"Extract ID from file header object — extractID","text":"Extract ID file header object.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extractID.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract ID from file header object — extractID","text":"","code":"extractID(hvars, idloc, fname)"},{"path":"https://wadpac.github.io/GGIR/reference/extractID.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract ID from file header object — extractID","text":"hvars Object extracted g.inspectfile idloc See GGIR fname File (base)name.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extractID.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract ID from file header object — extractID","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extract_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract parameters from input and add them to params — extract_params","title":"Extract parameters from input and add them to params — extract_params","text":"Extracts parameters separately provided input adds params objects. intended direct use GGIR users.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extract_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract parameters from input and add them to params — extract_params","text":"","code":"extract_params(params_sleep = c(), params_metrics = c(), params_rawdata = c(), params_247 = c(), params_phyact = c(), params_cleaning = c(), params_output = c(), params_general = c(), input = c(), configfile_csv = c(), params2check = c(\"sleep\", \"metrics\", \"rawdata\", \"247\", \"phyact\", \"cleaning\", \"output\", \"general\"))"},{"path":"https://wadpac.github.io/GGIR/reference/extract_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract parameters from input and add them to params — extract_params","text":"params_sleep List sleep parameters params_metrics List parameters related metrics params_rawdata List parameters related raw data reading processing params_247 List parameters related 24/7 behavioural analysis, includes anything fit physical activity sleep research params_phyact List parameters related physical activity analysis params_cleaning List parameters related cleaning time series, including masking imputation params_output List parameters related GGIR stores output params_general List parameters related general topics input objects provided users configfile_csv Csv configuration file params2check Character vector indicate params objects need checked. allows us prevent function checking params objects used context function extract_params used.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extract_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract parameters from input and add them to params — extract_params","text":"Lists updated parameter objects","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extract_params.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract parameters from input and add them to params — extract_params","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.abr.day.names.html","id":null,"dir":"Reference","previous_headings":"","what":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","title":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","text":"Abbreviates daynames Monday becomes MON Sunday becomes SUN","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.abr.day.names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","text":"","code":"g.abr.day.names(daynames)"},{"path":"https://wadpac.github.io/GGIR/reference/g.abr.day.names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","text":"daynames Vector daynames character format","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.abr.day.names.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.abr.day.names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","text":"","code":"daynames = c(\"Monday\",\"Friday\") daynames_converted = g.abr.day.names(daynames)"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.avday.html","id":null,"dir":"Reference","previous_headings":"","what":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","text":"Generatess average day analyses fills corresponding output matrix, g.analyse.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.avday.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","text":"","code":"g.analyse.avday(doquan, averageday, M, IMP, t_TWDI, quantiletype, ws3, doiglevels, firstmidnighti, ws2, midnightsi, params_247 = c(), qcheck = c(), acc.metric = c(), ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.avday.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","text":"doquan Boolean whether quantile analysis done averageday produced g.impute M produced g.getmeta IMP produced g.impute t_TWDI qwindow described g.analyse quantiletype see g.analyse ws3 Epoch size seconds doiglevels Boolean indicate whether iglevels calculated firstmidnighti see g.detecmidnight ws2 see g.weardec midnightsi see g.detecmidnight params_247 See g.part2 qcheck Vector indicators data valid (value=0) invalid (value=1). acc.metric Character, see g.part1. , used decided acceleration metric use IVIS cosinor analyses. ... argument used previous version g.analyse.avday, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.avday.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","text":"InterdailyStability IntradailyVariability igfullr_names igfullr QUAN qlevels_names ML5AD ML5AD_names","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.avday.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"Analyses output functions within packages generate basic descriptive summary accelerometer data file. Analyses include: Average acceleration per day, per measurement, L5M5 analyses (assessment five hours lowest acceleration highest acceleration). , traditionally popular variable MVPA automatically extracted six variants: without bout criteria combination epoch = epoch length defined g.getmeta (first value input argument windowsizes), 1 minute, 5 minutes, bout durations 1 minute, 5 minutes 10 minutes combination epoch length defined g.getmeta.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"","code":"g.analyse(I, C, M, IMP, params_247 = c(), params_phyact = c(), params_general = c(), params_cleaning = c(), quantiletype = 7, myfun = c(), ID, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"output function g.inspectfile C output function g.calibrate M output function g.getmeta IMP output function g.impute params_247 See GGIR params_phyact See GGIR params_general See GGIR params_cleaning See GGIR quantiletype type quantile function use (default recommended). details, see quantile function STATS package myfun External function object applied raw data, see g.getmeta. ID ID extracted g.part2. ... argument used previous version g.analyse, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"g.analyse generated two data,franeL summary summary file analysed daysummary summary per day file analysed data.frames used function g.report.part2 generate csv reports. exaplantion columns data.frame subsequent csv reports can found package vignette (Output part 2).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"","code":"data(data.getmeta) data(data.inspectfile) data(data.calibrate) if (FALSE) { # \\dontrun{ #inspect file: I = g.inspectfile(datafile) #autocalibration: C = g.calibrate(datafile) #get meta-data: M = g.getmeta(datafile, desiredtz = \"Europe/London\", windowsizes = c(5, 900, 3600), daylimit = FALSE, offset = c(0, 0, 0), scale = c(1, 1, 1), tempoffset = c(0, 0, 0)) } # } #impute meta-data: IMP = g.impute(M = data.getmeta, I = data.inspectfile, ID = \"01wk0\") #analyse and produce summary: A = g.analyse(I = data.inspectfile, C = data.calibrate, M = data.getmeta, IMP, ID = \"01wk0\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perday.html","id":null,"dir":"Reference","previous_headings":"","what":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","text":"Generates day specific analyses fills corresponding output matrix, g.analyse.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perday.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","text":"","code":"g.analyse.perday(ndays, firstmidnighti, time, nfeatures, midnightsi, metashort, averageday, doiglevels, nfulldays,lastmidnight, ws3, ws2, qcheck, fname, idloc, sensor.location, wdayname, tooshort, includedaycrit, doquan, quantiletype, doilevels, domvpa, mvpanames, wdaycode, ID, deviceSerialNumber, ExtFunColsi, myfun, desiredtz = \"\", params_247 = c(), params_phyact = c(), ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perday.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","text":"ndays Number days file firstmidnighti see g.detecmidnight time timestamp column metalong converted character nfeatures estimate number variables need stored output matrix midnightsi see g.detecmidnight metashort see g.impute averageday produced g.impute doiglevels Boolean indicate whether iglevels calculated nfulldays Number days first last midnight recording lastmidnight see g.detecmidnight ws3 Epoch size seconds ws2 see g.weardec qcheck vector zeros ones epoch, respenting quality check derived g.impute fname RData filename produced g.part1 idloc see g.analyse sensor.location produced g.extractheadervars wdayname character weekdayname tooshort 0 (file short) 1 (file short) includedaycrit see g.analyse doquan Boolean whether quantile analysis done quantiletype see g.analyse doilevels Boolean whether generate ilevels, see g.analyse domvpa Boolean whether mvpa analysis mvpanames Matrix 6 columns 1 row holding names six mvpa variables wdaycode Equal M$wday produced g.getmeta ID Person Identification number, can numeric character deviceSerialNumber produced g.extractheadervars ExtFunColsi column index metashort metric stored myfun External function object applied raw data, see g.getmeta. desiredtz see g.part1 params_247 See g.part2 params_phyact See g.part2 ... argument used previous version g.analyse.perday, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perday.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","text":"daysummary Summary per day file analysed ds_names Variable names daysummary windowsummary Window summary, used selectdayfile specified ws_names Variable names windowsummary","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perday.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perfile.html","id":null,"dir":"Reference","previous_headings":"","what":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","text":"Generates recording specific analyses fills corresponding output matrix, g.analyse.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","text":"","code":"g.analyse.perfile(I, C, metrics_nav, AveAccAve24hr, doquan, doiglevels, tooshort, params_247, params_cleaning, params_general, output_avday, output_perday, dataqual_summary, file_summary)"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perfile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","text":"output g.inspectfile C output g.calibrate metrics_nav List three objects help navigate acceleration metrics AveAccAve24hr Average acceleration average 24 hour cycle doquan Boolean whether quantile analysis done doiglevels Boolean indicate whether iglevels calculated tooshort 0 (file short) 1 (file short) params_247 see GGIR params_cleaning see GGIR params_general see GGIR output_avday Output g.analyse.avday output_perday Output g.analyse.perday dataqual_summary Data.frame data quality summary indicators produced g.analyse","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perfile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","text":"filesummary summary file analysed daysummary Summary per day file analysed","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perfile.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract metrics from acceleration signals — g.applymetrics","title":"Extract metrics from acceleration signals — g.applymetrics","text":"Function extract metrics acceleration signal. intended direct use user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract metrics from acceleration signals — g.applymetrics","text":"","code":"g.applymetrics(data, sf, ws3, metrics2do, n = 4, lb = 0.2, hb = 15, zc.lb = 0.25, zc.hb = 3, zc.sb = 0.01, zc.order = 2, actilife_LFE = FALSE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract metrics from acceleration signals — g.applymetrics","text":"data Three column matrix x, y, z acceleration data n filter order, see GGIR details sf sample frequency ws3 Epoch size seconds metrics2do Dataframe Boolean indicator metrics whether extracted . instance, metrics2do$.bfen = TRUE, indicates bfen metric extracted lb Lower boundery cut-frequencies, see GGIR. hb Higher boundery cut-frequencies, see GGIR. zc.lb See GGIR zc.hb See GGIR zc.sb See GGIR zc.order See GGIR actilife_LFE See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract metrics from acceleration signals — g.applymetrics","text":"Dataframe metric values columns average per epoch (ws3)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract metrics from acceleration signals — g.applymetrics","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract metrics from acceleration signals — g.applymetrics","text":"","code":"Gx = runif(n=10000,min=0,max=2) Gy = runif(n=10000,min=1,max=3) Gz = runif(n=10000,min=0,max=2) data = cbind(Gx, Gy, Gz) colnames(data) = c(\"x\", \"y\", \"z\") metrics2do = data.frame(do.bfen=TRUE,do.enmo=TRUE,do.lfenmo=FALSE, do.en=FALSE,do.hfen=FALSE,do.hfenplus=FALSE,do.mad=FALSE,do.anglex=FALSE, do.angley=FALSE,do.anglez=FALSE,do.roll_med_acc_x=FALSE, do.roll_med_acc_y=FALSE,do.roll_med_acc_z=FALSE, do.dev_roll_med_acc_x=FALSE,do.dev_roll_med_acc_y=FALSE, do.dev_roll_med_acc_z=FALSE,do.enmoa=FALSE, do.lfx=FALSE, do.lfy=FALSE, do.lfz=FALSE, do.hfx=FALSE, do.hfy=FALSE, do.hfz=FALSE, do.bfx=FALSE, do.bfy=FALSE, do.bfz=FALSE, do.zcx=FALSE, do.zcy=FALSE, do.zcz=FALSE, do.brondcounts=FALSE, do.neishabouricounts=FALSE) extractedmetrics = g.applymetrics(data,n=4,sf=40,ws3=5,metrics2do)"},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":null,"dir":"Reference","previous_headings":"","what":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"Function starts identifying ten second windows non-movement. Next, average acceleration per axis per window used estimate calibration error (offset scaling) per axis. function provides recommended correction factors address calibration error summary callibration procedure.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"","code":"g.calibrate(datafile, params_rawdata = c(), params_general = c(), params_cleaning = c(), inspectfileobject = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"datafile Name accelerometer file params_rawdata See g.part1 params_general See g.part1 params_cleaning See g.part1 inspectfileobject Output function g.inspectfile. verbose Boolean (default = TRUE). indicate whether console message printed. Note warnings error always printed can suppressed suppressWarning() suppressMessages(). ... argument used previous version g.calibrate, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"scale scaling correction values, e.g. c(1,1,1) offset offset correction values, e.g. c(0,0,0) tempoffset correction values related temperature, e.g. c(0,0,0) cal.error.start absolute difference Euclidean norm non-movement windows 1 g autocalibration cal.error.end absolute difference Euclidean norm non-movement windows 1 g autocalibration spheredata average, standard deviation, Euclidean norm temperature (available) ten second non-movement windows used autocalibration procedure npoints number 10 second -movement windows used populate sphere nhoursused number hours measurement data scanned find ten second time windows movement meantempcal mean temperature corresponding data used autocalibration. applies data temperate data collected available GGIR, GENEActiv, Axivity, instances ad-hoc .csv data.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"Vincent T van Hees Zhou Fang","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Auto-calibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Aug 7","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"","code":"if (FALSE) { # \\dontrun{ datafile = \"C:/myfolder/testfile.bin\" #Apply autocalibration: C = g.calibrate(datafile) print(C$scale) print(C$offset) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.conv.actlog.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","title":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","text":"Function read activity log convert data.frame ID date different qwindow vector.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.conv.actlog.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","text":"","code":"g.conv.actlog(qwindow, qwindow_dateformat=\"%d-%m-%Y\", epochSize = 5)"},{"path":"https://wadpac.github.io/GGIR/reference/g.conv.actlog.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","text":"qwindow Path csv file activity log. Expected format activity diary : First column headers followed one row per recording, first column recording ID, needs match ID GGIR extracts accelerometer file. Followed date column format \"23-04-2017\", date format specified argument qwindow_dateformat (). Use character combination date, Date DATE column name. followed one multiple columns start times activity types day format hours:minutes:seconds. header column used label activity type. Insert new date column continuing activity types next day. Leave missing values empty. activitylog used individuals appear activitylog still processed value c(0,24). Dates activiy log data can skipped, need column date followed column next date. times activitylog multiple short window size (epoch length), next epoch considered (e.g., epoch 5 seconds, 8:00:02 redefined 8:00:05 activity log). qwindow_dateformat Character specifying date format used activity log. epochSize Short epoch size (first value windowsizes g.getmeta).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.conv.actlog.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","text":"Data.frame column ID, date qwindow, qwindow value qwindow vector","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.conv.actlog.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.convert.part2.long.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert part 2 report to long format — g.convert.part2.long","title":"Convert part 2 report to long format — g.convert.part2.long","text":"direct access used. function used inside g.report.part2 convert2 part 2 report long ormat multiple segments per day","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.convert.part2.long.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert part 2 report to long format — g.convert.part2.long","text":"","code":"g.convert.part2.long(daySUMMARY)"},{"path":"https://wadpac.github.io/GGIR/reference/g.convert.part2.long.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert part 2 report to long format — g.convert.part2.long","text":"daySUMMARY Object available inside g.report.part2","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.convert.part2.long.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert part 2 report to long format — g.convert.part2.long","text":"Data.frame long format version daySUMMARY","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.convert.part2.long.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert part 2 report to long format — g.convert.part2.long","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.create.sp.mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","title":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","text":"Function convert data sleep period matrix part g.part4.R. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.create.sp.mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","text":"","code":"g.create.sp.mat(nsp,spo,sleepdet.t,daysleep=FALSE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.create.sp.mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","text":"nsp Integer indicating number sleep periods spo Empty matrix overview sleep periods, 5 columns along nps sleepdet.t Part detected sleep g.sib.det one night one sleep definition daysleep Boolean indicator whether person woke noon (daysleeper)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.create.sp.mat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","text":"spo matrix start end sleep period calendardate date corresponding day night started item wdayname weekdayname","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.create.sp.mat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.detecmidnight.html","id":null,"dir":"Reference","previous_headings":"","what":"Detect all midnights in a time series — g.detecmidnight","title":"Detect all midnights in a time series — g.detecmidnight","text":"Detect midnights time series","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.detecmidnight.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detect all midnights in a time series — g.detecmidnight","text":"","code":"g.detecmidnight(time,desiredtz, dayborder)"},{"path":"https://wadpac.github.io/GGIR/reference/g.detecmidnight.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detect all midnights in a time series — g.detecmidnight","text":"time Vector timestamps, either iso8601 POSIX format desiredtz See g.part2 dayborder see g.analyse","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.detecmidnight.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detect all midnights in a time series — g.detecmidnight","text":"Output function list containing following objects: firstmidnight = timestamp first midnight firstmidnighti = index first midnight lastmidnight = timestamp last midnight lastmidnighti = index last midnight midnights = timestamps midnights midnightsi = indeces midnights","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.detecmidnight.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detect all midnights in a time series — g.detecmidnight","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":null,"dir":"Reference","previous_headings":"","what":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"function used g.readaccfile assess numeric data interpretted","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"","code":"g.dotorcomma(inputfile, dformat, mon, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"inputfile full path inputfile dformat Data format code: 1=.bin, 2=.csv, 3=.wav, 4=.cwa, 5=.csv ad-hoc monitor brand mon Monitor code (accelorometer brand): 0=undefined, 1=GENEA, 2=GENEActiv, 3=Actigraph, 4=Axivity, 5=Movisense, 6=Verisense ... input arguments needed function read.myacc.csv working non-standard csv formatted files.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"Character object showing decimals separated","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"","code":"if (FALSE) { # \\dontrun{ decn = g.dotorcomma(inputfile=\"C:/myfile.bin\",dformat=1,mon=2) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts header variables from header object — g.extractheadervars","title":"Extracts header variables from header object — g.extractheadervars","text":"Function intended direct interaction package end user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts header variables from header object — g.extractheadervars","text":"","code":"g.extractheadervars(I)"},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts header variables from header object — g.extractheadervars","text":"Object produced g.inspectfile","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts header variables from header object — g.extractheadervars","text":"ID = participant identifier iid = investigator identifier HN = handedness BodyLocation = Attachement location sensor SX = sex deviceSerialNumber = serial number","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extracts header variables from header object — g.extractheadervars","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extracts header variables from header object — g.extractheadervars","text":"","code":"data(data.inspectfile) headervars = g.extractheadervars(I=data.inspectfile)"},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":null,"dir":"Reference","previous_headings":"","what":"Fragmentation metrics from time series. — g.fragmentation","title":"Fragmentation metrics from time series. — g.fragmentation","text":"function used g.part5 derive time series fragmentation metrics. function assumes NA values nonwear time accounted data enters function.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fragmentation metrics from time series. — g.fragmentation","text":"","code":"g.fragmentation(frag.metrics = c(\"mean\", \"TP\", \"Gini\", \"power\", \"CoV\", \"NFragPM\", \"all\"), LEVELS = c(), Lnames=c(), xmin=1, mode = \"day\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fragmentation metrics from time series. — g.fragmentation","text":"frag.metrics Character fragmentation metric exract. Can \"mean\", \"TP\", \"Gini\", \"power\", \"CoV\", \"NFragPM\", metrics \"\". See details. LEVELS Numeric vector behavioural level classes derived identify_levels Lnames Character vector names classes used LEVELS, see details. xmin Numeric scalar indicate minimum recordable fragment length. g.part5 derived epoch length. mode Character indicate whether input data daytime (\"day\") sleep period time (\"spt\").","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fragmentation metrics from time series. — g.fragmentation","text":"List Character object showing decimals separated TP_PA2IN Transition probability physical activity inactivity . TP_IN2PA Transition probability physical inactivity activity Nfrag_IN2LIPA Number inacitivty fragments succeeded LIPA (light physical activity) TP_IN2LIPA Transition probability physical inactivity LIPA Nfrag_IN2MVPA Number inacitivty fragments succeeded MVPA (moderate vigorous physical activity) TP_IN2MVPA Transition probability physical inactivity MVPA Nfrag_MVPA Number MVPA fragments Nfrag_LIPA Number LIPA fragments mean_dur_MVPA mean MVPA fragment duration mean_dur_LIPA mean LIPA fragment duration Nfrag_IN Number inactivity fragments Nfrag_PA Number activity fragments mean_dur_IN mean duration inactivity fragments mean_dur_PA mean duration activity fragments Gini_dur_IN Gini index corresponding inactivity fragment durations Gini_dur_PA Gini index corresponding activity fragment durations CoV_dur_IN Coefficient Variance corresponding inactivity fragment durations CoV_dur_PA Coefficient Variance corresponding activity fragment durations alpha_dur_IN Alpha fitted power distribution inactivity fragment durations alpha_dur_PA Alpha fitted power distribution activity fragment durations x0.5_dur_IN x0.5 corresponding alpha_dur_IN x0.5_dur_PA x0.5 corresponding alpha_dur_PA W0.5_dur_IN W0.5 corresponding alpha_dur_IN W0.5_dur_PA W0.5 corresponding alpha_dur_PA NFragPM_IN Number fragments per minutes NFragPM_PA Number PA fragments per minutes PA SD_dur_IN Standard deviation duration inactivity fragments SD_dur_PA Standard deviation duration physical activity fragments","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fragmentation metrics from time series. — g.fragmentation","text":"See package vignette description fragmentation metrics. short, abbreviation \"TP\" refers transition probality metrics, abbreviation \"CoV\" refers Coefficient Variance, metric \"NFragPM\" refers Number fragments per minute. Regarding Lnames argument. class names included categorised follows: Inactive, name includes character strings \"day_IN_unbt\" \"day_IN_bts\" LIPA, name includes character strings \"day_LIG_unbt\" \"day_LIG_bts\" MVPA, name includes character strings \"day_MOD_unbt\", \"day_VIG_unbt\", \"day_MVPA_bts\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fragmentation metrics from time series. — g.fragmentation","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fragmentation metrics from time series. — g.fragmentation","text":"","code":"if (FALSE) { # \\dontrun{ x = c(6, 5, 6, 7, 6, 6, 7, 6, 6, 5, 6, 6, 6, 5, 7, 6, 6, 5, 5, 5, 6, 7, 6, 6, 6, 6, 7, 6, 5, 5, 5, 5, 5, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 6, 5, 6, 5, 6, 5, rep(12, 11), 5, 6, 6, 6, 5, 6, rep(9, 14), 6, 5, 7, 7, 6, 7, 7, 7, 6, 6, 6, 5, 6, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5) Lnames = c(\"spt_sleep\", \"spt_wake_IN\", \"spt_wake_LIG\", \"spt_wake_MOD\", \"spt_wake_VIG\", \"day_IN_unbt\", \"day_LIG_unbt\", \"day_MOD_unbt\", \"day_VIG_unbt\", \"day_MVPA_bts_10\", \"day_IN_bts_30\", \"day_IN_bts_10_30\", \"day_LIG_bts_10\") out = g.fragmentation(frag.metrics = \"all\", LEVELS = x, Lnames=Lnames)} # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":null,"dir":"Reference","previous_headings":"","what":"function to calculate bouts from vector of binary classes — g.getbout","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"detect bouts behaviour time series. function used g.analyse","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"","code":"g.getbout(x, boutduration, boutcriter = 0.8, ws3 = 5)"},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"x vector zeros /ones screened bouts ones boutduration duration bout epochs boutcriter Minimum percentage boutduration epoch values expected meet threshold criterium ws3 epoch length seconds, needed bout.metric =3, needs measure many epochs equal 1 minute breaks","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"Vector binary numbers indicator bouts detected","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"Vincent T van Hees Jairo Hidalgo Migueles","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"","code":"y = g.getbout(x=round(runif(1000, 0.4, 1)), boutduration = 120, boutcriter=0.9, ws3 = 5)"},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract M5 and L5 from time series — g.getM5L5","title":"Extract M5 and L5 from time series — g.getM5L5","text":"Extract M5 L5 time series, function used g.analyse intended direct use package user. Please see g.analyse clarification functionalities","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract M5 and L5 from time series — g.getM5L5","text":"","code":"g.getM5L5(varnum,ws3,t0_LFMF,t1_LFMF,M5L5res,winhr,qM5L5=c(), iglevels=c(), MX.ig.min.dur=10)"},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract M5 and L5 from time series — g.getM5L5","text":"varnum Numeric vector epoch values ws3 Small epoch size seconds t0_LFMF Start hour day M5L5 analyses, e.g. 0 midnight t1_LFMF End hour day M5L5 analyses, e.g. 24 midnight M5L5res Resolution hte M5L5 analyses minutes winhr windowsize M5L5 analyses, e.g. 5 hours qM5L5 Percentiles (quantiles) calculated L5 M5 window. iglevels See g.analyse. provided intensity gradient calculated MX windows larger equal argument MX.ig.min.dur MX.ig.min.dur Minimum MX duration needed order intensity gradient calculated","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract M5 and L5 from time series — g.getM5L5","text":"DAYL5HOUR = Starting time hours L5 DAYL5VALUE = average acceleration L5 DAYM5HOUR = Starting time hours M5 DAYM5VALUE = average acceleration M5 V5NIGHT = average acceleration 1am 6am","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract M5 and L5 from time series — g.getM5L5","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract M5 and L5 from time series — g.getM5L5","text":"","code":"if (FALSE) { # \\dontrun{ data(data.getmeta) g.getM5L5(varnum=data.getmeta,ws3=5,t0_LFMF=0,t1_LFMF=24,M5L5res=10,winhr=5) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"Reads accelerometer file blocks, extracts various features stores average feature value per short long epoch. Acceleration angle metrics stored short epoch length. non-wear indication score, clipping score, temperature (available), light (available), Euclidean norm stored long epoch length. function designed thoroughly tested accelerometer files GENEA GENEActiv bin files. , function able cope ActiGraph gt3x csv files, Axivity cwa csv files, Movisens bin files, ad-hoc csv files read read.myacc.csv function.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"","code":"g.getmeta(datafile, params_metrics = c(), params_rawdata = c(), params_general = c(), params_cleaning = c(), daylimit = FALSE, offset = c(0, 0, 0), scale = c(1, 1, 1), tempoffset = c(0, 0, 0), meantempcal = c(), myfun = c(), inspectfileobject = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"datafile name accelerometer file params_metrics See details GGIR. params_rawdata See details GGIR. params_general See details GGIR. params_cleaning See details GGIR. daylimit number days limit (roughly), set FALSE daylimit applied offset offset correction value per axis, usage: value = scale(value,center = -offset, scale = 1/scale) scale scaling correction value per axis, usage: value = scale(value,center = -offset, scale = 1/scale) tempoffset temperature offset correction value per axis, usage: value = scale(value,center = -offset, scale = 1/scale) + scale(temperature, center = rep(averagetemperate,3), scale = 1/tempoffset) meantempcal mean temperature corresponding data used autocalibration. autocalibration done temperature available leave blank (default) myfun External function object applied raw data. See details applyExtFunction. inspectfileobject Output function g.inspectfile. verbose Boolean (default = TRUE). indicate whether console message printed. Note warnings error always printed can suppressed suppressWarning() suppressMessages(). ... argument used previous version g.getmeta, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"metalong dataframe long epoch meta-data: EN, non-wear score, clipping score, temperature metashort dataframe short epoch meta-data: timestamp metric tooshort indicator whether file short processing (TRUE FALSE) corrupt indicator whether file considered corrupt (TRUE FALSE)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"van Hees VT, Gorzelniak L, Dean Leon EC, Eder M, Pias M, et al. (2013) Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. PLoS ONE 8(4): e61691. doi:10.1371/journal.pone.0061691 Aittasalo M, Vaha-Ypya H, Vasankari T, Husu P, Jussila , Sievanen H. Mean amplitude deviation calculated raw acceleration data: novel method classifying intensity adolescents physical activity irrespective accelerometer brand. BMC Sports Science, Medicine Rehabilitation (2015).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"","code":"if (FALSE) { # \\dontrun{ datafile = \"C:/myfolder/testfile.bin\" #Extract meta-data: M = g.getmeta(datafile) #Inspect first couple of rows of long epoch length meta data: print(M$metalong[1:5,]) #Inspect first couple of rows of short epoch length meta data: print(M$metalong[1:5,]) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.getstarttime.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract start time of a measurement — g.getstarttime","title":"Extract start time of a measurement — g.getstarttime","text":"Extract start time measurement. GGIR calculates timestamps using first timestamp sample frequency. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getstarttime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract start time of a measurement — g.getstarttime","text":"","code":"g.getstarttime(datafile, data, mon, dformat, desiredtz, configtz = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/g.getstarttime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract start time of a measurement — g.getstarttime","text":"datafile Full path data file data Data part g.readaccfile output mon g.dotorcomma dformat g.dotorcomma desiredtz g.dotorcomma configtz g.dotorcomma","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getstarttime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract start time of a measurement — g.getstarttime","text":"starttime","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getstarttime.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract start time of a measurement — g.getstarttime","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"Functions takes output g.getmeta information study protocol label impute invalid time segments data.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"","code":"g.impute(M, I, params_cleaning = c(), desiredtz=\"\", dayborder= 0, TimeSegments2Zero =c(), acc.metric = \"ENMO\", ID, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"M output g.getmeta output g.inspectfile params_cleaning See g.part1 desiredtz See g.part1 dayborder See g.part1 TimeSegments2Zero Optional data.frame specify time segments need ignored imputation, acceleration metrics imputed zeros. data.frame expected contain two columns named windowstart windowend, start- end time time segment POSIXlt class. acc.metric See GGIR ID ID extracted g.part2. ... argument used previous version g.impute, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"metashort imputed short epoch variables rout matrix clarify data imputed long epoch time window reason imputation. Value = 1 indicates imputation. Columns 1 = monitor non wear, column 2 = clipping, column 3 = additional nonwear, column 4 = protocol based exclusion column5 = sum column 1,2,3 4. averageday matrix n columns n metrics values m rows m short epoch time windows average 24 hours period","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"","code":"if (FALSE) { # \\dontrun{ #inspect file: I = g.inspectfile(datafile) #autocalibration: C = g.calibrate(datafile) #get meta-data: M = g.getmeta(datafile) } # } data(data.getmeta) data(data.inspectfile) #impute meta-data: IMP = g.impute(M=data.getmeta, I=data.inspectfile)"},{"path":"https://wadpac.github.io/GGIR/reference/g.imputeTimegaps.html","id":null,"dir":"Reference","previous_headings":"","what":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","title":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","text":"Removes sample zero three axes, (default) imputes time gaps last recorded value per axis normalised 1 _g_","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.imputeTimegaps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","text":"","code":"g.imputeTimegaps(x, sf, k = 0.25, impute = TRUE, PreviousLastValue = c(0,0,1), PreviousLastTime = NULL, epochsize = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/g.imputeTimegaps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","text":"x Data.frame raw accelerometer data, timestamp column millisecond resolution. sf Sample frequency Hertz k Minimum time gap length imputed impute Boolean indicate whether time gaps identified imputed PreviousLastValue Automatically identified last value previous chunk data read. PreviousLastTime Automatically identified last timestamp previous chunk data read. epochsize Numeric vector length two, short long epoch sizes.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.imputeTimegaps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","text":"List including: - x, data.frame based input x timegaps imputed (default) recordings 0 values three axes removed (impute = FALSE) - QClog, data.frame information number time gaps found total time imputed minutes","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.imputeTimegaps.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.inspectfile.html","id":null,"dir":"Reference","previous_headings":"","what":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","title":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","text":"Inspects accelerometer file key information, including: monitor brand, sample frequency file header","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.inspectfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","text":"","code":"g.inspectfile(datafile, desiredtz = \"\", params_rawdata = c(), configtz = c(), ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.inspectfile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","text":"datafile name data file desiredtz Desired timezone, see documentation g.getmeta params_rawdata See g.part1 configtz ... ... argument used previous version g.getmeta, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.inspectfile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","text":"header fileheader monn monitor name (genea, geneactive) monc monitor brand code (0 - ad-hoc file format, 1 = genea (non-commercial), 2 = GENEActive, 3 = actigraph, 4 = Axivity (AX3, AX6), 5 = Movisense, 6 = Verisense) dformn data format name, e.g bin, csv, cwa, gt3x dformc data format code (1 = .bin, 2 = .csv, 3 = .wav, 4 = .cwa, 5 = ad-hoc .csv, 6 = .gt3x) sf samplefrequency Hertz filename filename","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.inspectfile.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":null,"dir":"Reference","previous_headings":"","what":"Intensity gradient calculation — g.intensitygradient","title":"Intensity gradient calculation — g.intensitygradient","text":"Calculates intensity gradient based Rowlands et al. 2018. function assumes user already calculated value distribution.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intensity gradient calculation — g.intensitygradient","text":"","code":"g.intensitygradient(x,y)"},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intensity gradient calculation — g.intensitygradient","text":"x Numeric vector mid-points bins (mg) y Numeric vector time spent bins (minutes)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Intensity gradient calculation — g.intensitygradient","text":"y_intercept y-intercept linear regression line log-log space gradient Beta coefficient linear regression line log-log space rsquared R squared x y values log-log space","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Intensity gradient calculation — g.intensitygradient","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Intensity gradient calculation — g.intensitygradient","text":"Rowlands , Edwardson CL, et al. (2018) Beyond Cut Points: Accelerometer Metrics Capture Physical Activity Profile. MSSE 50(6):1. doi:10.1249/MSS.0000000000001561","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculates IV and IS — g.IVIS","title":"Calculates IV and IS — g.IVIS","text":"extract interdaily stability interdaily variability originally proposed van Someren.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculates IV and IS — g.IVIS","text":"","code":"g.IVIS(Xi, epochsizesecondsXi = 5, IVIS_epochsize_seconds = c(), IVIS_windowsize_minutes = 60, IVIS.activity.metric = 1, IVIS_acc_threshold = 20, IVIS_per_daypair = FALSE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculates IV and IS — g.IVIS","text":"Xi Vector acceleration values, e.g. ENMO metric. epochsizesecondsXi Epoch size values Xi expressed seconds. IVIS_epochsize_seconds argument depricated. IVIS_windowsize_minutes Window size Intradaily Variability (IV) Interdaily Stability () metrics minutes, needs able add 24 hours. IVIS.activity.metric Metric used activity calculation. Value = 1, uses continuous scaled acceleration. Value = 2, tries collapse acceleration binary score rest versus active try simulate original approach. IVIS_acc_threshold Acceleration threshold distinguish inactive active IVIS_per_daypair Boolean indicate whether IVIS calculated per day pair aggregated across day pairs weighted day completeness (default FALSE).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculates IV and IS — g.IVIS","text":"InterdailyStability IntradailyVariability","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculates IV and IS — g.IVIS","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculates IV and IS — g.IVIS","text":"Eus J. W. Van Someren, Dick F. Swaab, Christopher C. Colenda, Wayne Cohen, W. Vaughn McCall & Peter B. Rosenquist. Bright Light Therapy: Improved Sensitivity Effects Rest-Activity Rhythms Alzheimer Patients Application Nonparametric Methods Chronobiology International. 1999. Volume 16, issue 4.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculates IV and IS — g.IVIS","text":"","code":"Xi = abs(rnorm(n = 10000,mean = 0.2)) IVISvariables = g.IVIS(Xi=Xi)"},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":null,"dir":"Reference","previous_headings":"","what":"Load and clean sleeplog information — g.loadlog","title":"Load and clean sleeplog information — g.loadlog","text":"Loads sleeplog csv input file applies sanity checks storing output dataframe","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load and clean sleeplog information — g.loadlog","text":"","code":"g.loadlog(loglocation=c(),coln1=c(),colid=c(), sleeplogsep=\",\", meta.sleep.folder = c(), desiredtz=\"\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load and clean sleeplog information — g.loadlog","text":"loglocation Location spreadsheet (csv) sleep log information. See package vignette explanation expected format coln1 Column number sleep log spreadsheet onset first night starts colid Column number sleep log spreadsheet participant ID code stored (default = 1) sleeplogsep Value used sep argument reading sleeplog csv file, usually \",\" \";\". argument deprecated. meta.sleep.folder Path part3 milestone data, specify sleeplog advanced format. desiredtz See g.part4","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load and clean sleeplog information — g.loadlog","text":"Data frame sleeplog, can either basic format advanced format. See GGIR package vignette discussion two formats.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Load and clean sleeplog information — g.loadlog","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load and clean sleeplog information — g.loadlog","text":"","code":"if (FALSE) { # \\dontrun{ sleeplog = g.loadlog(loglocation=\"C:/mysleeplog.csv\",coln1=2, colid=1) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":null,"dir":"Reference","previous_headings":"","what":"function to load and pre-process acceleration files — g.part1","title":"function to load and pre-process acceleration files — g.part1","text":"Calls function g.getmeta g.calibrate, converts output .RData-format input g.part2. , function generates folder structure keep track various output files. reason g.part1 g.part2 merged one generic shell function g.part1 takes much longer involves minor decisions interest movement scientist. Function g.part2 hand relatively fast comes decisions directly impact variables interest movement scientist. Therefore, user may want run g.part1 overnight computing cluster, g.part2 can main playing ground movement scientist. Function GGIR provides main shell allows operating g.part1 g.part2.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to load and pre-process acceleration files — g.part1","text":"","code":"g.part1(datadir = c(), metadatadir = c(), f0 = 1, f1 = c(), myfun = c(), params_metrics = c(), params_rawdata = c(), params_cleaning = c(), params_general = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to load and pre-process acceleration files — g.part1","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory output needs stored. Note function attempt create folders directory uses folder keep output. f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) myfun External function object applied raw data. See details applyExtFunction. params_metrics See details GGIR. params_rawdata See details GGIR. params_cleaning See details GGIR. params_general See details GGIR. verbose See details GGIR. ... working non-standard csv formatted files, g.part1 also takes input arguments needed function read.myacc.csv argument rmc.noise get_nw_clip_block_params. First test argument function read.myacc.csv directly. ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"function to load and pre-process acceleration files — g.part1","text":"GGIR comes many processing parameters, thematically grouped parameter objects (R list). running print(load_params()) can see default values parameter objects. g.part 1 used via GGIR option specifiy configuration file, overrule default parameter values. , user can set parameter values input argument g.part1 GGIR. Directly specified argument overrule configuration file default values. See GGIR package vignette details section GGIR elaborate overview parameter objects usage across GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to load and pre-process acceleration files — g.part1","text":"function provides values, ensures output functions stored .RData(one file per accelerometer file) folder structure","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to load and pre-process acceleration files — g.part1","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"function to load and pre-process acceleration files — g.part1","text":"van Hees VT, Gorzelniak L, Dean Leon EC, Eder M, Pias M, et al. (2013) Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. PLoS ONE 8(4): e61691. doi:10.1371/journal.pone.0061691 van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Auto-calibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Aug 7 Aittasalo M, Vaha-Ypya H, Vasankari T, Husu P, Jussila , Sievanen H. Mean amplitude deviation calculated raw acceleration data: novel method classifying intensity adolescents physical activity irrespective accelerometer brand. BMC Sports Science, Medicine Rehabilitation (2015).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"function to load and pre-process acceleration files — g.part1","text":"","code":"if (FALSE) { # \\dontrun{ datafile = \"C:/myfolder/mydata\" outputdir = \"C:/myresults\" g.part1(datadir,outputdir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":null,"dir":"Reference","previous_headings":"","what":"function to analyse and summarize pre-processed output from g.part1 — g.part2","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"Loads output g.part1 applies g.impute g.analyse, output converted .RData-format used GGIR generate reports. variables reports variables described g.analyse.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"","code":"g.part2(datadir = c(), metadatadir = c(), f0 = c(), f1 = c(), myfun = c(), params_cleaning = c(), params_247 = c(), params_phyact = c(), params_output = c(), params_general = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) myfun External function object applied raw data. See details applyExtFunction. params_cleaning See details GGIR. params_247 See details GGIR. params_phyact See details GGIR. params_output See details GGIR. params_general See details GGIR. verbose See details GGIR. ... ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"function provides values, ensures functions called output stored folder structure created g.part1.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"GGIR comes many processing parameters, thematically grouped parameter objects (R list). running print(load_params()) can see default values parameter objects. g.part 2 used via GGIR option specifiy configuration file, overrule default parameter values. , user can set parameter values input argument g.part2 GGIR. Directly specified argument overrule configuration file default values. See GGIR package vignette details section GGIR elaborate overview parameter objects usage across GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"van Hees VT, Gorzelniak L, Dean Leon EC, Eder M, Pias M, et al. (2013) Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. PLoS ONE 8(4): e61691. doi:10.1371/journal.pone.0061691 van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Auto-calibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Aug 7","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"","code":"if (FALSE) { # \\dontrun{ metadatadir = \"C:/myresults/output_mystudy\" g.part2(metadatadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":null,"dir":"Reference","previous_headings":"","what":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"Function called function GGIR. estimates sustained inactivity periods day, used input g.part4 labels nocturnal sleep day time sustained inactivity periods. Typical users work function GGIR .","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"","code":"g.part3(metadatadir = c(), f0, f1, myfun = c(), params_sleep = c(), params_metrics = c(), params_output = c(), params_general = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) myfun External function object applied raw data. See details applyExtFunction. params_sleep See details GGIR. params_metrics See details GGIR. params_output See details GGIR. params_general See details GGIR. verbose See details GGIR. ... ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"GGIR comes many processing parameters, thematically grouped parameter objects (R list). running print(load_params()) can see default values parameter objects. g.part 3 used via GGIR option specifiy configuration file, overrule default parameter values. , user can set parameter values input argument g.part3 GGIR. Directly specified argument overrule configuration file default values. See GGIR package vignette details section GGIR elaborate overview parameter objects usage across GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"function provides values, ensures functions called output stored .RData files. night nightnumber definition definition sustained inactivity. example, T10A5 refers 10 minute window 5 degree angle (see paper explaination). start.time.day timestamp day started nsib.periods number sustained inactivity bouts tot.sib.dur.hrs total duration sustained inactivity bouts fraction.night.invalid fraction night accelerometer data invalid, e.g. monitor worn sib.period number sustained inactivity period sib.onset.time onset time sustained inactivity period sib.end.time end time sustained inactivity period","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"van Hees VT, Sabia S, et al. (2015) novel, open access method assess sleep duration using wrist-worn accelerometer, PLoS ONE, November 2015 van Hees VT, Sabia S, et al. (2018) Estimating sleep parameters using accelerometer without sleep diary. Scientific Reports.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"","code":"if (FALSE) { # \\dontrun{ metadatadir = \"C:/myfolder/meta\" # assumes that there is a subfolder in # metadatadir named 'basic' containing the output from g.part1 g.part3(metadatadir=metadatadir, anglethreshold=5, timethreshold=5, overwrite=FALSE) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":null,"dir":"Reference","previous_headings":"","what":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"Combines output g.part3 guider information estimate sleep variables. See vignette paragraph \"Sleep full day time-use analysis GGIR\" elaborate descript sleep detection.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"","code":"g.part4(datadir = c(), metadatadir = c(), f0 = f0, f1 = f1, params_sleep = c(), params_metrics = c(), params_cleaning = c(), params_output = c(), params_general = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) params_sleep List parameters used sleep analysis (GGIR part 3, 4, 5): see documentation g.part3. params_metrics List parameters used metrics extraction (GGIR part 1): see documentation g.part1. params_cleaning See details GGIR. params_output See details GGIR. params_general See details GGIR. verbose See details GGIR. ... ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"function produce values generates RData file milestone subfolder ms4.incudes dataframe named nightsummary. dataframe used g.report.part4 create two reports one per night one per person. See package vignette paragraph \"Output part 4\" description variables.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"van Hees VT, Sabia S, et al. (2018) AEstimating sleep parameters using accelerometer without sleep diary, Scientific Reports. van Hees VT, Sabia S, et al. (2015) novel, open access method assess sleep duration using wrist-worn accelerometer, PLoS ONE.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"","code":"if (FALSE) { # \\dontrun{ metadatadir = \"C:/myfolder/meta\" # assumes that there is a subfolder in # metadatadir named 'ms3.out' containing the output from g.part3 g.part4(metadatadir=metadatadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part4_extradctid.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","title":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","text":"Extracts ID filename finds matching rows sleeplog. Function designed direct use GGIR users.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4_extradctid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","text":"","code":"g.part4_extractid(idloc, fname, dolog, sleeplog, accid = c())"},{"path":"https://wadpac.github.io/GGIR/reference/g.part4_extradctid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","text":"idloc See g.part4 fname Full patth filename dolog Boolean indicate whether rely sleeplog sleeplog Sleeplog data.frame passed g.part4 accid ID extracted acceleration file GGIR part3. available leave blank.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4_extradctid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","text":"List accid ID matching_indices_sleeplog vector matching row indices sleeplog","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4_extradctid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addfirstwake.html","id":null,"dir":"Reference","previous_headings":"","what":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","title":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","text":"intended direct use GGIR users. Adds first wake missing part 4 output part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addfirstwake.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","text":"","code":"g.part5.addfirstwake(ts, summarysleep, nightsi, sleeplog, ID, Nepochsinhour, SPTE_end)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addfirstwake.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","text":"ts Data.frame object passed g.part5 summarysleep Data.frame object passed g.part5 sleep summary information g.part4. nightsi Vector indices nights sleeplog Data.frame sleeplog information ID Participant ID Nepochsinhour Number epochs hour SPTE_end Sleep period time end index","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addfirstwake.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","text":"Data.frame ts updated first wakeup time","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addfirstwake.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addsib.html","id":null,"dir":"Reference","previous_headings":"","what":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","title":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","text":"intended direct use GGIR users. Adds sustained inactivity bout ts series part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addsib.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","text":"","code":"g.part5.addsib(ts, epochSize, part3_output, desiredtz, sibDefinition, nightsi)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addsib.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","text":"ts Data.frame object passed g.part5 epochSize Short epoch size seconds part3_output Segment part 3 output relevant current sleep definition desiredtz see GGIR sibDefinition Character indicate definition sib (sustained inactivity bout) nightsi Vector indices midnights","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addsib.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","text":"Data.frame ts","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addsib.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.analyseRest.html","id":null,"dir":"Reference","previous_headings":"","what":"Analyse rest (internal function) — g.part5.analyseRest","title":"Analyse rest (internal function) — g.part5.analyseRest","text":"Analyses overlap self-reported napping, non-wear sib. Internal function intended direct use GGIR end-user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.analyseRest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Analyse rest (internal function) — g.part5.analyseRest","text":"","code":"g.part5.analyseRest(sibreport = NULL, dsummary = NULL, ds_names = NULL, fi = NULL, di = NULL, time = NULL, tz = NULL, possible_nap_dur = 0, possible_nap_edge_acc = Inf)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.analyseRest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Analyse rest (internal function) — g.part5.analyseRest","text":"sibreport sibreport data.frame produced g.sibreport dsummary matrix created internally g.part5 ds_names character vector variable names corresponding dsummary created internally g.part5 fi Numeric scalar indicate variable index, created internally g.part5 di Numeric scalar indicate recording index, created internally g.part5 time Daytime section time column ts object, created internally g.part5, tz Timezone database name possible_nap_dur Minimum sib duration considered. self-reported naps/nonwear minimum duration 1 epoch. possible_nap_edge_acc Maximum acceleration SIB considered.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.analyseRest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Analyse rest (internal function) — g.part5.analyseRest","text":"List updated objects dsummary, ds_names, fi, di","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.analyseRest.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Analyse rest (internal function) — g.part5.analyseRest","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.classifyNaps.html","id":null,"dir":"Reference","previous_headings":"","what":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","title":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","text":"Classify Naps identified sustained inactivty bouts, based model originally trained hip-worn accelerometer data 3-3.5 year olds. Assume metric ENMO used HASIB.algo set vanHees2015.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.classifyNaps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","text":"","code":"g.part5.classifyNaps(sibreport = c(), desiredtz = \"\", possible_nap_window = c(9, 18), possible_nap_dur = c(15, 240), nap_model = \"hip3yr\", HASIB.algo = \"vanHees2015\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.classifyNaps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","text":"sibreport Object generated g.sibreport desiredtz See g.getmeta. possible_nap_window Numeric vector length two range clock hours naps assumed take place. possible_nap_dur Numeric vector length two range duration (minutes) nap. nap_model Character specify classification model. Currently option \"hip3yr\", corresponds model trained hip data 3-3.5 olds trained parent diary data. HASIB.algo See g.part3.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.classifyNaps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","text":"Data.frame classified naps newly detected non-wear periods.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.classifyNaps.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.definedays.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix missing night in part 4 output — g.part5.definedays","title":"Fix missing night in part 4 output — g.part5.definedays","text":"intended direct use GGIR users. Defines day windows start end part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.definedays.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix missing night in part 4 output — g.part5.definedays","text":"","code":"g.part5.definedays(nightsi, wi, indjump, nightsi_bu, epochSize, qqq_backup = c(), ts, timewindowi, Nwindows, qwindow, ID = NULL, dayborder = 0)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.definedays.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fix missing night in part 4 output — g.part5.definedays","text":"nightsi Vector indices midnights wi Numeric indicate window number indjump Number indices jump nightsi_bu See argument nightsi backup object epochSize Numeric epoch size seconds qqq_backup Backup qqq object, holds start end indices window ts Data.frame time series timewindowi Timewindow definition either \"MM\" \"WW\" Nwindows Number windows data qwindow qwindow argument ID ID participant dayborder dayborder argument","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.definedays.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fix missing night in part 4 output — g.part5.definedays","text":"List qqq qqq_backup","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.definedays.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fix missing night in part 4 output — g.part5.definedays","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.fixmissingnight.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix missing night in part 4 output — g.part5.fixmissingnight","title":"Fix missing night in part 4 output — g.part5.fixmissingnight","text":"intended direct use GGIR users. night missing part4 output function tries fix part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.fixmissingnight.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix missing night in part 4 output — g.part5.fixmissingnight","text":"","code":"g.part5.fixmissingnight(summarysleep, sleeplog = c(), ID)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.fixmissingnight.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fix missing night in part 4 output — g.part5.fixmissingnight","text":"summarysleep Object produced g.part4 sleeplog Sleeplog object passed g.part5 ID ID participant","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.fixmissingnight.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fix missing night in part 4 output — g.part5.fixmissingnight","text":"Corrected summarysleep_tmp2 object.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.fixmissingnight.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fix missing night in part 4 output — g.part5.fixmissingnight","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.handle_lux_extremes.html","id":null,"dir":"Reference","previous_headings":"","what":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","title":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","text":"Extreme values imputed mean neightbours occur isolated sequence two, removed occure sequence 3 longer.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.handle_lux_extremes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","text":"","code":"g.part5.handle_lux_extremes(lux)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.handle_lux_extremes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","text":"lux Vector lux values","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.handle_lux_extremes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","text":"List imputed lux values vector matching length named correction_log indicating timestamps imputed (value=1), replaced NA (value=2) untouched (value=0).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.handle_lux_extremes.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":null,"dir":"Reference","previous_headings":"","what":"Merge output from physical activity and sleep analysis into one report — g.part5","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"Function merge output g.part2 g.part4 one report enhanced profiling sleep physical activity stratified across intensity levels based bouted periods well non-bouted periods.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"","code":"g.part5(datadir = c(), metadatadir = c(), f0 = c(), f1 = c(), params_sleep = c(), params_metrics = c(), params_247 = c(), params_phyact = c(), params_cleaning = c(), params_output = c(), params_general = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) params_sleep See details GGIR. params_metrics See details GGIR. params_247 See details GGIR. params_phyact See details GGIR. params_cleaning See details GGIR. params_output See details GGIR. params_general See details GGIR. verbose See details GGIR. ... ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"function produce values generates RData file milestone subfolder ms5.incudes dataframe named output. dataframe used g.report.part5 create two reports one per day one per person. See package vignette paragraph \"Output part 5\" description variables.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"","code":"if (FALSE) { # \\dontrun{ metadatadir = \"C:/myfolder/meta\" g.part5(metadatadir=metadatadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.lux_persegment.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","title":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","text":"Extracts per segment day: mean lux, time 1000 lux, time awake, time LUX imputed. Function intended direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.lux_persegment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","text":"","code":"g.part5.lux_persegment(ts, sse, LUX_day_segments, epochSize, desiredtz = \"\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.lux_persegment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","text":"ts Data.frame time series sse Indices corresponding current time window (e.g. MM WW) LUX_day_segments See GGIR epochSize Numeric epoch size seconds desiredtz See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.lux_persegment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","text":"List values (vector) derived variables corresponding names (vector).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.lux_persegment.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.ontsetwaketiming.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","title":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","text":"intended direct use GGIR users. Labels timing wakeing sleep onset part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.ontsetwaketiming.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","text":"","code":"g.part5.onsetwaketiming(qqq, ts, min, sec, hour, timewindowi)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.ontsetwaketiming.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","text":"qqq Start end index window analyses ts Data.frame time series created g.part5 min Numeric vector minute values sec Numeric vector second values hour Numeric vector hour values timewindowi Character indicate timewindow definition used either \"MM\" \"WW\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.ontsetwaketiming.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","text":"list objects: wake, onset, wakei, onseti, skiponset, skipwake.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.ontsetwaketiming.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.savetimeseries.html","id":null,"dir":"Reference","previous_headings":"","what":"Saves part 5 time series to csv files — g.part5.savetimeseries","title":"Saves part 5 time series to csv files — g.part5.savetimeseries","text":"intended direct use GGIR users. Saves part 5 time series csv files part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.savetimeseries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Saves part 5 time series to csv files — g.part5.savetimeseries","text":"","code":"g.part5.savetimeseries(ts, LEVELS, desiredtz, rawlevels_fname, DaCleanFile = NULL, includedaycrit.part5 = 2/3, ID = NULL, params_output, params_247 = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.savetimeseries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Saves part 5 time series to csv files — g.part5.savetimeseries","text":"ts Data.frame time series LEVELS produced one objects output identify_levels desiredtz See GGIR. rawlevels_fname Path file output stored DaCleanFile Content data_cleaning_file documented g.report.part5. used function save_ms5rawlevels TRUE, affects time series files stored. includedaycrit.part5 See g.report.part5. used function save_ms5rawlevels TRUE, affects time series files stored. ID data_cleaning_file used argument specifies participant ID data correspond . params_output Parameters object, see GGIR params_247 See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.savetimeseries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Saves part 5 time series to csv files — g.part5.savetimeseries","text":"Function provide output, prepare data saving saves file. documention columns see main vignette.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.savetimeseries.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Saves part 5 time series to csv files — g.part5.savetimeseries","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.wakesleepwindows.html","id":null,"dir":"Reference","previous_headings":"","what":"Label wake and sleepperiod window — g.part5.wakesleepwindows","title":"Label wake and sleepperiod window — g.part5.wakesleepwindows","text":"intended direct use GGIR users. Label wake sleepperiod window part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.wakesleepwindows.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Label wake and sleepperiod window — g.part5.wakesleepwindows","text":"","code":"g.part5.wakesleepwindows(ts, part4_output, desiredtz, nightsi, sleeplog, epochSize,ID, Nepochsinhour)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.wakesleepwindows.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Label wake and sleepperiod window — g.part5.wakesleepwindows","text":"ts data.frame time series part4_output cleaned output part 4 desiredtz GGIR nightsi vector indices midnights sleeplog Data.frame sleeplog information loaded g.loadlog epochSize Short epochsize seconds ID ID participant Nepochsinhour Number epochs hour","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.wakesleepwindows.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Label wake and sleepperiod window — g.part5.wakesleepwindows","text":"Object ts","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.wakesleepwindows.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Label wake and sleepperiod window — g.part5.wakesleepwindows","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_analyseSegment.html","id":null,"dir":"Reference","previous_headings":"","what":"Analyses the time series per time segment for part 5 — g.part5_analyseSegment","title":"Analyses the time series per time segment for part 5 — g.part5_analyseSegment","text":"intended direct use GGIR users, part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_analyseSegment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Analyses the time series per time segment for part 5 — g.part5_analyseSegment","text":"","code":"g.part5_analyseSegment(indexlog, timeList, levelList, segments, segments_names, dsummary, ds_names, params_general, params_output, params_sleep, params_247, params_phyact, sumSleep, sibDef, fullFilename, add_one_day_to_next_date, lightpeak_available, tail_expansion_log, foldernamei, sibreport = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_analyseSegment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Analyses the time series per time segment for part 5 — g.part5_analyseSegment","text":"indexlog List objects related indices window, file, segment passed g.part5 aid selecting time segments keeping track file code . timeList List objects related time series passed g.part5. levelList List objects related intensity levels passed g.part5. segments List produced g.part5 segments_names Vector produced g.part5 dsummary Matrix hold daysummary (segment summary) ds_names Character vector column names dsummary matrix. code collects separately vector assigns end. params_general See GGIR params_output See GGIR params_sleep See GGIR params_247 See GGIR params_phyact See GGIR sumSleep Section data.frame produced g.part4 passed g.part5. sibDef Character identify sib definition. fullFilename Character full filename processed add_one_day_to_next_date Boolean indicate whether one day added next date lightpeak_available Boolean indicate whether light peak available tail_expansion_log Object generated g.part1 passed g.part5 argument recordingEndSleepHour used. foldernamei Character folder name data file stored. sibreport Sibreport object passed g.part5","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_analyseSegment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Analyses the time series per time segment for part 5 — g.part5_analyseSegment","text":"List objects: indexlog, timeList, matrix prelimenary results column names (dsummary ds_names, see input arguments )","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_initialise_ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Initialise time series data from for part 5 — g.part5_initialise_ts","title":"Initialise time series data from for part 5 — g.part5_initialise_ts","text":"Initialise time series dataframe ts, part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_initialise_ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initialise time series data from for part 5 — g.part5_initialise_ts","text":"","code":"g.part5_initialise_ts(IMP, M, params_247, params_general, longitudinal_axis = c())"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_initialise_ts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initialise time series data from for part 5 — g.part5_initialise_ts","text":"IMP Object derived g.part2 M Object derived g.part1. params_247 See GGIR params_general See GGIR longitudinal_axis passed g.part5, specified user estimated hip data part 2.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_initialise_ts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Initialise time series data from for part 5 — g.part5_initialise_ts","text":"Data.frame ts","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform temporal pattern analyses — g.part6","title":"Perform temporal pattern analyses — g.part6","text":"function aims facilitate time-pattern analysis building labelled time series derived GGIR part 5","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform temporal pattern analyses — g.part6","text":"","code":"g.part6(datadir = c(), metadatadir = c(), f0 = c(), f1 = c(), params_general = c(), params_phyact = c(), params_247 = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform temporal pattern analyses — g.part6","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) params_general See details GGIR. params_phyact See details GGIR. params_247 See details GGIR. verbose See details GGIR. ... ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform temporal pattern analyses — g.part6","text":"function produce values generates RData file milestone subfolder ms6.incudes ... (COMPLETED). dataframe used g.report.part6 create reports. See package vignette paragraph (COMPLETED) description variables.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Perform temporal pattern analyses — g.part6","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Perform temporal pattern analyses — g.part6","text":"","code":"if (FALSE) { # \\dontrun{ metadatadir = \"C:/myfolder/meta\" g.part6(metadatadir=metadatadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":null,"dir":"Reference","previous_headings":"","what":"function to generate a plot for quality check purposes — g.plot","title":"function to generate a plot for quality check purposes — g.plot","text":"Function takes meta-data generated g.getmeta g.impute create visual representation imputed time periods","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to generate a plot for quality check purposes — g.plot","text":"","code":"g.plot(IMP, M, I, durplot)"},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to generate a plot for quality check purposes — g.plot","text":"IMP output g.impute M output g.getmeta output g.inspectfile durplot number days plot","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to generate a plot for quality check purposes — g.plot","text":"function produces plot, values","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to generate a plot for quality check purposes — g.plot","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"function to generate a plot for quality check purposes — g.plot","text":"","code":"if (FALSE) { # \\dontrun{ #inspect file: I = g.inspectfile(datafile) #autocalibration: C = g.calibrate(datafile) #get meta-data: M = g.getmeta(datafile) } # } data(data.getmeta) data(data.inspectfile) #impute meta-data: IMP = g.impute(M = data.getmeta, I = data.inspectfile, strategy = 1, hrs.del.start = 0, hrs.del.end = 0, maxdur = 0) #plot data g.plot(IMP, M = data.getmeta, I = data.inspectfile, durplot=4)"},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"Function called GGIR generate report. intended direct use user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"","code":"g.plot5(metadatadir = c(), dofirstpage = FALSE, viewingwindow = 1, f0 = c(), f1 = c(), overwrite = FALSE, metric=\"ENMO\",desiredtz = \"\", threshold.lig = 30, threshold.mod = 100, threshold.vig = 400, visualreport_without_invalid = TRUE, includedaycrit = 0.66, includenightcrit = 0.66, verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . dofirstpage Boolean indicate whether first page historgrams summarizing whole measurement added viewingwindow See GGIR f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) overwrite See GGIR metric one metrics want consider describe behaviour. metric interest need calculated M (see g.part1) desiredtz See GGIR threshold.lig See GGIR threshold.mod See GGIR threshold.vig See GGIR visualreport_without_invalid See GGIR includenightcrit See GGIR includedaycrit See GGIR verbose See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"values, function generates plot","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"Vincent T van Hees Matthew R Patterson ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"","code":"if (FALSE) { # \\dontrun{ # generate plots for the first 10 files: g.plot5(metadatadir=\"C:/output_mystudy/meta/basic\",dofirstpage=TRUE, viewingwindow = 1,f0=1,f1=10,overwrite=FALSE,desiredtz = \"Europe/London\", threshold.lig,threshold.mod,threshold.vig) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":null,"dir":"Reference","previous_headings":"","what":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"function used g.getmeta g.calibrate read large blocks accelerometer file, processed deleted memory. needed memory management.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"","code":"g.readaccfile(filename, blocksize, blocknumber, filequality, ws, PreviousEndPage = 1, inspectfileobject = c(), PreviousLastValue = c(0,0,1), PreviousLastTime = NULL, params_rawdata = c(), params_general = c(), header = NULL, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"filename filename blocksize Size blocks (file pages) read blocknumber Block number relative start file, starting 1. filequality Single row dataframe columns: filetooshort, filecorrupt, filedoesnotholdday. value TRUE FALSE ws Larger windowsize non-detection, see documentation g.part2 PreviousEndPage Page number previous block ended (automatically assigned within g.getmeta g.calibrate). inspectfileobject Output function g.inspectfile. PreviousLastValue Automatically identified last value previous chunk data read. PreviousLastTime Automatically identified last timestamp previous chunk data read. params_rawdata See g.part1 params_general See g.part1 header Header information extracted previous time file read, re-used instead extracted . ... input arguments needed function read.myacc.csv working non-standard csv formatted files. Furter, argument used previous version g.readaccfile, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"P Block object extracted file format specific accelerometer brand filequality function arguments isLastBlock Boolean indicating whether last block read endpage Page number blocked ends, used input argument PreviousEndPage reading next block.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"","code":"if (FALSE) { # \\dontrun{ filequality = data.frame(filetooshort = FALSE, filecorrupt = FALSE, filedoesnotholdday = FALSE) output = g.readaccfile(filename = \"C:/myfile.bin\", blocksize = 20000, blocknumber = 1, selectdaysfile = c(), filequality = filequality, dayborder = 0, PreviousEndPage = c()) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.readtemp_movisens.html","id":null,"dir":"Reference","previous_headings":"","what":"Reads the temperature from movisens files. — g.readtemp_movisens","title":"Reads the temperature from movisens files. — g.readtemp_movisens","text":"Reads temperature movisens files, resamples adds matrix accelerations stored","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readtemp_movisens.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reads the temperature from movisens files. — g.readtemp_movisens","text":"","code":"g.readtemp_movisens(datafile, from = c(), to = c(), acc_sf, acc_length, interpolationType=1)"},{"path":"https://wadpac.github.io/GGIR/reference/g.readtemp_movisens.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reads the temperature from movisens files. — g.readtemp_movisens","text":"datafile Full path folder movisens bin files stored. Note movisens store set bin file one folder per recording. GGIR read pertinent bin file access temperature data. Origin point derive temperature movisens files (automatically calculated GGIR) End point derive temperature movisens files (automatically calculated GGIR) acc_sf Sample frequency acceleration data acc_length number acceleration data samples interpolationType Integer indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readtemp_movisens.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reads the temperature from movisens files. — g.readtemp_movisens","text":"Data matrix temperature values resampled 64 Hz.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readtemp_movisens.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reads the temperature from movisens files. — g.readtemp_movisens","text":"","code":"if (FALSE) { # \\dontrun{ P = g.readtemp_movisens(datafile, from = c(), to = c(), acc_sf = 64, acc_length = 3000) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part2.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate report from milestone data produced by g.part2 — g.report.part2","title":"Generate report from milestone data produced by g.part2 — g.report.part2","text":"Creates report milestone data produced g.part2. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate report from milestone data produced by g.part2 — g.report.part2","text":"","code":"g.report.part2(metadatadir = c(), f0 = c(), f1 = c(), maxdur = 0, store.long = FALSE, params_output, verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate report from milestone data produced by g.part2 — g.report.part2","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) maxdur see g.part2 store.long Booelean indicate whether output stored long format addition default wide format. Automatically turned TRUE using day segmentation qwindow. params_output Parameters object, see GGIR verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate report from milestone data produced by g.part2 — g.report.part2","text":"Function produce data, writes reports csv format visual reports pdf format","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate report from milestone data produced by g.part2 — g.report.part2","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part4.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate report from milestone data produced by g.part4 — g.report.part4","title":"Generate report from milestone data produced by g.part4 — g.report.part4","text":"Creates report milestone data produced g.part4. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part4.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate report from milestone data produced by g.part4 — g.report.part4","text":"","code":"g.report.part4(datadir = c(), metadatadir = c(), loglocation = c(), f0 = c(), f1 = c(), data_cleaning_file = c(), sleepwindowType = \"SPT\", params_output, verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part4.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate report from milestone data produced by g.part4 — g.report.part4","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . loglocation see g.part4 f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) data_cleaning_file see GGIR sleepwindowType see GGIR params_output Parameters object, see GGIR verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part4.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate report from milestone data produced by g.part4 — g.report.part4","text":"Function produce data, writes reports csv format visual report pdf. following files stored root results folder: part4_nightsummary_sleep_cleaned.csv part4_summary_sleep_cleaned.csv following files stored folder results/QC: part4_nightsummary_sleep_full.csv part4_summary_sleep_full.csv sleeplog used *_full.csv stored QC folder includes estimates nights data, *_cleaned.csv results folder includes estimates nights data excluding nights sleeplog entry valid accelerometer data. sleep log used * _cleaned.csv includes nights *_full.csv excluding nights insufficient data. study sleeplog available subset participants, want include individuals analysis, use *_full.csv output clean night level data excluding rows cleaningcode > 1 cases invalid accelerometer data present. means studies missing sleeplog entries individuals nights using *_full.csv output excluding rows (nights) cleaningcode > 1 lead * _cleaned.csv plus sleep estimates nights missing sleeplog, providing enough accelerometer data nights. words, *_cleaned.csv perfect want rely nights sleeplog use sleeplog . scenarios advise using *_full.csv report clean . See package vignette sections \"Sleep analysis\" \"Output part 4\" elaborative description sleep analysis reporting.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part4.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate report from milestone data produced by g.part4 — g.report.part4","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate report from milestone data produced by g.part5 — g.report.part5","title":"Generate report from milestone data produced by g.part5 — g.report.part5","text":"Creates report milestone data produced g.part5. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate report from milestone data produced by g.part5 — g.report.part5","text":"","code":"g.report.part5(metadatadir = c(), f0 = c(), f1 = c(), loglocation = c(), params_cleaning = NULL, LUX_day_segments = c(), params_output, verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate report from milestone data produced by g.part5 — g.report.part5","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) loglocation see g.part4 params_cleaning See details GGIR. LUX_day_segments see g.part5 params_output Parameters object, see GGIR verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate report from milestone data produced by g.part5 — g.report.part5","text":"Function produce data, writes reports csv format following files stored root results folder: part5_daysummary_* part5_personsummary_* following files stored folder results/QC: part5_daysummary_full_* See package vignette paragraph \"Waking-waking 24 hour time-use analysis\" \"Output part 5\" elaborative description full day time-use analysis reporting.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate report from milestone data produced by g.part5 — g.report.part5","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5_dictionary.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","title":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","text":"Creates data dictionary definitions outcomes exported reports milestone data produced g.part5. intended direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5_dictionary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","text":"","code":"g.report.part5_dictionary(metadatadir, params_output)"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5_dictionary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . params_output Parameters object, see GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5_dictionary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","text":"Function produce data, writes data dictionaries reports csv format following files stored root results folder: part5_dictionary_daysummary_* part5_dictionary_personsummary_*","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5_dictionary.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","text":"Vincent T van Hees Jairo Hidalgo Migueles ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part6.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate report from milestone data produced by g.part6 — g.report.part6","title":"Generate report from milestone data produced by g.part6 — g.report.part6","text":"Creates report milestone data produced g.part6. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part6.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate report from milestone data produced by g.part6 — g.report.part6","text":"","code":"g.report.part6(metadatadir = c(), f0 = c(), f1 = c(), params_cleaning = NULL, params_output, verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part6.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate report from milestone data produced by g.part6 — g.report.part6","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) params_cleaning See details GGIR. params_output Parameters object, see GGIR verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part6.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate report from milestone data produced by g.part6 — g.report.part6","text":"Function produce data, writes reports csv format following files stored root results folder: part6_summary.csv See package vignette \"HouseHoldCoanalysis\".","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part6.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate report from milestone data produced by g.part6 — g.report.part6","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.shell.GGIR.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper function around function GGIR — g.shell.GGIR","title":"Wrapper function around function GGIR — g.shell.GGIR","text":"function used central function package, renamed GGIR. can still use function call g.shell.GGIR arguments passed function GGIR. done preserve consistency older use cases GGIR package. documentation can now found GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.shell.GGIR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper function around function GGIR — g.shell.GGIR","text":"","code":"g.shell.GGIR(...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.shell.GGIR.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper function around function GGIR — g.shell.GGIR","text":"... parameters used GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.shell.GGIR.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper function around function GGIR — g.shell.GGIR","text":"function provides values, ensures functions called output stored. See GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.shell.GGIR.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Wrapper function around function GGIR — g.shell.GGIR","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.det.html","id":null,"dir":"Reference","previous_headings":"","what":"sustiained inactivty bouts detection — g.sib.det","title":"sustiained inactivty bouts detection — g.sib.det","text":"Detects sustiained inactivty bouts. Function intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.det.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"sustiained inactivty bouts detection — g.sib.det","text":"","code":"g.sib.det(M, IMP, I, twd = c(-12, 12), acc.metric = \"ENMO\", desiredtz = \"\", myfun=c(), sensor.location = \"wrist\", params_sleep = c(), zc.scale = 1, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.det.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"sustiained inactivty bouts detection — g.sib.det","text":"M Object produced g.getmeta IMP Object produced g.impute Object produced g.inspectfile twd Vector length 2, indicating time window consider hours relative midnight. acc.metric one metrics want consider analyze L5. metric interest need calculated M (see g.part1) desiredtz See g.part3 myfun External function object applied raw data. See details applyExtFunction. sensor.location Character indicate sensor location, default wrist. hip HDCZA algorithm also requires longitudinal axis sensor -45 +45 degrees. params_sleep See g.part3 zc.scale Used zero-crossing counts . Scaling factor applied counts calculated (GGIR part 3). See GGIR. ... argument used previous version g.sib.det, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.det.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"sustiained inactivty bouts detection — g.sib.det","text":"output = Dataframe every epoch classification detection.failed = Boolean whether detection failed L5list = L5 every day (defined noon noon)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.det.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"sustiained inactivty bouts detection — g.sib.det","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Create plot of sustained inactivity bouts — g.sib.plot","title":"Create plot of sustained inactivity bouts — g.sib.plot","text":"Function create plot sustained inactivity bouts quality check purposes part g.part3. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create plot of sustained inactivity bouts — g.sib.plot","text":"","code":"g.sib.plot(SLE, M, I, plottitle, nightsperpage=7, desiredtz=\"\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create plot of sustained inactivity bouts — g.sib.plot","text":"SLE Output g.sib.det M Output g.getmeta Output g.inspectfile plottitle Title used plot nightsperpage Number nights show per page desiredtz See g.part3","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create plot of sustained inactivity bouts — g.sib.plot","text":"Function output plot","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.plot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create plot of sustained inactivity bouts — g.sib.plot","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.sum.html","id":null,"dir":"Reference","previous_headings":"","what":"sustiained inactivty bouts detection — g.sib.sum","title":"sustiained inactivty bouts detection — g.sib.sum","text":"Detects sustiained inactivty bouts. Function intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.sum.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"sustiained inactivty bouts detection — g.sib.sum","text":"","code":"g.sib.sum(SLE,M,ignorenonwear=TRUE,desiredtz=\"\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.sum.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"sustiained inactivty bouts detection — g.sib.sum","text":"SLE Output g.sib.det M Object produced g.getmeta ignorenonwear TRUE ignore detected monitor non-wear periods avoid confusion monitor non-wear time sustained inactivity (default = TRUE) desiredtz See g.part3","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.sum.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"sustiained inactivty bouts detection — g.sib.sum","text":"Dataframe per night per definition sustained inactivity bouts start end time sustained inactivity bout","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.sum.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"sustiained inactivty bouts detection — g.sib.sum","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sibreport.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate sustiained inactivty bouts report — g.sibreport","title":"Generate sustiained inactivty bouts report — g.sibreport","text":"Generate sustained inactivity bout report. Function intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sibreport.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate sustiained inactivty bouts report — g.sibreport","text":"","code":"g.sibreport(ts, ID, epochlength, logs_diaries=c(), desiredtz=\"\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.sibreport.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate sustiained inactivty bouts report — g.sibreport","text":"ts Data frame time series created inside function g.part5 ID Recording identifier (character numeric) epochlength Numeric indicate epoch length seconds ts object logs_diaries Object produced g.loadlog function desiredtz See g.getmeta","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sibreport.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate sustiained inactivty bouts report — g.sibreport","text":"Dataframe one row per sustained inactivity bout corresponding properties stored data.frame columns.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sibreport.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate sustiained inactivty bouts report — g.sibreport","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":null,"dir":"Reference","previous_headings":"","what":"Detects whether accelerometer is worn — g.weardec","title":"Detects whether accelerometer is worn — g.weardec","text":"Uses object produced g.part1 assess whether accelerometer worn","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detects whether accelerometer is worn — g.weardec","text":"","code":"g.weardec(M, wearthreshold, ws2, nonWearEdgeCorrection = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detects whether accelerometer is worn — g.weardec","text":"M Object produced g.getmeta wearthreshold Number axis least need meet non-wear criteria ws2 Large windowsize used seconds apply non-wear detection Small window size needed, inherent object M nonWearEdgeCorrection Boolean indicated whether EdgeCorrection described 2013 applied (default = TRUE, consistent code )","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detects whether accelerometer is worn — g.weardec","text":"r1 Participant id extracted file r2 Night number r3 Detected onset sleep expressed hours since previous midnight LC fraction 15 minute windows 5 percent clipping LC2 fraction 15 minute windows 80 percent clipping","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detects whether accelerometer is worn — g.weardec","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Detects whether accelerometer is worn — g.weardec","text":"","code":"data(data.getmeta) output = g.weardec(M = data.getmeta, wearthreshold = 2, ws2 = 900)"},{"path":"https://wadpac.github.io/GGIR/reference/getfolderstructure.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts folderstructure based on data directory. — getfolderstructure","title":"Extracts folderstructure based on data directory. — getfolderstructure","text":"Extracts folderstructure based data directory. used accelerometer files stored hierarchical folder structure user likes reference exact position folder tree, rather just filename. Function intended direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/getfolderstructure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts folderstructure based on data directory. — getfolderstructure","text":"","code":"getfolderstructure(datadir=c(),referencefnames=c())"},{"path":"https://wadpac.github.io/GGIR/reference/getfolderstructure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts folderstructure based on data directory. — getfolderstructure","text":"datadir Argument datadir used various functions GGIR referencefnames vector filename filter ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/getfolderstructure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts folderstructure based on data directory. — getfolderstructure","text":"List items: fullfilenames: vector full paths folders including name file foldername: vector names folder file stroed (distal folder folder tree).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/getfolderstructure.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extracts folderstructure based on data directory. — getfolderstructure","text":"","code":"if (FALSE) { # \\dontrun{ folderstructure = getfolderstructure(datadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/get_nw_clip_block_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Set monitor brand specific parameters — get_nw_clip_block_params","title":"Set monitor brand specific parameters — get_nw_clip_block_params","text":"Set monitor brand specific thresholds non-wear detection, clipping etection, blocksizes loaded. designed direct use user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/get_nw_clip_block_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set monitor brand specific parameters — get_nw_clip_block_params","text":"","code":"get_nw_clip_block_params(monc, dformat, deviceSerialNumber = \"\", sf, params_rawdata)"},{"path":"https://wadpac.github.io/GGIR/reference/get_nw_clip_block_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set monitor brand specific parameters — get_nw_clip_block_params","text":"monc See g.inspectfile dformat See g.dotorcomma deviceSerialNumber produced g.extractheadervars sf Numeric, sample frequency Hertz params_rawdata See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/get_nw_clip_block_params.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set monitor brand specific parameters — get_nw_clip_block_params","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/get_starttime_weekday_truncdata.html","id":null,"dir":"Reference","previous_headings":"","what":"Get starttime (adjusted), weekday, and adjust data accordingly. — get_starttime_weekday_truncdata ","title":"Get starttime (adjusted), weekday, and adjust data accordingly. — get_starttime_weekday_truncdata ","text":"Function intended direct use user. Used inside g.getmeta intermediate step loading raw data calibrating . step includes extracting starttime adjusting nearest integer number long epoch window lengths hour, truncating data accordingly, extracting corresponding weekday.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/get_starttime_weekday_truncdata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get starttime (adjusted), weekday, and adjust data accordingly. — get_starttime_weekday_truncdata ","text":"","code":"get_starttime_weekday_truncdata(monc, dformat, data, header, desiredtz, sf, datafile, ws2, configtz = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/get_starttime_weekday_truncdata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get starttime (adjusted), weekday, and adjust data accordingly. — get_starttime_weekday_truncdata ","text":"monc See g.inspectfile dformat See g.dotorcomma data Data part g.readaccfile output header Header part g.readaccfile output desiredtz See g.getmeta sf Numeric, sample frequency Hertz datafile See g.getmeta ws2 Long epoch length configtz See g.getmeta","code":""},{"path":"https://wadpac.github.io/GGIR/reference/get_starttime_weekday_truncdata.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get starttime (adjusted), weekday, and adjust data accordingly. — get_starttime_weekday_truncdata ","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"A package to process multi-day raw accelerometer data — GGIR-package","title":"A package to process multi-day raw accelerometer data — GGIR-package","text":"Disclaimer: new GGIR user please see GGIR github-pages narrative overview GGIR. document primarily aimed documenting functions input arguments. Please note google discussion group package (link ). can thank us sharing code package developing generic purpose tool citing package name citing supporting publications (e.g. Migueles et al. 2019) publications.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/reference/GGIR-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A package to process multi-day raw accelerometer data — GGIR-package","text":"Vincent T van Hees main creator developer Zhou Fang developed calibration algorithm used function g.calibrate Joe Heywood helped develop functionality process specific recording days Severine Sabia, Mathilde Chen, Manasa Yerramalla extensively tested provided feedback various functions Joan Capdevila Pujol helped improve various functions Jairo H Migueles helped improve various functions Matthew R Patterson helped enhancing visual report. Lena Kushleyeva helped fix bug sleep detection. Taren Sanders helped tidy parallel processing functionality","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"A package to process multi-day raw accelerometer data — GGIR-package","text":"Migueles JH, Rowlands AV, et al. GGIR: Research Community-Driven Open Source R Package Generating Physical Activity Sleep Outcomes Multi-Day Raw Accelerometer Data. Journal Measurement Physical Behaviour. 2(3) 2019. doi:10.1123/jmpb.2018-0063. van Hees VT, Gorzelniak L, Dean Leon EC, Eder M, Pias M, et al. (2013) Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. PLoS ONE 8(4): e61691. doi:10.1371/journal.pone.0061691 van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Auto-calibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Aug 7 van Hees VT, Sabia S, et al. (2015) novel, open access method assess sleep duration using wrist-worn accelerometer, PLoS ONE, November 2015","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR-package.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A package to process multi-day raw accelerometer data — GGIR-package","text":"","code":"if (FALSE) { # \\dontrun{ #inspect file: I = g.inspectfile(datafile) #autocalibration: C = g.calibrate(datafile) #get meta-data: M = g.getmeta(datafile) } # } data(data.getmeta) data(data.inspectfile) data(data.calibrate) #impute meta-data: IMP = g.impute(M = data.getmeta, I = data.inspectfile) #analyse and produce summary: A = g.analyse(I = data.inspectfile, C = data.calibrate, M = data.getmeta, IMP, ID = \"01wk0\") #plot data g.plot(IMP, M = data.getmeta, I = data.inspectfile, durplot=4)"},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":null,"dir":"Reference","previous_headings":"","what":"Shell function for analysing an accelerometer dataset. — GGIR","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"function designed help users operate steps analysis. helps generate structure milestone data, produces user-friendly reports. function acts shell calls g.part1, g.part2, g.part3, g.part4 g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"","code":"GGIR(mode = 1:5, datadir = c(), outputdir = c(), studyname = c(), f0 = 1, f1 = 0, do.report = c(2, 4, 5, 6), configfile = c(), myfun = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"mode Numeric (default = 1:5). Specify five parts need run, e.g., mode = 1 makes g.part1 run; mode = 1:5 makes whole GGIR pipeline run, g.part1 g.part5. Optionally mode can also include number 6 tell GGIR run g.part6 currently development. datadir Character (default = c()). Directory accelerometer files stored, e.g., \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). outputdir Character (default = c()). Directory output needs stored. Note function attempt create folders directory uses folder keep output. studyname Character (default = c()). datadir folder, study given name data directory. datadir list filenames studyname specified input argument used name study. f0 Numeric (default = 1). File index start (default = 1). Index refers filenames sorted alphabetical order. f1 Numeric (default = 0). File index finish (defaults number files available). .report Numeric (default = c(2, 4, 5, 6)). parts generate summary spreadsheet: 2, 4, 5, /6. Default c(2, 4, 5, 6). report generated based available milestone data. creating milestone data multiple machines advisable turn report generation generating milestone data, value = c(), merge milestone data turn report generation back setting overwrite FALSE. configfile Character (default = c()). Configuration file previously generated function GGIR. See details. myfun List (default = c()). External function object applied raw data. See package vignette detailed tutorial examples use function embedding: https://cran.r-project.org/package=GGIR/vignettes/ExternalFunction.html verbose Boolean (default = TRUE). indicate whether console message printed. Note warnings error always printed can suppressed suppressWarning() suppressMessages(). ... parameters used GGIR. Given large number parameters used GGIR grouped objects start \"params_\". documented details section. provide objects argument function GGIR, can provide parameters inside input function GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"function provides values, ensures functions called output stored. , configuration file stored containing argument values used facilitate reproducibility.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"used function GGIR output directory (outputdir) filled milestone data results. Function GGIR stores explicitely entered argument values default values argument explicitely provided csv-file named config.csv stored root output folder. config.csv file accepted input GGIR argument configfile replace specification arguments, except datadir outputdir. practical value eases replication analysis, instead share R script, sharing config.csv file sufficient. , config.csv file contribute reproducibility data analysis. Note: combining configuration file explicitely provided argument values, explicitely provided argument values overrule argument values configuration file. parameter neither provided via configuration file input GGIR uses default paramter values can inspected command print(load_params()), specifically interested certain subgroup parameters, e.g., physical activity, can print(load_params()$params_phyact). defaults part GGIR code changed user. parameters can used GGIR :","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-general","dir":"Reference","previous_headings":"","what":"params_general","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used across GGIR parts fall categories. overwrite Boolean (default = FALSE). want overwrite analysis milestone data exists? overwrite = FALSE, milestone data previous analysis used available visual reports created . dayborder Numeric (default = 0). Hour days start end (dayborder = 4 mean 4 ). .parallel Boolean (default = TRUE). Whether use multi-core processing (works least 4 CPU cores available). maxNcores Numeric (default = NULL). Maximum number cores use argument .parallel set true. GGIR default uses either maximum number available cores number files process (whichever lower), argument allows set lower maximum. acc.metric Character (default = \"ENMO\"). one acceleration metrics want use acceleration magnitude analyses GGIR part 5 visual report? example: \"ENMO\", \"LFENMO\", \"MAD\", \"NeishabouriCount_y\", \"NeishabouriCount_vm\". one acceleration metric can specified selected metric needs calculated part 1 (see g.part1) via arguments .enmo = TRUE .mad = TRUE. part5_agg2_60seconds Boolean (default = FALSE). Whether use aggregate epochs 60 seconds part GGIR g.part5 analysis. Aggregation doen averaging. Note working count metrics Neishabouri counts means threshold can stay part 2, threshold expressed relative original epoch size, even averaged per minute. example want use cut-point 100 count per minute specify mvpathreshold = 100 * (5/60) well `threshold.mod = 100 * (5/60) regardless whether set part5_agg2_60seconds TRUE FALSE. print.filename Boolean (default = FALSE). Whether print filename analysing (case .parallel = FALSE). Printing filename can useful investigate problems (e.g., verify file read). desiredtz Character (default = \"\", .e., system timezone). Timezone device configured experiments took place. experiments took place different timezone, use argument timezone experiments took place argument configtz specify device configured. Use \"TZ identifier\" specified https://en.wikipedia.org/wiki/Zone.tab set desiredtz, e.g., \"Europe/London\". configtz Character (default = \"\", .e., system timezone). moment functional GENEActiv .bin, AX3 cwa, ActiGraph .gt3x, ad-hoc csv file format. Timezone accelerometer configured. use argument timezone configuration timezone recording took place different. Use \"TZ identifier\" specified https://en.wikipedia.org/wiki/Zone.tab set configtz, e.g., \"Europe/London\". sensor.location Character (default = \"wrist\"). indicate sensor location, default wrist. hip, HDCZA algorithm sleep detection also requires longitudinal axis sensor -45 +45 degrees. windowsizes Numeric vector, three values (default = c(5, 900, 3600)). indicate lengths windows c(window1, window2, window3): window1 short epoch length seconds, default 5, time window acceleration angle metrics calculated; window2 long epoch length seconds non-wear signal clipping defined, default 900 (expected multitude 60 seconds); window3 window length data used non-wear detection default 3600 seconds. , window3 larger window2 use overlapping windows, window2 equals window3 non-wear periods assessed non-overlapping windows. idloc Numeric (default = 1). idloc = 1 code assumes ID number stored obvious header field. Note ActiGraph data ID never stored file header. value set 2, 5, 6, 7, GGIR looks filename extracts character string preceding first occurance \"_\" (idloc = 2), \" \" (space, idloc = 5), \".\" (dot, idloc = 6), \"-\" (idloc = 7), respectively. may noticed idloc 3 4 skipped, used one study 2012, actively maintained anymore, legacy code omitted. expand_tail_max_hours Numeric (default = NULL). parameter replaced recordingEndSleepHour. recordingEndSleepHour Numeric (default = NULL). Time (hours) recording end (later) expand g.part1 output synthetic data trigger sleep detection last night. Using argument recordingEndSleepHour implies assumption participant fell asleep end recording recording ended recordingEndSleepHour hour last day. assumption may always hold true used caution. synthetic data metashort entails: timestamps continuing regularly, zeros acceleration metrics EN, one EN. Angle columns created way triggers sleep detection using equation: round(sin((1:length_expansion) / (900/epochsize))) * 15. keep track tail expansion g.part1 stores length expansion RData files, passed via g.part2, g.part3, g.part4 g.part5. g.part5 tail expansion size included additional variable csv-reports. g.part4 csv-report last night omitted, know sleep estimates last night trustworthy. Similarly, g.part5 output columns related sleep assessment omitted last window avoid biasing averages. , synthetic data also ignored visualizations time series output avoid biased output. dataFormat Character (default = \"raw\"). indicate format data datadir. Alternatives: ukbiobank_csv, actiwatch_csv, actiwatch_awd, actigraph_csv, sensewear_xls, correspond epoch level data files , respecitively, UK Biobank csv format, Actiwatch csv format, Actiwatch awd format, ActiGraph csv format, Sensewear xls format (also works xlsx). , assumed epoch size UK Biobank csvdata 5 seconds. epoch size non-raw data formats flexible, make sure set first value argument windowsizes accordingly. Also working non-raw data formats specify argument extEpochData_timeformat documented . ukbiobank_csv nonwear column data , actiwatch_csv, actiwatch_awd, actigraph_csv, sensewear_xls non-wear detected 60 minute rolling zeros. length window can modified third value argument windowsizes expressed seconds. maxRecordingInterval Numeric (default = NULL). indicate maximum gap hours repeated measurements ID recordings appended. , assumption ID can matched, make sure argument idloc set correctly. argument maxRecordingInterval set NULL (default) recordings appended. recordings overlap GGIR use data latest recording. recordings separated timegap recordings filled data points resemble monitor worn. maximum value maxFile gap 504 (21 days). recordings accelerometer brand appended. part 2 csv report show number appended recordings, sampling rate , time overlap gap names filenames respective recording. extEpochData_timeformat Character (default = \"%d-%m-%Y %H:%M:%S\"). specify time format used external epoch level data argument dataFormat set \"actiwatch_csv\", \"actiwatch_awd\", \"actigraph_csv\" \"sensewear_xls\". example \"%Y-%m-%d %:%M:%S %p\" \"2023-07-11 01:24:01 PM\" \"%m/%d/%Y %H:%M:%S\" \"2023-07-11 13:24:01\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-rawdata","dir":"Reference","previous_headings":"","what":"params_rawdata","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used related reading pre-processing raw data, excluding parameters related metrics params_metrics object. backup.cal.coef Character (default = \"retrieve\"). Option use backed-calibration coefficient instead deriving calibration coefficients analysing file twice. Argument backup.cal.coef two usecase. Use case 1: auto-calibration fails user option provide back- calibration coefficients via argument. value argument needs name directory csv-spreadsheet following column names subsequent values: \"filename\" names accelerometer files calibration coefficients need applied case auto-calibration fails; \"scale.x\", \"scale.y\", \"scale.z\" scaling coefficients; \"offset.x\", \"offset.y\", \"offset.z\" offset coefficients, ; \"temperature.offset.x\", \"temperature.offset.y\", \"temperature.offset.z\" temperature offset coefficients. can useful analysing short lasting laboratory experiments insufficient sphere data perform auto-calibration, calibration coefficients can derived alternative way. users responsibility compile csv-spreadsheet. Instead building file user can also Use case 2: user wants avoid performing auto-calibration repeatedly file. backup.cal.coef value set \"retrieve\" (default) GGIR look \"data_quality_report.csv\" file outputfolder QC, holds previously generated calibration coefficients. want happen, deleted data_quality_report.csv QC folder set value \"redo\". minimumFileSizeMB Numeric (default = 2). Minimum File size MB required enter processing. argument can help avoid short uninformative files enter analyses. Given typical accelerometer collects several MBs per hour, default setting skip tiny files. .cal Boolean (default = TRUE). Whether apply auto-calibration g.calibrate. Recommended setting TRUE. imputeTimegaps Boolean (default = TRUE). indicate whether timegaps larger 1 sample imputed. Currently used .gt3x data ActiGraph .csv format, timegaps can expected result Actigraph's idle sleep.mode configuration. spherecrit Numeric (default = 0.3). minimum required acceleration value (g) sides 0 g axis. Used judge whether sphere sufficiently populated minloadcrit Numeric (default = 168). minimum number hours code needs read autocalibration procedure effective (sensitive multitudes 12 hrs, values ceiled). loading hours extra data loaded calibration error reduced 0.01 g. printsummary Boolean (default = FALSE). TRUE print summary calibration procedure console done. chunksize Numeric (default = 1). Value specify size chunks loaded fraction approximately 12 hour period auto-calibration procedure fraction 24 hour period metric calculation, e.g., 0.5 equals 6 12 hour chunks, respectively. machines less 4Gb RAM memory < 2GB memory per process using .parallel = TRUE value 1 recommended. value constrained GGIR lower 0.05. Please note setting 0.05 produce output 3rd value parameter windowsizes 3600. dynrange Numeric (default = NULL). Provide dynamic range 8 gravity. interpolationType Integer (default = 1). indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour. rmc.file Character (default = NULL). Filename file read working directory, full path file otherwise. rmc.nrow Numeric (default = NULL). Number rows read, nrow argument read.csv nrows fread. whole file read default (.e., rmc.nrow = Inf). rmc.skip Numeric (default = 0). Number rows skip, skip argument read.csv fread. rmc.dec Character (default = \".\"). Decimal used numbers, dec argument read.csv fread. rmc.firstrow.acc Numeric (default = NULL). First row (number) acceleration data. rmc.firstrow.header Numeric (default = NULL). First row (number) header. Leave blank file header. rmc.header.length Numeric (default = NULL). file header, specify header length (number rows). rmc.col.acc Numeric, three values (default = c(1, 2, 3)). Vector three column (numbers) acceleration signals stored. rmc.col.temp Numeric (default = NULL). Scalar column (number) temperature stored. Leave default setting temperature available. temperature used g.calibrate. rmc.col.time Numeric (default = NULL). Scalar column (number) timestamps stored. Leave default setting timestamps stored. rmc.unit.acc Character (default = \"g\"). Character unit acceleration values: \"g\", \"mg\", \"bit\". rmc.unit.temp Character (default = \"C\"). Character unit temperature values: (K)elvin, (C)elsius, (F)ahrenheit. rmc.unit.time Character (default = \"POSIX\"). Character unit timestamps: \"POSIX\", \"UNIXsec\" (seconds since origin, see argument rmc.origin), \"character\", \"ActivPAL\" (exotic timestamp format used ActivPAL activity monitor). rmc.format.time Character (default = \" Character giving date-time format used strptime. used rmc.unit.time: character POSIX. rmc.bitrate Numeric (default = NULL). unit acceleration bit provide bit rate, e.g., 12 bit. rmc.dynamic_range Numeric character (default = NULL). unit acceleration bit provide dynamic range deviation g zero, e.g., +/-6g mean argument needs 6. give argument character value code search file header elements name equal character value use corresponding numeric value next dynamic range. rmc.unsignedbit Boolean (default = TRUE). unsignedbit = TRUE means bits positive numbers. unsignedbit = FALSE bits positive negative. rmc.origin Character (default = \"1970-01-01\"). Origin time unit time UNIXsec, e.g., 1970-1-1. rmc.desiredtz Character (default = NULL). Timezone experiments took place. argument scheduled deprecated now used overwrite desiredtz provided. rmc.configtz Character (default = NULL). Timezone device configured. argument scheduled deprecated now used overwrite configtz provided. rmc.sf Numeric (default = NULL). Sample rate Hertz, stored file header used instead (see argument rmc.headername.sf). rmc.headername.sf Character (default = NULL). file header: Row name sample frequency can found. rmc.headername.sn Character (default = NULL). file header: Row name serial number can found. rmc.headername.recordingid Character (default = NULL). file header: Row name recording ID can found. rmc.header.structure Character (default = NULL). Used split header name header value, e.g., \":\" \" \". rmc.check4timegaps Boolean (default = FALSE). indicate whether gaps time imputed zeros. sensing equipment provides accelerometer gaps time. rest GGIR designed , setting argument TRUE gaps time filled zeros. rmc.col.wear Numeric (default = NULL). external wear detection outcome stored part data can used GGIR. argument specifies column wear detection (Boolean) stored. rmc.doresample Boolean (default = FALSE). indicate whether resample data based available timestamps extracted sample rate file header. rmc.noise Numeric (default = 13). Noise level acceleration signal mg-units, used working ad-hoc .csv data formats using read.myacc.csv. read.myacc.csv take rmc.noise argument, interacting GGIR g.part1 rmc.noise used. rmc.scalefactor.acc Numeric value (default 1) scale acceleration signals via multiplication. example, data provided m/s2 setting 1/9.81 derive gravitational units. frequency_tol Number (default = 0.1) passed readAxivity GGIRread package. Represents frequency tolerance fraction 0 1. relative bias per data block larger fraction data block imputed lack movement gravitational oriationed guessed recent valid data block. applicable Axivity .cwa data. nonwear_range_threshold Numeric (default 150) used define maximum value range per axis non-wear detection, used combination brand specific standard deviation per axis.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-metrics","dir":"Reference","previous_headings":"","what":"params_metrics","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used specify signal metrics need extract GGIR g.part1. .anglex Boolean (default = FALSE). TRUE, calculates angle X axis relative horizontal: $$angleX = (\\tan{^{-1}\\frac{acc_{rollmedian(x)}}{(acc_{rollmedian(y)})^2 + (acc_{rollmedian(z)})^2}}) * 180/\\pi$$ .angley Boolean (default = FALSE). TRUE, calculates angle Y axis relative horizontal: $$angleY = (\\tan{^{-1}\\frac{acc_{rollmedian(y)}}{(acc_{rollmedian(x)})^2 + (acc_{rollmedian(z)})^2}}) * 180/\\pi$$ .anglez Boolean (default = TRUE). TRUE, calculates angle Z axis relative horizontal: $$angleZ = (\\tan{^{-1}\\frac{acc_{rollmedian(z)}}{(acc_{rollmedian(x)})^2 + (acc_{rollmedian(y)})^2}}) * 180/\\pi$$ .zcx Boolean (default = FALSE). TRUE, calculates metric zero-crossing count x-axis. computation specifics see source code function g.applymetrics .zcy Boolean (default = FALSE). TRUE, calculates metric zero-crossing count y-axis. computation specifics see source code function g.applymetrics .zcz Boolean (default = FALSE). TRUE, calculates metric zero-crossing count z-axis. computation specifics see source code function g.applymetrics .enmo Boolean (default = TRUE). TRUE, calculates metric: $$ENMO = \\sqrt{acc_x^2 + acc_y^2 + acc_z^2} - 1$$ (ENMO < 0, ENMO = 0). .lfenmo Boolean (default = FALSE). TRUE, calculates metric ENMO low-pass filtered accelerations (computation specifics see source code function g.applymetrics). filter bound defined parameter hb. .en Boolean (default = FALSE). TRUE, calculates Euclidean Norm raw accelerations: $$EN = \\sqrt{acc_x^2 + acc_y^2 + acc_z^2}$$ .mad Boolean (default = FALSE). TRUE, calculates Mean Amplitude Deviation: $$MAD = \\frac{1}{n}\\Sigma|r_i - \\overline{r}|$$ .enmoa Boolean (default = FALSE). TRUE, calculates metric: $$ENMOa = \\sqrt{acc_x^2 + acc_y^2 + acc_z^2} - 1$$ (ENMOa < 0, ENMOa = |ENMOa|). .roll_med_acc_x Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .roll_med_acc_y Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .roll_med_acc_z Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .dev_roll_med_acc_x Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .dev_roll_med_acc_y Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .dev_roll_med_acc_z Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .bfen Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .hfen Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .hfenplus Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .lfen Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .lfx Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .lfy Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .lfz Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .hfx Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .hfy Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .hfz Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .bfx Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .bfy Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .bfz Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .brondcounts Boolean (default = FALSE). option deprecated (October 2022) due issues activityCounts package used dependency. TRUE, calculated metric via R package activityCounts. called BrondCounts large number activity counts physical activity sleep research field. calling _brondcounts_ clarify counts proposed Jan Brønd implemented R Ruben Brondeel. _brondcounts_ intended imitation counts produced one closed source ActiLife software ActiGraph. .neishabouricounts Boolean (default = FALSE). TRUE, calculates metric via R package actilifecounts, implementation algorithm used closed-source software ActiLife ActiGraph (methods published doi: 10.1038/s41598-022-16003-x). use name first author (instead ActiLifeCounts) paper call NeishabouriCount uncertainty ActiLife implement algorithm time. use Neishabouri counts physical activity intensity classification part 5 (.e., metric threshold.lig, threshold.mod, threshold.vig applied), acc.metric argument needs set one following: \"NeishabouriCount_x\", \"NeishabouriCount_y\", \"NeishabouriCount_z\", \"NeishabouriCount_vm\" use counts x-, y-, z-axis vector magnitude, respectively. lb Numeric (default = 0.2). Lower boundary frequency filter (Hertz) used filter-based metrics. hb Numeric (default = 15). Higher boundary frequency filter (Hertz) used filter-based metrics. n Numeric (default = n). Order frequency filter used filter-based metrics. zc.lb Numeric (default = 0.25). Used zero-crossing counts . Lower boundary cut-frequency filter. zc.hb Numeric (default = 3). Used zero-crossing counts . Higher boundary cut-frequencies filter. zc.sb Numeric (default = 0.01). Stop band used calculation zero crossing counts. Value acceleration threshold g units acceleration rounded zero. zc.order Numeric (default = 2). Used zero-crossing counts . Order frequency filter. zc.scale Numeric (default = 1) Used zero-crossing counts . Scaling factor applied counts calculated (GGIR part 3). actilife_LFE Boolean (default = FALSE). TRUE, calculates NeishabouriCount metric low-frequency extension filter proposed closed source ActiLife software ActiGraph. applicable metric NeishabouriCount.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-cleaning","dir":"Reference","previous_headings":"","what":"params_cleaning","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used across GGIR parts releated masking imputing data, abbreviated \"cleaning\". .imp Boolean (default = TRUE). Whether impute missing values (e.g., suspected monitor non-wear clippling) g.impute GGIR g.part2. Recommended setting TRUE. TimeSegments2ZeroFile Character (default = NULL). Takes path csv file columns \"windowstart\" \"windowend\" refer start end time time windows format \"2024-10-12 20:00:00\", \"filename\" GGIR milestone data file without \"meta_\" segment name. GGIR part 2 uses set acceleration values zero non-wear classification zero (meaning sensor worn). Motivation: accelerometer worn night GGIR automatically labels invalid, user may like treat zero movement. Disclaimer: functionality developed 2019. hindsight generic enough need revision. Please contact GGIR maintainers like us invest time improving functionality. data_cleaning_file Character (default = NULL). Optional path csv file create holds four columns: ID, day_part5, relyonguider_part4, night_part4. ID hold participant ID. Columns day_part5 night_part4 allow specify day(s) night(s) need excluded g.part5 g.part4, respectively. including multiple day(s)/night(s) create new line day/night. , done regardless whether rest GGIR thinks day(s)/night(s) valid. Column relyonguider_part4 allows specify nights g.part4 fully rely guider. See also package vignette. excludefirstlast.part5 Boolean (default = FALSE). TRUE first last window (waking-waking, midnight-midnight, sleep onset-onset) ignored g.part5. excludefirstlast Boolean (default = FALSE). TRUE first last night measurement ignored sleep assessment g.part4. excludefirst.part4 Boolean (default = FALSE). TRUE first night measurement ignored sleep assessment g.part4. excludelast.part4 Boolean (default = FALSE). TRUE last night measurement ignored sleep assessment g.part4. includenightcrit Numeric (default = 16). Minimum number valid hours per night (24 hour window noon noon), used sleep assessment g.part4. minimum_MM_length.part5 Numeric (default = 23). Minimum length hours MM day included cleaned g.part5 results. study_dates_file Character (default = c()). Full path csv file containing first last date expected wear period every study participant (dates provided per individual). Expected format activity diary : First column headers followed one row per recording. three columns: first column recording ID, needs match ID GGIR extracts accelerometer file; second column contain first date study; third column last date study. Date columns default format \"23-04-2017\", date format specified argument study_dates_dateformat (). specified (default), GGIR use first last day recording beginning end study. Note dates used top data_masking_strategy selected. study_dates_dateformat Character (default = \" specify date format used study_dates_file used strptime. strategy Deprecated replaced data_masking_strategy. strategy specified value passed used data_masking_strategy. data_masking_strategy Numeric (default = 1). deal knowledge study protocol. data_masking_strategy = 1 means select data based hrs.del.start hrs.del.end. data_masking_strategy = 2 makes data first midnight last midnight used. data_masking_strategy = 3 selects active X days file X specified argument ndayswindow, days series 24-h blocks starting time day (X hours beginning end period can deleted arguments hrs.del.start hrs.del.end) data_masking_strategy = 4 use data first midnight. data_masking_strategy = 5 similar data_masking_strategy = 3, selects X complete calendar days X specified argument ndayswindow (X hours beginning end period can deleted arguments hrs.del.start hrs.del.end). hrs.del.start Numeric (default = 0). many HOURS start experiment wearing monitor start? Used GGIR g.part2 data_masking_strategy = 1. hrs.del.end Numeric (default = 0). many HOURS end experiment wearing monitor definitely end? Used GGIR g.part2 data_masking_strategy = 1. maxdur Numeric (default = 0). many DAYS start experiment experiment definitely stop? (set zero unknown). ndayswindow Numeric (default = 7). data_masking_strategy set 3 5, size window number days. data_masking_strategy 3 value can fractional, e.g. 7.5, data_masking_strategy 5 needs integer. includedaycrit.part5 Numeric (default = 2/3). Inclusion criteria used part 5 number valid hours waking hours day, value smaller equal 1 used fraction waking hours, value 1 used absolute number valid hours required. confuse argument argument includedaycrit used GGIR part 2 applies entire day. segmentWEARcrit.part5 Numeric (default = 0.5). Fraction qwindow segment expected valid part 5, 0.3 indicates least 30 percent time valid. segmentDAYSPTcrit.part5 Numeric vector length 2 (default = c(0.9, 0)). Inclusion criteria proportion segment classified day (awake) spt (sleep period time) considered valid. interested comparing time spent behaviour better set one two numbers 0, defines proportion segment classified day spt, respectively. default setting focus waking hour segments includes segments overlap least 90 percent waking hours. order shift focus SPT use c(0, 0.9) ensures segments overlap least 90 percent SPT included. Setting zero problematic comparing time spent behaviours days individuals: complete segment averaged incomplete segments (someone going bed waking middle segment) longer clear whether person less active sleeps segment. Similarly clear whether person wakefulness SPT segment woke went bed segment. includedaycrit Numeric (default = 16). Minimum required number valid hours calendar day specific analysis part 2. specify two values c(16, 16) first value used part 2 second value used part 5 applied criterion full part 5 window. Note applied addition parameter includedaycrit.part5 looks valid data waking hours. max_calendar_days Numeric (default = 0). maximum number calendar days include (set zero unknown). nonWearEdgeCorrection Boolean (default = TRUE). TRUE non-wear detection around edges recording (first last 3 hours) corrected following description vanHees2013 default since . functionality advisable working sleep clinic exercise lab data typically lasting less day. nonwear_approach Character (default = \"2023\"). Whether use traditional version non-wear detection algorithm (nonwear_approach = \"2013\") new version (nonwear_approach = \"2023\"). 2013 version use longsize window (windowsizes[3], one hour default) check conditions nonwear identification flag nonwear mediumsize window (windowsizes[2], 15 min default) middle. 2023 version differs flag nonwear full longsize window. 2013 method longsize window centered centre mediumsize window, 2023 method longsizewindow aligned left edge left edge mediumsize window.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-phyact","dir":"Reference","previous_headings":"","what":"params_phyact","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters releated physical activity used GGIR g.part2 GGIR g.part5. mvpathreshold Numeric (default = 100). Acceleration threshold MVPA estimation GGIR g.part2. can single number vector numbers, e.g., mvpathreshold = c(100, 120). latter case code estimate MVPA separately threshold. variable left blank, e.g., mvpathreshold = c(), MVPA estimated. mvpadur Numeric (default = 10). bout duration(s) MVPA calculated. used GGIR g.part2. boutcriter Numeric (default = 0.8). number 0 1, defines fraction bout needs mvpathreshold, used GGIR g.part2. threshold.lig Numeric (default = 40). g.part5: Threshold light physical activity separate inactivity light. Value can one number vector multiple numbers, e.g., threshold.lig =c(30,40). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO. threshold.mod Numeric (default = 100). g.part5: Threshold moderate physical activity separate light moderate. Value can one number vector multiple numbers, e.g., threshold.mod = c(100, 120). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO. threshold.vig Numeric (default = 400). g.part5: Threshold vigorous physical activity separate moderate vigorous. Value can one number vector multiple numbers, e.g., threshold.vig =c(400,500). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO. boutdur.mvpa Numeric (default = c(1, 5, 10)). Duration(s) MVPA bouts minutes extracted. start identification longest shortest duration. default setting, start 10 minute bouts, followed 5 minute bouts rest data, followed 1 minute bouts rest data. boutdur.Numeric (default = c(10, 20, 30)). Duration(s) inactivity bouts minutes extracted. Inactivity bouts detected segments data labelled sleep MVPA bouts. start identification longest shortest duration. default setting, start identification 30 minute bouts, followed 20 minute bouts rest data, followed 10 minute bouts rest data. Note use term inactivity instead sedentary behaviour lowest intensity level behaviour. reason GGIR attempt classifying activity type sitting moment, feel using term sedentary behaviour fail communicate . boutdur.lig Numeric (default = c(1, 5, 10)). Duration(s) light activity bouts minutes extracted. Light activity bouts detected segments data labelled sleep, MVPA, inactivity bouts. start identification longest shortest duration. default setting, start identification 10 minute bouts, followed 5 minute bouts rest data, followed 1 minute bouts rest data. boutcriter.mvpa Numeric (default = 0.8). number 0 1, defines fraction bout needs threshold.mod. boutcriter.Numeric (default = 0.9). number 0 1, defines fraction bout needs threshold.lig. boutcriter.lig Numeric (default = 0.8). number 0 1, defines fraction bout needs threshold.lig threshold.mod. frag.metrics Character (default = NULL). Fragmentation metric extract. Can \"mean\", \"TP\", \"Gini\", \"power\", \"CoV\", \"NFragPM\", metrics \"\". See package vignette description fragmentation metrics. part6_threshold_combi Character (default = \"40_100_120\") indicate threshold combination derived part 5 used part 6","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-sleep","dir":"Reference","previous_headings":"","what":"params_sleep","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used configure sleep analysis performend GGIR g.part3 g.part4. relyonguider Boolean (default = FALSE). Sustained inactivity bouts (sib) overlap guider labelled sleep. relyonguider = FALSE sib overlaps partially guider sib defines edge SPT window guider. relyonguider = TRUE sib overlaps partially guider guider defines edge SPT window sib. participants instructed wear accelerometer waking hours ignorenonware=FALSE set relyonguider=TRUE, scenarios set FALSE. relyonsleeplog Boolean (default = FALSE). use, now replaced argument relyonguider. Values provided argument relyonsleeplog passed argument relyonguider preserve functionality old R scripts. def.noc.sleep Numeric (default = 1). time window sustained inactivity assumed represent sleep, e.g., def.noc.sleep = c(21, 9). used sleep log entry available. left blank def.noc.sleep = c() 12 hour window centred least active 5 hours 24 hour period used instead. , L5 hardcoded change changing argument winhr function g.part2. def.noc.sleep filled single integer, e.g., def.noc.sleep=c(1) window detected based built algorithms. See argument HASPT.algo HASPT specifying algorithms use. sleepwindowType Character (default = \"SPT\"). indicate type information sleeplog, \"SPT\" sleep period time. Set \"TimeInBed\" sleep log recorded time bed enable calculation sleep latency sleep efficiency. nnights Numeric (default = NULL). argument deprecated. loglocation Character (default = NULL). Path csv file sleep log information. See package vignette format file. colid Numeric (default = 1). Column number sleep log spreadsheet participant ID code stored. coln1 Numeric (default = 2). Column number sleep log spreadsheet onset first night starts. ignorenonwear Boolean (default = TRUE). TRUE ignore detected monitor non-wear periods avoid confusion monitor non-wear time sustained inactivity. constrain2range Deprecated, used Boolean (default = TRUE) Whether constrain range threshold used diary free sleep period time window detection. HASPT.algo Character (default = \"HDCZA\"). indicate algorithm used sleep period time detection. Default \"HDCZA\" Heuristic algorithm looking Distribution Change Z-Angle described van Hees et al. 2018. options included: \"HorAngle\", based HDCZA replaces non-movement detection HDCZA algorithm looking time segments angle longitudinal sensor axis angle relative horizontal plane -45 +45 degrees. \"NotWorn\" also HDCZA looks time segments rolling average acceleration magnitude 5 per cent standard deviation, see Cookbook vignette Annexes https://wadpac.github.io/GGIR/ detailed guidance use \"NotWorn\". HDCZA_threshold Numeric (default = c()) HASPT.algo set \"HDCZA\" HDCZA_threshold NULL, (e.g., HDCZA_threshold = 0.2), value used threshold 6th step diagram Figure 1 van Hees et al. 2018 Scientific Report (doi: 10.1038/s41598-018-31266-z). However, supported research yet intended facilitate methodological research, advise sticking default line publication. , HDCZA_threshold set numeric vector length 2, e.g. c(10, 15), used percentile multiplier mentioned 6th step. HASPT.ignore.invalid Boolean (default = FALSE). indicate whether invalid time segments ignored heuristic guiders. FALSE (default), imputed angle activity metric invalid time segments used. TRUE, invalid time segments ignored (.e., contribute guider). NA, invalid time segments considered movement segments can contribute guider. HASPT.algo \"NotWorn\", HASPT.ignore.invalid automatically set NA. HASIB.algo Character (default = \"vanHees2015\"). indicate algorithm used define sustained inactivity bouts (.e., likely sleep). Options: \"vanHees2015\", \"Sadeh1994\", \"Galland2012\". Sadeh_axis Character (default = \"Y\"). indicate axis use Sadeh1994 algorithm, algortihms relied count-based Actigraphy Galland2012. sleeplogsep Character (default = NULL). argument deprecated. nap_model Character (default = NULL). specify classification model. Currently option \"hip3yr\", corresponds model trained hip data 3-3.5 olds trained parent diary data. longitudinal_axis Integer (default = NULL). indicate axis longitudinal axis. provided, function estimate longitudinal axis axis highest 24 hour lagged autocorrelation. used sensor.location = \"hip\" HASPT.algo = \"HorAngle\". anglethreshold Numeric (default = 5). Angle threshold (degrees) sustained inactivity periods detection. algorithm look periods time (timethreshold) angle variability lower anglethreshold. can specified multiple thresholds, implemented, e.g., anglethreshold = c(5,10). timethreshold Numeric (default = 5). Time threshold (minutes) sustained inactivity periods detection. algorithm look periods time (timethreshold) angle variability lower anglethreshold. can specified multiple thresholds, implemented, e.g., timethreshold = c(5,10). possible_nap_window Numeric (default = c(9, 18)). Numeric vector length two range clock hours naps assumed take place, e.g., possible_nap_window = c(9, 18). Currently used context explorative nap classification algortihm trained 3.5 year olds. possible_nap_dur Numeric (default = c(15, 240)). Numeric vector length two range duration (minutes) nap, e.g., possible_nap_dur = c(15, 240). Currently used context explorative nap classification algortihm trained 3.5 year olds. sleepefficiency.metric Numeric (default = 1). 1 (default), sleep efficiency calculated detected sleep time SPT window divided log-derived time bed. 2, sleep efficiency calculated detected sleep time SPT window divided detected duration sleep period time plus sleep latency (sleep latency refers difference time bed sleep onset). sleepefficiency.metric considered argument sleepwindowType = \"TimeInBed\" possible_nap_edge_acc Numeric (default = Inf). Maximum acceleration SIB nap considered. default allow possible naps.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-","dir":"Reference","previous_headings":"","what":"params_247","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters releated description 24/7 behaviours fall conventional physical activity sleep outcomes, parameters used GGIR g.part2 GGIR g.part5: qwindow Numeric character (default = c(0, 24)). specify windows variables calculated, e.g., acceleration distribution, number valid hours, LXMX analysis, MVPA. numeric, qwindow length two, e.g., qwindow = c(0, 24), variables calculated full 24 hours day. qwindow = c(8, 24) variables calculated window 0-8, 8-24 0-24. days recording segmented based values. want use day specific segmentation day can set qwindow full path activity diary file (character). Expected format activity diary : First column headers followed one row per recording, first column recording ID, needs match ID GGIR extracts accelerometer file. Followed date column format \"23-04-2017\", date format specified argument qwindow_dateformat (). Use character combination date, Date DATE column name. followed one multiple columns start times activity types day format hours:minutes:seconds. header column used label activity type. Insert new date column continuing activity types next day. Leave missing values empty. activity log used individuals appear activity log still processed value qwindow = c(0, 24). Dates activity log data can skipped, need column date followed column next date. times activity diary multiple short window size (epoch length), next epoch considered (e.g., epoch 5 seconds, 8:00:02 redefined 8:00:05 activity log). using qwindow functionality combination GGIR part 5 make sure check arguments segmentWEARcrit.part5 segmentDAYSPTcrit.part5 specified research needs. qwindow_dateformat Character (default = \" specify date format used activity log used strptime. M5L5res Numeric (default = 10). Resolution L5 M5 analysis minutes. winhr Numeric (default = 5). Vector window size(s) (unit: hours) LX MX analysis, look least active consecutive number X hours. qlevels Numeric (default = NULL). Vector percentiles value needs extracted. need expressed fraction 1, e.g., c(0.1, 0.5, 0.75). limit number percentiles. left empty percentiles extracted. Distribution derived short epoch metric data. Argument qlevels can example used MX-metrics (e.g. Rowlands et al) discussed main package vignette ilevels Numeric (default = NULL). Levels acceleration value frequency distribution mg, e.g., ilevels = c(0,100,200). limit number levels. left empty intensity levels extracted. Distribution derived short epoch metric data. iglevels Numeric (default = NULL). Levels acceleration value frequency distribution mg used intensity gradient calculation (according method Rowlands 2018). default argument empty intensity gradient calculation done. user can either provide single value () make intensity gradient use bins iglevels = c(seq(0,4000,=25), 8000) user specify distribution. constriction number levels. IVIS_windowsize_minutes Numeric (default = 60). Window size Intradaily Variability (IV) Interdaily Stability () metrics minutes, needs able add 24 hours. IVIS_epochsize_seconds Numeric (default = NULL). argument deprecated. IVIS.activity.metric Numeric (default = 2). Metric used activity calculation. Value = 1, uses continuous scaled acceleration. Value = 2, tries collapse acceleration binary score rest versus active try simulate original approach. IVIS_acc_threshold Numeric (default = 20). Acceleration threshold distinguish inactive active. qM5L5 Numeric (default = NULL). Percentiles (quantiles) calculated L5 M5 window. MX.ig.min.dur Numeric (default = 10). Minimum MX duration needed order intensity gradient calculated. LUXthresholds Numeric (default = c(0, 100, 500, 1000, 3000, 5000, 10000)). Vector numeric sequence corresponding thresholds used calculate time spent LUX ranges. LUX_cal_constant Numeric (default = NULL). LUX_cal_constant LUX_cal_exponent provided LUX values converted based formula y = constant * exp(x * exponent) LUX_cal_exponent Numeric (default = NULL). LUX_cal_constant LUX_cal_exponent provided LUX LUX values converted based formula y = constant * exp(x * exponent) LUX_day_segments Numeric (default = NULL). Vector hours day segmented LUX analysis. L5M5window Argument deprecated version 1.5-24. argument used define start end time, 24 hour clock hours, L5M5 needs calculated. Now done argument qwindow. cosinor Boolean (default = FALSE). Whether apply cosinor analysis ActCR package. part6CR Boolean (default = FALSE) indicate whether circadian rhythm analysis run part 6. part6HCA Boolean (default = FALSE) indicate whether Household Co Analysis run part 6. part6Window Character vector length two (default = c(\"start\", \"end\")) indicate start end time series used circadian rhythm analysis part 6. words, parameters used Household co-analysis. Alternative values : \"Wx\", \"Ox\", \"Hx\", \"x\" number indicat xth wakeup, onset hour recording. Negative values \"x\" also possible count relative end recording. example, c(\"W1\", \"W-1\") goes first till last wakeup, c(\"H5\", \"H-5\") ignores first last 5 hours, c(\"O2\", \"W10\") goes second onset till 10th wakeup time.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-output","dir":"Reference","previous_headings":"","what":"params_output","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used specify whether GGIR stores output various stages process. storefolderstructure Boolean (default = FALSE). Store folder structure accelerometer data. .part2.pdf Boolean (default = TRUE). g.part2: Whether generate pdf g.part2. .part3.pdf Boolean (default = TRUE). g.part3: Whether generate pdf g.part3. timewindow Character (default = c(\"MM\", \"WW\")). g.part5: Timewindow summary statistics derived. Value can \"MM\" (midnight midnight), \"WW\" (waking time waking time), \"OO\" (sleep onset sleep onset), combination . save_ms5rawlevels Boolean (default = FALSE). g.part5: Whether save time series classification (levels) csv RData files (defined save_ms5raw_format). Note time stamps stored column timenum UTC format (.e., seconds 1970-01-01). convert timenum time stamp format, need specify desired time zone, e.g., .POSIXct(mdat$timenum, tz = \"Europe/London\"). save_ms5raw_format Character (default = \"csv\"). g.part5: specify data stored: either \"csv\" \"RData\". used save_ms5rawlevels = TRUE. save_ms5raw_without_invalid Boolean (default = TRUE). g.part5: indicate whether remove invalid days time series output files. used save_ms5rawlevels = TRUE. epochvalues2csv Boolean (default = FALSE). g.part2: TRUE epoch values exported csv file. , non-wear time imputed possible. .sibreport Boolean (default = FALSE). g.part4: indicate whether generate report sustained inactivity bouts (SIB). set TRUE advanced sleep diary available part 4 part 5 use generate summary statistics overlap self-reported nonwear napping SIB. , SIB can filter based argument possible_nap_edge_acc first value possible_nap_dur .visual Boolean (default = TRUE). g.part4: TRUE, function generate pdf visual representation overlap sleeplog entries accelerometer detections. can used visually verify sleeplog entries come obvious mistakes. outliers.Boolean (default = FALSE). g.part4: used .visual = TRUE. FALSE, available nights included visual representation data sleeplog. TRUE, nights difference onset waking time larger variable argument criterror included. criterror Numeric (default = 3). g.part4: used .visual = TRUE outliers.= TRUE. criterror specifies number minimum number hours difference sleep log accelerometer estimate night included visualisation. visualreport Boolean (default = TRUE). TRUE, generate visual report based combined output g.part2 g.part4. Please note visual report initially developed provide something show study participants data quality checking purposes. time improved visual report also useful QC-ing data. However, scorings shown visual report created visual report may reflect scorings main GGIR analyses reported quantitative csv-reports. effort past 10 years gone making sure csv-report correct, visualreport mostly side project. unfortunate hope find funding future design new report specifically purpose QC-ing analyses done GGIR. viewingwindow Numeric (default = 1). Centre day displayed around noon (viewingwindow = 1) around midnight (viewingwindow = 2) visual report generated visualreport = TRUE. week_weekend_aggregate.part5 Boolean (default = FALSE). g.part5: indicate whether week weekend-days aggregates stored. turned default generates large number extra columns output report. dofirstpage Boolean (default = TRUE). indicate whether first page histograms summarizing whole measurement added file summary reports generated visualreport = TRUE. sep_reports Character (default = \",\"). Value used sep argument fwrite writing csv reports. dec_reports Character (default = \".\"). Value used dec argument fwrite writing csv reports. sep_config Character (default = \",\"). Value used sep argument fwrite writing csv config file. dec_config Character (default = \".\"). Value used dec argument fwrite writing csv config file. visualreport_without_invalid Boolean (default = TRUE). TRUE, reports generated visualreport = TRUE show windows sufficiently valid data according includedaycrit viewingwindow = 1 includenightcrit viewingwindow = 2","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"van Hees VT, Gorzelniak L, Dean Leon EC, Eder M, Pias M, et al. (2013) Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. PLoS ONE 8(4): e61691. doi:10.1371/journal.pone.0061691 van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Auto-calibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Aug 7 van Hees VT, Sabia S, et al. (2015) novel, open access method assess sleep duration using wrist-worn accelerometer, PLoS ONE, November 2015","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"","code":"if (FALSE) { # \\dontrun{ mode = c(1,2,3,4,5) datadir = \"C:/myfolder/mydata\" outputdir = \"C:/myresults\" studyname =\"test\" f0 = 1 f1 = 2 GGIR(#------------------------------- # General parameters #------------------------------- mode = mode, datadir = datadir, outputdir = outputdir, studyname = studyname, f0 = f0, f1 = f1, overwrite = FALSE, do.imp = TRUE, idloc = 1, print.filename = FALSE, storefolderstructure = FALSE, #------------------------------- # Part 1 parameters: #------------------------------- windowsizes = c(5,900,3600), do.cal = TRUE, do.enmo = TRUE, do.anglez = TRUE, chunksize = 1, printsummary = TRUE, #------------------------------- # Part 2 parameters: #------------------------------- data_masking_strategy = 1, ndayswindow = 7, hrs.del.start = 1, hrs.del.end = 1, maxdur = 9, includedaycrit = 16, L5M5window = c(0,24), M5L5res = 10, winhr = c(5,10), qlevels = c(c(1380/1440),c(1410/1440)), qwindow = c(0,24), ilevels = c(seq(0,400,by=50),8000), mvpathreshold = c(100,120), #------------------------------- # Part 3 parameters: #------------------------------- timethreshold = c(5,10), anglethreshold = 5, ignorenonwear = TRUE, #------------------------------- # Part 4 parameters: #------------------------------- excludefirstlast = FALSE, includenightcrit = 16, def.noc.sleep = 1, loglocation = \"D:/sleeplog.csv\", outliers.only = FALSE, criterror = 4, relyonguider = FALSE, colid = 1, coln1 = 2, do.visual = TRUE, #------------------------------- # Part 5 parameters: #------------------------------- # Key functions: Merging physical activity with sleep analyses threshold.lig = c(30,40,50), threshold.mod = c(100,120), threshold.vig = c(400,500), excludefirstlast = FALSE, boutcriter = 0.8, boutcriter.in = 0.9, boutcriter.lig = 0.8, boutcriter.mvpa = 0.8, boutdur.in = c(10,20,30), boutdur.lig = c(1,5,10), boutdur.mvpa = c(1,5,10), timewindow = c(\"WW\"), #----------------------------------- # Report generation #------------------------------- do.report = c(2,4,5)) # For externally derived Actiwatch data in .AWD format: GGIR(datadir = \"/media/actiwatch_awd\", # folder with epoch level .AWD file outputdir = \"/media/myoutput\", dataFormat = \"actiwatch_awd\", extEpochData_timeformat = \"%m/%d/%Y %H:%M:%S\", mode = 1:5, do.report = c(2, 4, 5), windowsizes = c(60, 900, 3600), # 60 is the expected epoch length visualreport = FALSE, outliers.only = FALSE, overwrite = TRUE, HASIB.algo = \"Sadeh1994\", def.noc.sleep = c()) # <= because we cannot use HDCZA for ZCY # For externally derived Actiwatch data in .CSV format: GGIR(datadir = \"/media/actiwatch_csv\", # folder with epoch level .AWD file outputdir = \"/media/myoutput\", dataFormat = \"actiwatch_csv\", extEpochData_timeformat = \"%m/%d/%Y %H:%M:%S\", mode = 1:5, do.report = c(2, 4, 5), windowsizes = c(15, 900, 3600), # 15 is the expected epoch length visualreport = FALSE, outliers.only = FALSE, HASIB.algo = \"Sadeh1994\", def.noc.sleep = c()) # <= because we cannot use HDCZA for ZCY # For externally derived UK Biobank data in .CSV format: GGIR(datadir = \"/media/ukbiobank\", outputdir = \"/media/myoutput\", dataFormat = \"ukbiobank_csv\", extEpochData_timeformat = \"%m/%d/%Y %H:%M:%S\", mode = c(1:2), do.report = c(2), windowsizes = c(5, 900, 3600), # We know that data was stored in 5 second epoch desiredtz = \"Europe/London\", # We know that data was collected in the UK visualreport = FALSE, overwrite = TRUE) # For externally derived ActiGraph count data in .CSV format assuming # a study protocol where sensor was not worn during the night: GGIR(datadir = \"/examplefiles\", outputdir = \"\", dataFormat = \"actigraph_csv\", mode = 1:5, do.report = c(2, 4, 5), windowsizes = c(5, 900, 3600), threshold.in = round(100 * (5/60), digits = 2), threshold.mod = round(2500 * (5/60), digits = 2), threshold.vig = round(10000 * (5/60), digits = 2), extEpochData_timeformat = \"%m/%d/%Y %H:%M:%S\", do.neishabouricounts = TRUE, acc.metric = \"NeishabouriCount_x\", HASPT.algo = \"NotWorn\", HASIB.algo = \"NotWorn\", do.visual = TRUE, includedaycrit = 10, includenightcrit = 10, visualreport = FALSE, outliers.only = FALSE, save_ms5rawlevels = TRUE, ignorenonwear = FALSE, HASPT.ignore.invalid = FALSE, save_ms5raw_without_invalid = FALSE) # For externally derived Sensear data in .xls format: GGIR(datadir = \"C:/yoursenseweardatafolder\", outputdir = \"D:/youroutputfolder\", mode = 1:5, windowsizes = c(60, 900, 3600), threshold.in = 1.5, threshold.mod = 3, threshold.vig = 6, dataFormat = \"sensewear_xls\", extEpochData_timeformat = \"%d-%b-%Y %H:%M:%S\", HASPT.algo = \"NotWorn\", desiredtz = \"America/New_York\", overwrite = TRUE, do.report = c(2, 4, 5), visualreport = FALSE) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/HASIB.html","id":null,"dir":"Reference","previous_headings":"","what":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","title":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","text":"Apply heuristic algorithms sustiained inactivty bouts detection. Function intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASIB.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","text":"","code":"HASIB(HASIB.algo = \"vanHees2015\", timethreshold = c(), anglethreshold = c(), time = c(), anglez = c(), ws3 = c(), zeroCrossingCount = c(), BrondCount = c(), NeishabouriCount = c(), activity = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/HASIB.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","text":"HASIB.algo Character indicator sib algorithm used. Default value: \"vanHees2015\". options: \"Sadeh1994\", \"Galland2012\", \"ColeKripke1992\" anglethreshold See g.sib.det timethreshold See g.sib.det time Vector time per short epoch anglez Vector z-angle per short epoch ws3 See g.getmeta zeroCrossingCount Vector zero crossing counts per epoch required count-based algorithms BrondCount Vector Brond counts per epoch used count-based algorithms NeishabouriCount Vector Neishabouri counts per epoch used count-based algorithms activity Magnitude acceleration, used HASIB.algo set NotWorn. Acceleration metric used specified argument acc.metric elsewhere GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASIB.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","text":"Vector binary indicator sustained inactivity bout, 1 yes, 0 .","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASIB.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASPT.html","id":null,"dir":"Reference","previous_headings":"","what":"Heuristic Algorithms estimating SPT window. — HASPT","title":"Heuristic Algorithms estimating SPT window. — HASPT","text":"used function g.sib.det. Function intended direct use GGIR user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASPT.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Heuristic Algorithms estimating SPT window. — HASPT","text":"","code":"HASPT(angle, sptblocksize = 30, spt_max_gap = 60, ws3 = 5, HASPT.algo=\"HDCZA\", HDCZA_threshold = c(), invalid, HASPT.ignore.invalid = FALSE, activity = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/HASPT.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Heuristic Algorithms estimating SPT window. — HASPT","text":"angle Vector epoch level estimates angle sptblocksize Number indicate minimum SPT block size (minutes) spt_max_gap Number indicate maximum gap (minutes) SPT window blocks. ws3 Number representing epoch length seconds HASPT.algo See GGIR HDCZA_threshold See GGIR invalid Integer vector per epoch indicator valid(=0) invalid(=1) epoch. HASPT.ignore.invalid Boolean indicate whether invalid time segments ignored activity Magnitude acceleration, used HASPT.algo set NotWorn. Acceleration metric used specified argument acc.metric elsewhere GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASPT.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Heuristic Algorithms estimating SPT window. — HASPT","text":"List start end times SPT window threshold used.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASPT.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Heuristic Algorithms estimating SPT window. — HASPT","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifies levels of behaviour for g.part5 function. — identify_levels","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"Identifies levels behaviour acceleratioon sustained inactivity sibdetection (using angles). Function intended direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"","code":"identify_levels(ts, TRLi,TRMi,TRVi, ws3, params_phyact, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"ts Data.frame time series genrated .gpart5 TRLi Numeric acceleration threshold light TRMi Numeric acceleration threshold moderate TRVi Numeric acceleration threshold vigorous ws3 Numeric size epoch seconds params_phyact See g.part2 ... argument used previous version identify_level, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"List items: LEVELS OLEVELS Lnames bc.mvpa bc.lig bc.ts","code":""},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"","code":"if (FALSE) { # \\dontrun{ levels = identify_levels(TRLi,TRMi,TRVi, boutdur.mvpa,boutcriter.mvpa, boutdur.lig,boutcriter.lig, boutdur.in,boutcriter.in, ws3,bout.metric) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/is.ISO8601.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether character timestamp is in iso8601 format. — is.ISO8601","title":"Check whether character timestamp is in iso8601 format. — is.ISO8601","text":"Checks whether timestamp stored character format ISO8601 format ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/is.ISO8601.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether character timestamp is in iso8601 format. — is.ISO8601","text":"","code":"is.ISO8601(x)"},{"path":"https://wadpac.github.io/GGIR/reference/is.ISO8601.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether character timestamp is in iso8601 format. — is.ISO8601","text":"x Timestamps character format either ISO8601 \"yyyy-mm-dd hh:mm:ss\".","code":""},{"path":"https://wadpac.github.io/GGIR/reference/is.ISO8601.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check whether character timestamp is in iso8601 format. — is.ISO8601","text":"","code":"x =\"1980-1-1 18:00:00\" is.ISO8601(x) #> [1] FALSE"},{"path":"https://wadpac.github.io/GGIR/reference/isfilelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether datadir is a directory or a vector with filenames — isfilelist","title":"Checks whether datadir is a directory or a vector with filenames — isfilelist","text":"Checks whether argument datadir used various functions GGIR name directory includes data files whether vector full paths one data files","code":""},{"path":"https://wadpac.github.io/GGIR/reference/isfilelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether datadir is a directory or a vector with filenames — isfilelist","text":"","code":"isfilelist(datadir)"},{"path":"https://wadpac.github.io/GGIR/reference/isfilelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether datadir is a directory or a vector with filenames — isfilelist","text":"datadir Argument datadir used various functions GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/isfilelist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks whether datadir is a directory or a vector with filenames — isfilelist","text":"Boolean whether list files (TRUE) (FALSE)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/isfilelist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks whether datadir is a directory or a vector with filenames — isfilelist","text":"","code":"if (FALSE) { # \\dontrun{ isitafilelist = isfilelist(datadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/ismovisens.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","title":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","text":"Checks whether files datadir folder files collected movisens accelerometers. Note movisens data stored one folder per recording includes multiple bin-files (instead one file per recording usual accelerometer brands). Therefore, datadir indicates directory recording folders stored, , GGIR reads pertinent bin files every folder.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ismovisens.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","text":"","code":"ismovisens(data)"},{"path":"https://wadpac.github.io/GGIR/reference/ismovisens.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","text":"data Full path recording folder (bin files inside) datadir (recording folders stored).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ismovisens.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","text":"Boolean whether movisens file (TRUE) (FALSE)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ismovisens.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","text":"","code":"if (FALSE) { # \\dontrun{ is.mv = ismovisens(data) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/iso8601chartime2POSIX.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert iso8601 timestamps to POSIX timestamp — iso8601chartime2POSIX","title":"Convert iso8601 timestamps to POSIX timestamp — iso8601chartime2POSIX","text":"avoid ambiguities sharing comparing timestamps. timestamps expressed iso8601 format: https://en.wikipedia.org/wiki/ISO_8601 However, generate plots R need convert back POSIX","code":""},{"path":"https://wadpac.github.io/GGIR/reference/iso8601chartime2POSIX.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert iso8601 timestamps to POSIX timestamp — iso8601chartime2POSIX","text":"","code":"iso8601chartime2POSIX(x,tz)"},{"path":"https://wadpac.github.io/GGIR/reference/iso8601chartime2POSIX.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert iso8601 timestamps to POSIX timestamp — iso8601chartime2POSIX","text":"x Vector timestamps iso8601 character format tz Timezone data collection, e.g. \"Europe/London\". See List_of_tz_database_time_zones Wikipedia full list.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/iso8601chartime2POSIX.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert iso8601 timestamps to POSIX timestamp — iso8601chartime2POSIX","text":"","code":"x =\"2017-05-07T13:00:00+0200\" tz = \"Europe/Amsterdam\" x_converted = iso8601chartime2POSIX(x,tz)"},{"path":"https://wadpac.github.io/GGIR/reference/is_this_a_dst_night.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","title":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","text":"Tests whether night follows input calendar date night day saving time (DST) hour time moved.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/is_this_a_dst_night.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","text":"","code":"is_this_a_dst_night(calendar_date=c(),tz=\"Europe/London\")"},{"path":"https://wadpac.github.io/GGIR/reference/is_this_a_dst_night.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","text":"calendar_date Character format dd/mm/yyyy tz Time zone \"Europe/London\" format.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/is_this_a_dst_night.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","text":"dst_night_or_not value=0 DST, value=1 time moved forward, value=-1 time moved forward dsthour Either double hour hour skipped, differs countries","code":""},{"path":"https://wadpac.github.io/GGIR/reference/is_this_a_dst_night.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","text":"","code":"test4dst = is_this_a_dst_night(\"23/03/2014\",tz=\"Europe/London\")"},{"path":"https://wadpac.github.io/GGIR/reference/load_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Load default parameters — load_params","title":"Load default parameters — load_params","text":"Loads default paramter values intended direct use GGIR users.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/load_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load default parameters — load_params","text":"","code":"load_params(topic = c(\"sleep\", \"metrics\", \"rawdata\", \"247\", \"phyact\", \"cleaning\", \"output\", \"general\"))"},{"path":"https://wadpac.github.io/GGIR/reference/load_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load default parameters — load_params","text":"topic Character vector parameter groups loaded.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/load_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load default parameters — load_params","text":"Lists parameter objects","code":""},{"path":"https://wadpac.github.io/GGIR/reference/load_params.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Load default parameters — load_params","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/parametersVignette.html","id":null,"dir":"Reference","previous_headings":"","what":"Builds Section for Parameters Vignette — parametersVignette","title":"Builds Section for Parameters Vignette — parametersVignette","text":"Function extracts documentation given GGIR argument provided GGIR documentation builds structure Parameters Vignette. Function designed direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/parametersVignette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Builds Section for Parameters Vignette — parametersVignette","text":"","code":"parametersVignette(params = \"sleep\")"},{"path":"https://wadpac.github.io/GGIR/reference/parametersVignette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Builds Section for Parameters Vignette — parametersVignette","text":"params Character (default = \"sleep\"). Name parameters object build corresponding section Parameters vignette.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/parametersVignette.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Builds Section for Parameters Vignette — parametersVignette","text":"Structure vignette subsection.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/parametersVignette.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Builds Section for Parameters Vignette — parametersVignette","text":"Jairo Hidalgo Migueles ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6AlignIndividuals.html","id":null,"dir":"Reference","previous_headings":"","what":"part6AlignIndividuals — part6AlignIndividuals","title":"part6AlignIndividuals — part6AlignIndividuals","text":"Align individual time series per household households identified character number string first second '-' filename.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6AlignIndividuals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"part6AlignIndividuals — part6AlignIndividuals","text":"","code":"part6AlignIndividuals(GGIR_ts_dir = NULL, outputdir = NULL, path_ggirms = NULL, desiredtz = \"\", verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/part6AlignIndividuals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"part6AlignIndividuals — part6AlignIndividuals","text":"GGIR_ts_dir Character, path time series directory GGIR output outputdir Directory like store output path_ggirms path GGIR created folder named meta, milestone data files desiredtz Character, specifying timezone database name timezone data collected . verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6AlignIndividuals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"part6AlignIndividuals — part6AlignIndividuals","text":"object returned, files created output directory","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6PairwiseAggregation.html","id":null,"dir":"Reference","previous_headings":"","what":"part6PairwiseAggregation — part6PairwiseAggregation","title":"part6PairwiseAggregation — part6PairwiseAggregation","text":"Pairwise aggregation time series group.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6PairwiseAggregation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"part6PairwiseAggregation — part6PairwiseAggregation","text":"","code":"part6PairwiseAggregation(outputdir = NULL, desiredtz = \"\", verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/part6PairwiseAggregation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"part6PairwiseAggregation — part6PairwiseAggregation","text":"outputdir Directory like store results desiredtz Character, specifying timezone database name timezone data collected verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6PairwiseAggregation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"part6PairwiseAggregation — part6PairwiseAggregation","text":"object returned, files created output directory","code":""},{"path":"https://wadpac.github.io/GGIR/reference/POSIXtime2iso8601.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","title":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","text":"avoid ambiguities sharing comparing timestamps. timestamps expressed iso8601 format: https://en.wikipedia.org/wiki/ISO_8601","code":""},{"path":"https://wadpac.github.io/GGIR/reference/POSIXtime2iso8601.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","text":"","code":"POSIXtime2iso8601(x,tz)"},{"path":"https://wadpac.github.io/GGIR/reference/POSIXtime2iso8601.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","text":"x Vector timestamps POSIX format tz Timezone data collection, e.g. \"Europe/London\". See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones full list","code":""},{"path":"https://wadpac.github.io/GGIR/reference/POSIXtime2iso8601.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/POSIXtime2iso8601.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","text":"","code":"if (FALSE) { # \\dontrun{ x =\"2017-05-07 13:15:17 CEST\" tz = \"Europe/Amsterdam\" x_converted = POSIXtime2iso8601(x,tz) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":null,"dir":"Reference","previous_headings":"","what":"Read custom csv files with accelerometer data — read.myacc.csv","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"Loads csv files accelerometer data standardises output format (incl. unit measurement, timestamp format, header format, column locations) make data compatible GGIR functions.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"","code":"read.myacc.csv(rmc.file=c(), rmc.nrow=Inf, rmc.skip = c(), rmc.dec=\".\", rmc.firstrow.acc = c(), rmc.firstrow.header=c(), rmc.header.length = c(), rmc.col.acc = 1:3, rmc.col.temp = c(), rmc.col.time=c(), rmc.unit.acc = \"g\", rmc.unit.temp = \"C\", rmc.unit.time = \"POSIX\", rmc.format.time = \"%Y-%m-%d %H:%M:%OS\", rmc.bitrate = c(), rmc.dynamic_range = c(), rmc.unsignedbit = TRUE, rmc.origin = \"1970-01-01\", rmc.desiredtz = NULL, rmc.configtz = NULL, rmc.sf = c(), rmc.headername.sf = c(), rmc.headername.sn = c(), rmc.headername.recordingid = c(), rmc.header.structure = c(), rmc.check4timegaps = FALSE, rmc.col.wear = c(), rmc.doresample = FALSE, rmc.scalefactor.acc = 1, interpolationType=1, PreviousLastValue = c(0, 0, 1), PreviousLastTime = NULL, desiredtz = NULL, configtz = NULL, header = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"rmc.file Filename file read working directory, full path file otherwise. rmc.nrow Number rows read, nrow argument read.csv nrows fread. whole file read default (.e., rmc.nrow = Inf). rmc.skip Number rows skip, skip argument read.csv fread. rmc.dec Decimal used numbers, skip argument read.csv fread. rmc.firstrow.acc First row (number) acceleration data. rmc.firstrow.header First row (number) header. Leave blank file header. rmc.header.length file header, specify header length (numeric). rmc.col.acc Vector three column (numbers) acceleration signals stored rmc.col.temp Scalar column (number) temperature stored. Leave default setting temperature avaible. temperature used g.calibrate. rmc.col.time Scalar column (number) timestamps stored. Leave default setting timestamps stored. rmc.unit.acc Character unit acceleration values: \"g\", \"mg\", \"bit\" rmc.unit.temp Character unit temperature values: (K)elvin, (C)elsius, (F)ahrenheit rmc.unit.time Character unit timestamps: \"POSIX\", \"UNIXsec\" (seconds since origin, see argument rmc.origin), \"character\", \"ActivPAL\" (exotic timestamp format used ActivPAL activity monitor). rmc.format.time Character string giving date-time format used strptime. used rmc.unit.time: character POSIX. rmc.bitrate Numeric: unit acceleration bit provide bit rate, e.g. 12 bit. rmc.dynamic_range Numeric, unit acceleration bit provide dynamic range deviation g zero, e.g. +/-6g mean argument needs 6. give argument character value code search file header elements name equal character value use corresponding numeric value next dynamic range. rmc.unsignedbit Boolean, unsignedbit = TRUE means bits positive numbers. unsignedbit = FALSE bits positive negative. rmc.origin Origin time unit time UNIXsec, e.g. 1970-1-1 rmc.desiredtz Deprecated, please see desiredtz. rmc.configtz Deprecated, please see configtz. rmc.sf Sample rate Hertz, stored file header used instead. rmc.headername.sf file header: Row name (character) sample frequency can found. rmc.headername.sn file header: Row name (character) serial number can found. rmc.headername.recordingid file header: Row name (character) recording ID can found. rmc.header.structure Character used split header name header value, e.g. \":\" \" \" rmc.check4timegaps Boolean indicate whether gaps time imputed zeros. sensing equipment provides accelerometer gaps time. rest GGIR designed , setting argument TRUE gaps time filled zeros. rmc.col.wear external wear detection outcome stored part data can used GGIR. argument specifies column wear detection (Boolean) stored. rmc.doresample Boolean indicate whether resample data based available timestamps extracted sample rate file header rmc.scalefactor.acc Numeric value (default 1) scale acceleration signals via multiplication. example, data provided m/s2 setting 1/9.81 derive gravitational units. interpolationType Integer indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour. PreviousLastValue Automatically identified last value previous chunk data read. PreviousLastTime Automatically identified last timestamp previous chunk data read. desiredtz Timezone device worn. configtz Timezone device configured. equal desiredtz can leave default value. header Header information extracted previous time file read, re-used instead extracted .","code":""},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"use function context GGIR use arguments function, except rmc.file, rmc.nrow, rmc.skip input function GGIR g.part1 also specify argument rmc.noise, part function needed tell GGIR noise level expect data. rmc.noise taken params_rawdata object explicitly specified user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"List objects data holding time series acceleration, header available orignal file.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"","code":"# create test files: No header, with temperature, with time N = 30 sf = 30 x = Sys.time()+((0:(N-1))/sf) timestamps = as.POSIXlt(x, origin=\"1970-1-1\", tz = \"Europe/London\") mydata = data.frame(x = rnorm(N), time = timestamps, y = rnorm(N), z = rnorm(N), temp = rnorm(N) + 20) testfile = \"testcsv1.csv\" write.csv(mydata, file= testfile, row.names = FALSE) loadedData = read.myacc.csv(rmc.file=testfile, rmc.nrow=20, rmc.dec=\".\", rmc.firstrow.acc = 1, rmc.firstrow.header=c(), desiredtz = \"\", rmc.col.acc = c(1,3,4), rmc.col.temp = 5, rmc.col.time=2, rmc.unit.acc = \"g\", rmc.unit.temp = \"C\", rmc.origin = \"1970-01-01\") if (file.exists(testfile)) file.remove(testfile) #> [1] TRUE"},{"path":"https://wadpac.github.io/GGIR/reference/ShellDoc2Vignette.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Definition from Shell Documentation — ShellDoc2Vignette","title":"Extract Definition from Shell Documentation — ShellDoc2Vignette","text":"Function extracts documentation given GGIR argument provided GGIR documentation. Function designed direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ShellDoc2Vignette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Definition from Shell Documentation — ShellDoc2Vignette","text":"","code":"ShellDoc2Vignette(argument = \"mode\")"},{"path":"https://wadpac.github.io/GGIR/reference/ShellDoc2Vignette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Definition from Shell Documentation — ShellDoc2Vignette","text":"argument Character (default = \"mode\"). Name argument extract definition.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ShellDoc2Vignette.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Definition from Shell Documentation — ShellDoc2Vignette","text":"Character object definition argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ShellDoc2Vignette.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Definition from Shell Documentation — ShellDoc2Vignette","text":"Jairo Hidalgo Migueles ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"Identifies columns can coerced numeric data frame, transforms columns numeric round specified digits. also replaces NA NaNs values blank.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"","code":"tidyup_df(df = c(), digits = 3)"},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"df Data frame digits Integer indicating number decimal places (round) significant digits (signif) used","code":""},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"Data frame possible columns numeric rounded specified number digits","code":""},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"Jairo H Migueles","code":""},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"","code":"# Test data frame df = data.frame(a = c(\"a\", \"b\"), b = as.character(c(1.543218, 8.216856483))) tidyup_df(df = df, digits = 3) #> a b #> 1 a 1.543 #> 2 b 8.217"},{"path":"https://wadpac.github.io/GGIR/reference/updateBlocksize.html","id":null,"dir":"Reference","previous_headings":"","what":"Update blocksize of data to be read depending on available memory. — updateBlocksize","title":"Update blocksize of data to be read depending on available memory. — updateBlocksize","text":"Function queries available memory either lower increase blocksize used function g.readaccfile","code":""},{"path":"https://wadpac.github.io/GGIR/reference/updateBlocksize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update blocksize of data to be read depending on available memory. — updateBlocksize","text":"","code":"updateBlocksize(blocksize, bsc_qc)"},{"path":"https://wadpac.github.io/GGIR/reference/updateBlocksize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update blocksize of data to be read depending on available memory. — updateBlocksize","text":"blocksize Number filepages (binary data) rows (dataformats). bsc_qc Data.frame columns time (timestamp Sys.time) size (memory size). used housekeeping g.calibrate g.getmeta","code":""},{"path":"https://wadpac.github.io/GGIR/reference/updateBlocksize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Update blocksize of data to be read depending on available memory. — updateBlocksize","text":"List blocksize bsc_qc, format input, although bsc_qc one new row.","code":""},{"path":"https://wadpac.github.io/GGIR/RELEASE_CYCLE.html","id":null,"dir":"","previous_headings":"","what":"Version numbering","title":"Version numbering","text":"use version encoding .B-C: increases major changes affect backward compatibility previous releases like changes function names, function arguments file format. B increases every CRAN release. aim avoid four CRAN releases per year. C increases every GitHub release. aim avoid one GitHub release per month.","code":""},{"path":"https://wadpac.github.io/GGIR/RELEASE_CYCLE.html","id":"github-releases","dir":"","previous_headings":"","what":"GitHub releases","title":"Version numbering","text":"releasing, please make sure check following: Create GitHub issue least 1 weeks intended release announce release indicate release. Make sure change log inst/NEWS.Rd date says “GitHub--release date” rather “release date” Make sure third (last) digit version number incremented one relative master branch date present date. applies files DESCRIPTION, GGIR-package.Rd NEWS.Rd file. Use function prepareNewRelease.R root GGIR double check version number date consistent files. Update package contributor list new people contributed. Run R CMD check ---cran make sure tests checks pass. Note GitHub releases require release name. typically choose random name city town South America. Whatever choose easy read remember word.","code":""},{"path":"https://wadpac.github.io/GGIR/RELEASE_CYCLE.html","id":"cran-releases","dir":"","previous_headings":"","what":"CRAN releases","title":"Version numbering","text":"CRAN release, follow following steps: Create GitHub issue least 4 weeks intended CRAN release announcing release indicating release list. CRAN release come major changes covered GitHub-releases. change log now say “release date” rather “GitHub--release date”. Second digit version number incremented 1 relative current CRAN version. Check whether new R version released coming make sure GGIR also tested version. Run RStudio devtools::check( manual = TRUE, remote = TRUE, incoming = TRUE) help check urls Ask Vincent (GitHub tag: vincentvanhees) submit release CRAN needs come e-mail address.","code":""}] +[{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Contributing.html","id":"if-you-have-coding-skills","dir":"Articles","previous_headings":"","what":"If you have coding skills…","title":"Contributing","text":"welcome contributions development, maintenance, documentation GGIR. Please find GGIR’s contributing guidelines .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Contributing.html","id":"if-you-do-not-have-coding-skills-","dir":"Articles","previous_headings":"","what":"If you do not have coding skills….","title":"Contributing","text":"might coding skills contribute code base GGIR, still contribution important us. example: Apply funding support development maintenance GGIR. GGIR free software entirely depend users applying funding sponsor efforts. Funding used support development new functionalities, support improvement existing GGIR software code, support development better open-access training materials instruction videos. Report issues questions GGIR google group. Proofread GGIR documentation inform us miss something found difficult follow.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_GetStarted.html","id":"run-ggir-for-the-first-time","dir":"Articles","previous_headings":"","what":"Run GGIR for the first time","title":"Get started: the GGIR R package","text":"First, need place file(s) folder computer. Make sure folder contains accelerometer files. Use following command run GGIR. datadir refers directory located accelerometer files. outputdir refers directory want store GGIR’s output. minutes, able see output directory gets populated files, reports, visualizations. command let GGIR run default settings (parameters), analysis tailored yet study design research question. documentation chapters find website guide .","code":"library(GGIR) GGIR(datadir=\"C:/mystudy/mydata\", outputdir=\"D:/myresults\")"},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_GetStarted.html","id":"related-links","dir":"Articles","previous_headings":"","what":"Related links","title":"Get started: the GGIR R package","text":"Install R GGIR Get support Suitable file formats GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Installation.html","id":"install-r-and-rstudio","dir":"Articles","previous_headings":"","what":"Install R and RStudio","title":"Installation of the GGIR R Package","text":"Download install R Download install RStudio","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Installation.html","id":"install-ggir","dir":"Articles","previous_headings":"","what":"Install GGIR","title":"Installation of the GGIR R Package","text":"Install latest released version GGIR dependencies CRAN. can one command R command line: Alternatively, can install latest development version, might include additional bug fixes functionalities. get development version, please use:","code":"install.packages(\"GGIR\", dependencies = TRUE) library(GGIR) install.packages(\"remotes\", dependencies = TRUE) remotes::install_github(\"wadpac/GGIR\", dependencies = TRUE) library(GGIR)"},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Installation.html","id":"other-packages-you-may-need","dir":"Articles","previous_headings":"","what":"Other packages you may need","title":"Installation of the GGIR R Package","text":"Additionally, use-cases need install one multiple additional packages. Note packages installed default, please follow instructions : want derive Neishabouricounts (.neishabouricounts = TRUE), install actilifecounts package install.packages(\"actilifecounts\") want process Sensewear xlsx files (dataFormat = \"sensewear\"), install readxl package install.packages(\"readxl\")","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Installation.html","id":"installing-older-versions-of-a-package","dir":"Articles","previous_headings":"","what":"Installing older versions of a package","title":"Installation of the GGIR R Package","text":"aiming reproduce historical analysis critical install correct package version. explain GGIR release 2.4-0 work release. Note GGIR archived CRAN (major releases ) GitHub (releases). CRAN archive: see releases available CRAN check : https://cran.r-project.org/src/contrib/Archive/GGIR/. GitHub: see releases available CRAN check : https://github.com/wadpac/GGIR/releases.","code":"require(remotes) install_version(\"GGIR\", version = \"2.4-0\", repos = \"http://cran.us.r-project.org\") require(remotes) install_github(\"wadpac/GGIR\", ref = \"2.4-0\")"},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Support.html","id":"questions-and-problems","dir":"Articles","previous_headings":"","what":"Questions and problems","title":"How can I get service and support?","text":"general questions issues please join GGIR google group create new thread. report problem group always try create minimalistic example someone else can use reproduce investigate problem. However, familiar GitHub, also welcome report issue via GitHub issue tracker. Please use message template displayed. Note support places based voluntary efforts encourage try help users questions. Questions valuable help us understand challenges run occasionally help us identify bug code. make practical, please AVOID sending questions personal messages. Instead, post public platforms. approach allows others benefit discussions, minimises need us respond inquiries repeatedly, enhances likelihood others can answer questions ’re unavailable, acknowledges volunteer effort invested responding queries.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Support.html","id":"commercial-training-services","dir":"Articles","previous_headings":"","what":"Commercial training services","title":"How can I get service and support?","text":"Accelting provides online training options using GGIR, please find website. questions, please hesitate reach via: training@accelting.com.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter0_Support.html","id":"dedicated-support","dir":"Articles","previous_headings":"","what":"Dedicated support","title":"How can I get service and support?","text":"need dedicated support use GGIR, want GGIR modified enhanced needs, please contact Vincent van Hees.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-analysis","dir":"Articles","previous_headings":"","what":"Sleep analysis","title":"10. Sleep Analysis","text":"Sleep analysis GGIR comes three stages: discrimination sustained inactivity wakefulness periods, discussed chapter 8. Identification time windows guide eventual sleep detection, discussed chapter 9. Assess overlap windows identified step 1 2, use define Sleep Period Time window (SPT) time bed window (TimeInBed) discussed chapter. previous two chapters learnt first two steps chapter discuss last step.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-period-time-spt-window-or-time-in-bed","dir":"Articles","previous_headings":"Sleep analysis","what":"Sleep Period Time (SPT) window or Time in Bed","title":"10. Sleep Analysis","text":"two scenarios: guider reflects approximation Sleep Period Time window, window sleep onset waking end night, SIB fully partially overlaps guider considered sleep. guider reflects Time Bed SIB fully overlaps guider considered sleep. scenario sleep latency sleep efficiency can estimated included GGIR part 4 report. cases start first SIB considered sleep onset end last SIB considered waking . guiders, “HorAngle”, parameter sleepwindowType automatically set “SPT” corresponding scenario 1, attempt made estimate sleep latency sleep efficiency. use guider sleeplog reflects Time Bed need set parameter sleepwindowType = \"TimeInBed\" tell GGIR follow scenario 2.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"cleaningcode","dir":"Articles","previous_headings":"Sleep analysis > Quality assurance","what":"Cleaningcode","title":"10. Sleep Analysis","text":"monitor possible problems sleep detection, output variable cleaningcode stored per night. Cleaningcode per night (noon-noon 6pm-6pm described ) can one following values: 0: sleep log available SPT identified. 1: sleep log available, alternative guider used (HDCZA default) SPT identified . 2: enough valid accelerometer data present night, parameter includenightcrit used define many valid hours need. 3: accelerometer data available. 4: nights analysed person. 5: SPT estimated based guider , either SIB found entire guider window complicates defining start end SPT, user specified ID number recording night number data_cleaning_file, , tell GGIR rely guider rely accelerometer data particular night. 6: sleep log available also alternative guider (HDCZA/HorAngle) failed specific night use average guider estimates nights recording guider night. HDCZA/HorAngle estimates also available entire recording use L5+/-12 estimate night.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"visual-inspection-of-classifications","dir":"Articles","previous_headings":"Sleep analysis > Quality assurance","what":"Visual inspection of classifications","title":"10. Sleep Analysis","text":"overlap sib guiders difficult review quantitative way, GGIR offers option export visualisation, parameter .visual = TRUE. manage number visualisations generated possible tell GGIR show outliers. , outliers defined difference guider edge final classification sleep onset wakeup time larger parameter criterror. set parameter outliers.= TRUE nights considered outlier displayed. functionality useful reviewing classifications large data sets use sleep logs. Visual inspection outliers way can example help identify data entry errors sleep logs.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"data-cleaning-file","dir":"Articles","previous_headings":"Sleep analysis > Quality assurance","what":"Data cleaning file","title":"10. Sleep Analysis","text":"data quality check may observe adjustments needed. Parameter data_cleaning_file (path csv file create) allows specify individuals nights part4 entirely rely guider. first column csv file column name ID column relyonguider_part4 specify night. night_part4 allows tell GGIR night(s) omitted part 4.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-metrics-available-in-ggir","dir":"Articles","previous_headings":"Sleep analysis","what":"Sleep metrics available in GGIR","title":"10. Sleep Analysis","text":"full overview sleep variables part 4 see: https://cran.r-project.org/web/packages/GGIR/vignettes/GGIR.html#42_Output_part_4 Among assume intuitive: sleep onset wakeup Sleep duration SPT, accumulate sleep time (sustained inactivity bouts classified sleep) WASO, time spent wakefulness sleep onset. However, possible concepts need clarifications:","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-regularity-index-sri","dir":"Articles","previous_headings":"Sleep analysis > Sleep metrics available in GGIR","what":"Sleep Regularity Index (SRI)","title":"10. Sleep Analysis","text":"measure sleep regularity successive days, first described Phillips colleagues. SRI can value -100 100, 100 reflects perfect regularity (identical days), 0 reflects random pattern, -100 reflects perfect reversed regularity. SRI proposed calculated based seven, multitude seven, consecutive days data without missing values. avoid possible role imbalanced data final estimate. However, renders many datasets unsuitable analysis leads painful loss sample size statistical power.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-regularity-index-dealing-with-unbalanced-data","dir":"Articles","previous_headings":"Sleep analysis > Sleep metrics available in GGIR > Sleep Regularity Index (SRI)","what":"Sleep Regularity Index – Dealing with unbalanced data","title":"10. Sleep Analysis","text":"address , implemented SRI GGIR per day-pair. Per day-pair GGIR now stores SRI value fraction 30 second epoch-pairs days valid. fraction can found output variable name SriFractionValid. default, day-pairs excluded fraction 0.66. familiar GGIR threshold coupled 16-hour default value parameter “includenightcrit”. example, set parameter “includenightcrit = 12”, fraction threshold : 12 / 24 = 0.5. Note implemented SRI calculation accounts missing values denominator. result, SRI value interpretation remains unchanged. 30 second epoch setting automatically applied, even rest GGIR process works different epoch duration. day-pair level estimates stored variable SleepRegularityIndex GGIR part 4 .csv-report sleep. , GGIR also stores person-level aggregates : plain average valid days, average valid weekend days, average valid week days. GGIR input arguments needed invoke SRI calculation. calculation automatically performed updating GGIR processing data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"sleep-regularity-index-benefits-of-the-revised-approach","dir":"Articles","previous_headings":"Sleep analysis > Sleep metrics available in GGIR > Sleep Regularity Index (SRI)","what":"Sleep Regularity Index – Benefits of the revised approach","title":"10. Sleep Analysis","text":"enables user study day-pair day-pair variation SRI, role day-pair inclusion criteria. access SRI day-pair level makes possible account imbalanced datasets via multilevel regression analysis applied output GGIR, day-pair one model levels.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"nap-detection","dir":"Articles","previous_headings":"Sleep analysis > Sleep metrics available in GGIR > Sleep Regularity Index (SRI)","what":"Nap detection","title":"10. Sleep Analysis","text":"references daytime nap detection GGIR based experimental functionality requires ongoing investigation. functionality matured expand documentation accordingly.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"key-parameters","dir":"Articles","previous_headings":"Sleep analysis","what":"Key parameters","title":"10. Sleep Analysis","text":"parameters part params_sleep category discussed section “Sleep parameters” https://cran.r-project.org/web/packages/GGIR/vignettes/GGIRParameters.html .visual, outliers., criterror. excludefirstlast. def.noc.sleep includenightcrit data_cleaning_file","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter10_SleepAnalysis.html","id":"related-output","dir":"Articles","previous_headings":"Sleep analysis","what":"Related output","title":"10. Sleep Analysis","text":"GGIR stores two type output: cleaned full output. cleaned output invalid nights removed, full output nights included. specifically, night excluded ‘cleaned’ results based following criteria: study proposed sleep log individuals, nights excluded sleep log used guider. words: nights cleaningcode equal 0 variable sleep log used equals FALSE). study propose sleep log individuals, nights removed cleaningcode higher 1. aware using full output working wrist accelerometer data, missing entries sleep log asks Time Bed replaced HDCZA estimates SPT. Therefore, extra caution taken working full output. Notice part 4 focused sleep research. chapters discuss analysis done part 5. , choice guider may considered less important, estimate time bed considered useful. , may see night excluded cleaned results part 4 still appears cleaned results part 5.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"construct-definition","dir":"Articles","previous_headings":"MVPA, LIPA, and Inactivity","what":"Construct definition","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"popular approach describe time series data physical activity research distinguish called intensity levels. , community distinguishes sedentary behaviour (SB), light physical activity (LIPA), moderate, vigorous physical activity. latter two categories often combined moderate vigorous physical activity (MVPA). exact definition levels poor caused methodological discrepancies decades: Intensity levels defined based metabolic equality task (MET), based oxygen consumption measured indirect calorimetry divided body weight. MET construct fail normalise body weight comparisons individuals activity types different relation body weight bound drive differences. MET thresholds (e.g. 3 MET) different meaning per person MET value driven people terms movement also fitness anthropometry. Lack consensus handle temporal nature behaviour. example, seconds enough define behaviour require minimum time duration? Criterion methods hard standardise across studies. example, studies differ specific equipment, study protocols, preparation data criterion method.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"classification-with-accelerometer-data","dir":"Articles","previous_headings":"MVPA, LIPA, and Inactivity","what":"Classification with accelerometer data","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"accelerometer data processing perspective time spent intensity levels often simplified time spent , , certain acceleration level(s) chosen make crude separation intensity levels. acceleration magnitude(s) use threshold(s), often referred cut-point literature. Time spent , , cut-point(s) intended crude indicator time spent behaviours sufficient rank individuals amount time spent behaviours. simple threshold approach indisputably powerful method far drive physical activity research. GGIR part 2, MVPA estimate. threshold(s) MVPA used GGIR part 2 set parameter mvpathreshold. can specify single value vector multiple values, time spent MVPA derived . However, threshold parameters influence time spent MVPA, discussed following paragraphs.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"role-of-epoch-length","dir":"Articles","previous_headings":"MVPA, LIPA, and Inactivity","what":"Role of epoch length","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"Although accelerometers collect data much higher sampling frequency, work aggregated values (e.g. 1 5 second epochs) following reasons: Accelerometers often used describe patterns metabolic energy expenditure. Metabolic energy expenditure typically defined per breath per minute (indirect calorimetry), per day (room calorimeter), per multiple days (doubly labelled water method). order evaluate methods reference standards, need work similar time resolution. Collapsing data epoch summary measures helps standardise output across data collected different sampling frequencies studies. little evidence raw data accurate representation body acceleration. scientific evidence validity accelerometer data far based epoch aggregates. Short epoch lengths, 1 5 seconds, sensitive sporadic behaviours often combined bout detection identify MVPA sustained behaviour. Longer epochs, 30 60 seconds, problem therefore easier use without bout detection. epoch length GGIR default 5 seconds, can set first value vector specified parameter windowsizes. Although discuss epoch length context MVPA, please note epoch length influences many outcomes GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"bout-detection","dir":"Articles","previous_headings":"MVPA, LIPA, and Inactivity","what":"Bout detection","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"bout time segment meets specific temporal criteria frequently used physical activity research. GGIR facilitates processing data without accounting bouts. motivation look bouts can one following: idea behaviour certain minimum duration contributes certain physiological benefits. make classification behaviour consistent self-report data, sensitive duration specific duration. aid studying fragmentation behaviour. define bout need answer series question: cut-point ? epoch length ? minimum duration bout ? allow gaps bout breaks behaviour interest? yes 4, percentage bout duration, absolute minimum seconds, combination ? yes 4, bout gaps counted towards time spent bouts? first last epoch need meet threshold criteria? order bouts extracted? example, short MVPA bout part longer Inactivity bout two prevails? many bout categories ? GGIR facilitates following freedom bout detection: User decides : Acceleration thresholds light, moderate, vigorous intensity Fraction time cut-point criteria need met (light, inactive, MVPA) Bout duration range. example, simple scenario consider bouts minimum length 10 minutes, also possible subdivide bouts lasting [1, 5) [5, 10) [10, ∞) minutes. Epoch length. User decide : Maximum bout gap 1 minute, fraction time cut-point criteria need met less 100% First last epoch need meet cut-point criteria. Number intensity levels, always: inactive, light MVPA. Order bouts calculated (1 MVPA; 2 inactive; 3 Light)","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"differences-in-physical-activity-estimates-in-part-2-and-5","dir":"Articles","previous_headings":"MVPA, LIPA, and Inactivity","what":"Differences in physical activity estimates in part 2 and 5","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"parameters needed MVPA estimates GGIR part 2 different parameters used estimating MVPA, LIPA Inactivity part 5. GGIR part 2 always provides six distinct approaches MVPA calculation controlled parameters mvpathreshold, boutcriter, mvpadur, first element vector windowsdur. , MVPA provides time spent MVPA based : 5 second, 1 minute 5 minute epochs bouts 5 second epochs 3 different minimum bout duration specified parameter mvpadur. bout durations used separate estimates used complimentary case part 5. example, specifying boutdur.mod = c(5, 10) part 5 result estimate time spent bouts lasting 5 till 10 minutes bouts lasting 10 minutes longer.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"controlling-the-time-window-of-analysis","dir":"Articles","previous_headings":"","what":"Controlling the time window of analysis:","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"discussed chapter 7, possible tell GGIR part 2 part 5 extract variables per segment day. parameter qwindow can find detailed discussion Annex Day segment analysis.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"behavioural-fragmentation","dir":"Articles","previous_headings":"","what":"Behavioural fragmentation","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"addition classifying time spent behavioural class also informative study fragmentation behaviours.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"classes-of-behaviour-used-to-study-fragmentation","dir":"Articles","previous_headings":"Behavioural fragmentation","what":"Classes of behaviour used to study fragmentation","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"GGIR, fragment daytime defined sequence epochs belong one four categories: Inactivity Light Physical Activity (LIPA) Moderate Vigorous Physical Acitivty (MVPA) Physical activity (can either LIPA MVPA) categories represents combination bouted unbouted time respective categories. Inactivity physical activity add full day (outside SPT), well inactivity, LIPA MVPA. fragmentation metrics applied function g.fragmentation. fragment SPT defined sequence epochs belong one four categories: Estimated sleep Estimated wakefulness Inactivity Physical activity (can either LIPA MVPA) Note metrics fragmentation metrics TP NFrag calculated SPT fragments. parameter frag.metrics = \"\" can tell GGIR part 5 derive behavioural fragmentation metrics daytime (separately) spt. may want consider combining parameter part5_agg2_60seconds=TRUE aggregate time series 1 minute resolution common behavioural fragmentation literature.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"fragmentation-metrics","dir":"Articles","previous_headings":"Behavioural fragmentation","what":"Fragmentation metrics","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"Coefficient Variance (CoV) calculated according Blikman et al. 2014, entails dividing standard deviation mean lognormal transformed fragment length (minutes). Transition probability (TP) Inactivity () Physical activity (IN2PA), Physical activity inactivity (PA2IN), LIPA MVPA calculated according Danilevicz et al. 2023 10.21203/rs.3.rs-3543711/v1. Gini index calculated function Gini ineq R package, ineq argument corr set TRUE. Power law exponent metrics: Alpha, x0.5, W0.5 calculated according Chastin et al. 2010. Number fragment per minutes (NFragPM) calculated identical metric fragmentation index Chastin et al. 2012, renamed specific reflection calculation. term fragmentation index appears generic given fragmentation metrics inform us fragmentation. Please note close metrics transition probability, total number divided total sum duration equals 1 divided average duration. Although exact math slightly different.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"conditions-for-calculation-and-value-when-condition-is-not-met","dir":"Articles","previous_headings":"Behavioural fragmentation > Fragmentation metrics","what":"Conditions for calculation and value when condition is not met","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"Metrics Gini CoV calculated least 10 fragments (e.g. 5 inactive 5 active). condition met metric value set missing. Metrics related power law exponent alpha also calculated least 10 fragments, additional condition standard deviation fragment duration zero. conditions met metric value set missing. metrics related binary fragmentation (mean_dur_PA mean_dur_IN), calculated least 2 fragments (1 inactive, 1 active). condition met value set zero. Metrics related TP calculated : least 1 inactivity fragment (1 LIPA 1 MVPA fragment). condition met TP metric value set zero. keep overview recording days met criteria non-zero standard deviation least ten fragments, GGIR part 5 stores variable Nvaliddays_AL10F person level (.e., number valid days least 10 fragments), SD_dur (.e., standard deviation fragment durations) day level well aggregated per person. GGIR derives fragmentation metrics per waking hours day part 5 per recording part 6. Calculation per day allows us explore possibly account behavioural differences days week. However, rare behaviours day level estimate considered less robust recording level estimates generated part 6.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"differences-with-r-package-actfrag","dir":"Articles","previous_headings":"Behavioural fragmentation > Fragmentation metrics","what":"Differences with R package ActFrag:","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"fragmentation functionality initially inspired great work done Dr. Junrui Di colleagues R package ActFrag, described Junrui Di et al. 2017. However, made couple different decisions may affect comparability: Transition probability according Danilevicz et al. 2023 10.21203/rs.3.rs-3543711/v1 Power law alpha exponent metrics calculated according Chastin et al. 2010 using theoretical minimum fragment duration instead observed minimum fragment duration.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"key-arguments","dir":"Articles","previous_headings":"Behavioural fragmentation","what":"Key arguments","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"parameters related cut-points bout detection concentrated “Physical activity parameters” discussed https://cran.r-project.org/ package=GGIR/vignettes/GGIRParameters.html.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter11_DescribingDataCutPoints.html","id":"related-output","dir":"Articles","previous_headings":"Behavioural fragmentation","what":"Related output","title":"11. Physical Activity Fundamentals: Describing the data with cut-points","text":"GGIR part 2 csv reports find: Time spent MVPA GGIR part 5 csv reports find: Time spent MVPA Time spent LIPA Time spent inactivity (abbreviated ) chapter 7 discussed structure part 2 output chapter 11 provide detailed discuss part 5 output. , detailed discussion specific output variables parts see https://cran.r-project.org/web/packages/GGIR/vignettes/GGIR.html#4_Inspecting_the_results","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"creating-a-multi-variate-time-series-object","dir":"Articles","previous_headings":"","what":"Creating a multi-variate time series object","title":"12. Time-use Analysis","text":"first step need map happens recording. , GGIR code combines information derived parts 2, 3 4 multi-variate single time series object, including: Timestamp log data classified invalid. Average acceleration derived GGIR part 2, invalid epochs imputed acceleration metric used specified parameter acc.metric. Sleep classifications GGIR part 3 4. Behavioural class code, GGIR part 5 derives behavioural classes based magnitude acceleration sleep classification. exact number behavioural classes codified depends parameters set, constructed codified : sleep period time window: - Sleep - Wakefulness low acceleration - Wakefulness moderate acceleration - Wakefulness vigorous acceleration waking hours day: - Inactivity unbouted - Inactivity bouted, subdivided one multiple bout durations - Total inactivity time - LIPA unbouted - LIPA bouted, subdivided one multiple bout durations - Total LIPA time - Moderate activity unbouted - Vigorous activity unbouted - MVPA bouted, subdivided one multiple bout durations - Total MVPA time possible export time series generated, discussed towards end chapter.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"defining-the-time-windows","dir":"Articles","previous_headings":"","what":"Defining the time windows","title":"12. Time-use Analysis","text":"GGIR part 2 defined days midnight midnight, GGIR part 4 typically defined nights noon noon. access sleep timing, GGIR part 5 offers additional definitions day. However, given definitions day becoming different calendar day, refer windows data. GGIR part 5 facilitates following time window definitions, can selected parameter timewindow: “WW” “OO”, onset waking times guided estimates part 4, missing, part 5 attempt retrieve estimate guider method. Note parameter timewindow can consist one options beforementioned combination , example, default value timewindow = c(\"MM\", \"WW\").","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"defining-segments-within-the-mm-window","dir":"Articles","previous_headings":"Defining the time windows","what":"Defining segments within the MM window","title":"12. Time-use Analysis","text":"default GGIR segments window waking hours day (referred day) sleep period time window (referred spt). Additionally, timewindow set “MM”, day segment specific analysis performed based segments defined parameters qwindow . Please see annex day segmentation information.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"metrics-calculated-per-window-and-per-segment","dir":"Articles","previous_headings":"","what":"Metrics calculated per window and per segment","title":"12. Time-use Analysis","text":"GGIR provides following metrics time windows calculated, .e., full day, awake time, sleep period time, well (optionally) day segments might provided via parameter qwindow. Duration: Time spent minute per behavioural class. Acceleration: Average acceleration per behavioural class Number blocks: Number blocks per behavioural class, distinction made bouted unbouted, except total number blocks per intensity levels (Nblocks_day_total_IN, Nblocks_day_total_LIPA, Nblocks_day_total_MOD, Nblocks_day_total_VIG). Number bouts: Number bouts per behavioural class. Fragmentation: fragmentation metrics discussed previous chapter. distinction made bouted unbouted behavour. Note fragmentation classes sometimes group multiple intensity levels, e.g. fragmentation physical activity reflects fragmentation LIPA MVPA combined relative Inactive time.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"complementary-variables","dir":"Articles","previous_headings":"Metrics calculated per window and per segment","what":"Complementary variables","title":"12. Time-use Analysis","text":"primary interest sleep research recommend work GGIR part 4 reports. However, want look interactions behaviour sleep, GGIR part 5 reports include sleep estimates used part 5 analysis. Note part 5 criteria sleep estimate inclusion different part 4. part 5 happy estimate, even accelerometer worn night. Additionally, part 5 also come duration awake time, sleep period time, full-day windows, percentage non-wear (read invalid data, typically non-wear).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"seemingly-overlapping-variables-between-ggir-part-2-and-part-5-output","dir":"Articles","previous_headings":"Metrics calculated per window and per segment","what":"Seemingly overlapping variables between GGIR part 2 and part 5 output","title":"12. Time-use Analysis","text":"might noticed, variables reported GGIR part 2 part 5, average acceleration bouts moderate--vigorous physical activity. However, please note values necessarily identical following reasons: Times MVPA can happen . part 2 MVPA can happen time day, never overlap midnight. part 5 MVPA happens waking hours single day, can overlap midnight midnight part sleep period time window. use dayborder parameter value equal zero: midnight scenario actually midnight time set parameter dayborder, e.g. 2 equates 2am. . Difference epoch length. GGIR part 5 comes possibility aggregate epochs 60 seconds parameter part5_agg2_60seconds. parameter set TRUE, full time series aggregated 60 seconds, contrast default 5 second epoch length used part 2. Different time window definition. GGIR part 2 always uses “MM” definition days. GGIR part 5, option define days different ways (see ).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"exporting-time-series","dir":"Articles","previous_headings":"Metrics calculated per window and per segment","what":"Exporting time series","title":"12. Time-use Analysis","text":"export time series set parameter save_ms5rawlevels = TRUE. GGIR part 5 store subfolder meta/ms5.outraw subfolder named unique MVPA threshold combination used. behavioral classes included numbers, legend classes numbers stored separate legend file meta/ms5.outraw folder named “behavioralcodes2020-04-26.csv” date correspond date ran GGIR. Note time series exported GGIR part 5 includes acceleration metric specified parameter acc.metric (default = “ENMO”), angle metrics selected, angle metrics. want explore multiple acceleration metric values, please see documentation parameter epochvalues2csv discussed chapter 3. Additional input parameters may interest: save_ms5raw_format character string specify data stored: either “csv” (default) “RData”. used save_ms5rawlevels=TRUE. save_ms5raw_without_invalid Boolean indicate whether remove invalid days time series output files. used save_ms5rawlevels=TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"key-arguments","dir":"Articles","previous_headings":"","what":"Key arguments","title":"12. Time-use Analysis","text":"threshold.lig, threshold.mod, threshold.vig boudur., boutdur.lig, boutdur.mvpa boutcriter., boutcriter.lig, boutcriter.mvpa frag.metrics timewindow part5_agg2_60seconds save_ms5rawlevels save_ms5raw_format save_ms5raw_without_invalid","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"related-output","dir":"Articles","previous_headings":"","what":"Related output","title":"12. Time-use Analysis","text":"https://cran.r-project.org/web/packages/GGIR/vignettes/GGIR.html#43_Output_part_5 find detailed discussion part 5 output. summary, part 5 produces following files. - Day level summary - Person level summary - Day level summary behaviour per segment day - analysis - Person level summary behaviour per segment day - Variable dictionary (see ) - Time series - Pdf reports vsiualisation","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter12_TimeUseAnalysis.html","id":"variables-dictionary","dir":"Articles","previous_headings":"Related output","what":"Variables dictionary","title":"12. Time-use Analysis","text":"Considering different time window segmentation options, number metrics calculated, different aggregation strategies (.e., plain averages, weighted averages, -optionally- weekday weekend-day averages), number variables exported Part 5 can high. help understanding interpretation variables, GGIR Part5 exports variable dictionary daysummary personsummary csv reports. dictionaries include list variable names calculated analyses together definition variables.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter13_CircadianRhythm.html","id":"mxlx","dir":"Articles","previous_headings":"","what":"MXLX","title":"13. Circadian Rhythm Analysis","text":"Detection continuous least (LX) (MX) active X hours day, X defined argument winhr. GGIR calculates average acceleration, start time, argument iglevels specified also intensity gradient. argument winhr vector descriptive values LX MX derived per value winhr. Within GGIR part 2 MXLX calculated per calendar day , argument qwindow specified, per segment day. Within GGIR part 5 MXLX calculated per window, used combination GENEActiv Axivity accelerometer brand LUX estimates per LX MX included. MX metric described confused MX metrics proposed Rowlands et al. looks accumulated active time may always continuous time. MX metrics Rowlands et al. discussed .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter13_CircadianRhythm.html","id":"cosinor-analysis-and-extended-cosinor-analysis","dir":"Articles","previous_headings":"","what":"Cosinor analysis and Extended Cosinor analysis","title":"13. Circadian Rhythm Analysis","text":"Disclaimer: functionality currently (2024) revised. enhancements incorporated GGIR release section also updated. (Extended) Cosinor analysis quantifies circadian 24 hour cycle. Cosinor analysis refers fiting cosine function time series, extended cosinor analysis refers fitting cosine function transformed time series afrer Marler et al. Statist. Med. 2006 (doi: 10.1002/sim.2466). GGIR uses R package ActCR dependency. Specify argument cosinor = TRUE perform analysis. GGIR performs cosinor analysis part 2 6. implementation within GGIR part 2 follows: Acceleration values averaged per minute, log transformation log(acceleration converted _mg_ + 1). Invalid data points caused non-wear set missing (NA) order prevent imputation approach used elsewhere GGIR influence Cosinor analysis. imputation technique generally come assumptions circadian rhythm. GGIR looks first valid data point recording selects maximum integer number recording days following data point feeds ActCosinor ActExtendCosinor functions ActCR. time offset start following midnight used reverse offset ActCR results, ensure acrophase acrotime can interpreted relative midnight. relation Day Saving Time: Duplicated time stamps clock moves backward ignored missing time stamps clock moves forward inserted missing values. Time series corresponding fitted models stored inside part 2 milestone data facilitate visual inspection. moment used GGIR visualisation, may want look try plot . implementation within GGIR part 6 follows: - time series used interval defined parameter part6Window. - Make sure set save_ms5raw_without_invalid = FALSE, revision also handle setting TRUE moment TRUE introduces errors.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter13_CircadianRhythm.html","id":"intradaily-variability-iv-and-interdaily-stability-is","dir":"Articles","previous_headings":"","what":"Intradaily Variability (IV) and Interdaily Stability (IS)","title":"13. Circadian Rhythm Analysis","text":"Disclaimer: functionality currently (2024) revised. enhancements incorporated GGIR release section also updated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter13_CircadianRhythm.html","id":"iv-and-is---default","dir":"Articles","previous_headings":"Intradaily Variability (IV) and Interdaily Stability (IS)","what":"IV and IS - Default","title":"13. Circadian Rhythm Analysis","text":"original implementation (argument IVIS.activity.metric = 1) uses continuous numeric acceleration values. However, later realised, compatible original approach van Someren colleagues, uses binary distinction active inactive. Therefore, second option added (argument IVIS.activity.metric = 2), needs used combination accelerometer metric ENMO, collapses acceleration values binary score rest versus active. current default.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter13_CircadianRhythm.html","id":"iv-and-is---cosinor-analysis-compatible","dir":"Articles","previous_headings":"Intradaily Variability (IV) and Interdaily Stability (IS)","what":"IV and IS - Cosinor analysis compatible","title":"13. Circadian Rhythm Analysis","text":"sometimes used measure behavioural robustness conducting Cosinor analysis. However, work combination two outcomes seems important calculated time series. Therefore, cosinor = TRUE IV calculated twice: part default IV analysis discussed , part Cosinor analysis using log transformed time series. specifically, IV algorithm applied IVIS.activity.metric = 2 threshold IVIS_acc_threshold = log(20 + 1) make binary distinction active inactive, IVIS_per_daypair = TRUE. setting IVIS_per_daypair specifically designed context handle potentially missing values time series used Cosinor analysis. Applying default IVIS algorithm able handle missing values result loss information non-matching epochs across entire recording excluded. Instead, IV calculated follows: Per day pair based matching valid epochs IV calculated. , log kept number valid epochs per day pair. Omit day pairs fraction valid epoch pairs 0.66 (0.66 hard-coded moment). Calculate average across days weighted fraction valid epochs per day pairs. new Cosinor-compatible IV estimates stored output variables cosinorIV cosinorIS.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"a-brief-overview","dir":"Articles","previous_headings":"","what":"A brief overview","title":"1. What is GGIR","text":"GGIR R-package primarily designed process multi-day raw accelerometer data physical activity, sleep, circadian rhythm research. term raw refers data expressed gravitational units (1 g equal gravitational acceleration, average 9.81 m/s2) opposed previous generation accelerometers stored data accelerometer brand-specific units epoch level, typically 5, 30, 60 seconds length. Despite focus raw data, GGIR also offers functionality process previous-generation accelerometer data. signal processing raw data includes many steps explained pages. example, automatic calibration gravity, detection abnormally high values, imputation raw-level time gaps (specific sensor brands), calculation orientation angle average magnitude acceleration based variety metrics. Next, signal processing raw previous-generation data continue detection non-wear epoch-level imputation. Finally, GGIR uses information describe data data quality data summary metrics interpreted estimates physical activity, inactivity, sleep, circadian rhythm. time resolutions GGIR output : Per recording, typically matches one participant ID. Calendar day option specify day border timing midnight default. Night period time participant likely main daily sleep period, initial focus time window defined noon noon next day, unless person wakes noon next day, case focus shifts 6pm 6pm next day. Day segment, can defined via code indicate timing segments within day standardised recordings days dataset via diary file, segment definition allowed vary per recording day. Window defined Waking-main sleep period Waking-next main sleep period. Window defined Sleep onset start main sleep period sleep onset start next main sleep period. Epoch-level time series, epoch length set user example 5 seconds. (Optionally, default) Per sequence recordings matching participant IDs. example, person tracked first one accelerometer accelerometer replaced different accelerometers. details use , see documentation GGIR parameter maxRecordingInterval documentation use GGIR parameters explained .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"key-strengths","dir":"Articles","previous_headings":"","what":"Key strengths","title":"1. What is GGIR","text":"GGIR permissive open-source software license maximise re-use collaboration. GGIR applicable data multiple sensor brands file formats. GGIR facilitates sleep, physical activity, circadian rhythm research. GGIR extensive quantitative output designed use quantitative research. GGIR designed computationally efficient option store re-use intermediate milestone data option process multiple files parallel computer discussed Chapter 2. GGIR designed accessible new users without experience R programming. GGIR requires one function call comes elaborate open-access documentation. Additionally, paid training courses offered maximise opportunity users learn GGIR us learn users. GGIR dozen code contributors. GGIR available CRAN archive, meaning meets CRAN standards release gone series automated checks. public email list (google group) users reach maintainers. hundreds publications used GGIR, powerful way identify problems improve code provided us wide range reference values.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"history","dir":"Articles","previous_headings":"","what":"History","title":"1. What is GGIR","text":"elaborate reflection GGIR’s first 10 years existence can found blog post. short, GGIR evolved series R scripts used research around 2010-2012 first release 2013. key factor growth GGIR adoption research community willingness variety researchers invest GGIR either terms time investment financially. GGIR without efforts.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"flexible-and-accessible","dir":"Articles","previous_headings":"Philosophy behind GGIR","what":"Flexible and accessible","title":"1. What is GGIR","text":"research field highly heterogeneous : choice sensor brand, data format, study protocols used, research questions tries answer. time many within field lack time skills write custom data processing software. GGIR aims flexible handle different scenarios time remain accessible lack time skills write software. , hope GGIR use without financial resources commercial software, although like stress charity depend paid unpaid contributions community.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"algorithm-design","dir":"Articles","previous_headings":"Philosophy behind GGIR","what":"Algorithm design","title":"1. What is GGIR","text":"philosophy behind algorithms implemented GGIR biomechanical explainable (heuristic knowledge driven) approaches measurement science preferable purely data-driven approaches. knowledge driven approach unrealistic can consider data-driven approach. idea knowledge driven approach order advance insight field research, essential understanding causal relation phenomena observed (e.g. acceleration one body part), way (acceleration) sensor works, data produced, interpret data. example, know body acceleration relates energy expenditure physics human physiology. abundance scientific publications reported positive correlation accelerometer data energy expenditure served confirm existing knowledge correct. contrast, data-driven methods focus optimal correlation sensor data reference labels values, much less concerned causal associations focus knowledge driven approaches, defined . Identical correlation necessarily equal causation health research, process measurement can also confounded. examples: may see differences body acceleration patterns correlate different activity types different levels energy expenditure, mean actually measure activity types energy expenditure levels. Ignoring aspects can easily lead overestimating value accelerometer measuring constructs (activity type, etc) underestimate value accelerometer capturing acceleration useful measure behaviour, appropriately used interpreted. second problem data-driven methods heavily depend availability reliable criterion methods. argue reliable criterion methods exist physical behaviour measurement: Indirect calorimetry indicators energy metabolism can derived unable account activity type specific role body weight energy metabolism. makes impossible make standardised comparison energy cost different activity types across individuals differ body weight. See also reflections blog post. Polysomnography (PSG) standard sleep research. PSG offers physiological definition sleep impossible capture movement sensor. Therefore, forced simplify definition ‘sleep’ towards definition can captured movement sensor. result, act evaluating accelerometer ability classify sleep PSG becomes somewhat meaningless already know measuring construct PSG. Activity types ambiguous define given high number ways can performed. introduces fundamental level uncertainty robustness models outside datasets context developed . result, essential put strong emphasis algorithms descriptive value regardless whether offer high correlation supposed criterion methods.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"permissive-open-source-license","dir":"Articles","previous_headings":"Philosophy behind GGIR","what":"Permissive open-source license","title":"1. What is GGIR","text":"may sound obvious research software open-source, fields physical activity sleep research, far accepted approach. GGIR one research tools field permissive license aimed maximise potential re-use collaboration.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter1_WhatIsGGIR.html","id":"documentation-structure-and-origin","dir":"Articles","previous_headings":"","what":"Documentation structure and origin","title":"1. What is GGIR","text":"structured chapters line GGIR training course organising recent years. documentation existed collection ad-hoc written paragraphs, lacked clear overarching structure narrative. result, difficult use documentation training course. , also wanted provide good level documentation follow course want refresh understanding GGIR. documentation mainly written narrative style tried explain theory practice GGIR functionalities. mentioned , GGIR offers vast amount functionality. arrive expectation find quick instruction run use GGIR research disappoint . Learning use GGIR requires time investment. Everything need type R script highlighted like . documentation intended academic review: cite publications clarify origin algorithms discuss part GGIR. Finally, first version documentation sponsored Accelting commitment remain available free open-access documentation. However, things like much easier maintain community: grateful help improve documentation either giving feedback, pull requests (know ), financially.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"the-ggir-function","dir":"Articles","previous_headings":"","what":"The GGIR function","title":"2. The GGIR pipeline","text":"brief introduction unfamiliar R software, R packages constructed sub-components, named functions. single function typically allows specific task. example, may sum function sums numbers provide . function can one multiple parameters control functions behaviour. R parameters call function arguments. example, sum argument na.rm control needs done missing values. GGIR refer arguments parameters. GGIR comes large number functions parameters together form processing pipeline. ease interacting GGIR, one central function act interface functionality. function also named GGIR. need learn work function GGIR, important understand background function interacts functions GGIR. , important understand GGIR package structured two complementary ways: Parts: Reflecting computational components running GGIR. GGIR 6 parts numbered 1 6 reflect order executed. reason GGIR split parts avoids re-run preceding parts want make small change downstream parts. parts together form pipeline. Parameter themes: Reflecting themes around user can control GGIR, e.g. controlling sleep detected controlling output stored stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"parts-of-the-pipeline","dir":"Articles","previous_headings":"The GGIR function","what":"Parts of the pipeline","title":"2. The GGIR pipeline","text":"GGIR, computational structure six parts applied sequentially data: Part 1: Loads data, works data quality, stores derived summary measures per time interval, also known signal features metrics, needed following parts. Part 2: Basic data quality assessment based extract metrics description data per day, per file, optionally per day segment. Part 3: Estimation rest periods, needed input Part 4. Part 4: Labels rest periods derived Part 3 sleep per night per file. Part 5: Compiles time series classification sleep physical behaviour categories re-using information derived part 2, 3, 4. includes detection behavioural bouts, time segments behaviour sustained duration specified user. Next, Part 5 generates descriptive summary time spent average acceleration per behavioural category, also behavioural fragmentation. Part 6: Facilitates analyses span full recording household co-analysis circadian rhythm analysis. specific order content parts evolved time, Part 1 2 created 2011-2013, Part 3 4 created 2013-2015, Part 5 created 2017-2020, Part 6 created 2023-2024. , parts also reflect historical expansion GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"milestone-data","dir":"Articles","previous_headings":"The GGIR function > Parts of the pipeline","what":"Milestone data","title":"2. The GGIR pipeline","text":"part, run, stores output R-data file .RData extension, refer milestone data. user, unlikely ever need interact directly milestone data files relevant output stored csv pdf files output folder results. milestone files read next GGIR part. advantage design offers internal modularity. example, can run part 1 now continue part 2 another time without repeat part 1 . , design eases re-processing also helpful us developing testing GGIR code. milestone data files stored sub-folders output folder show . Note output folder named output_mystudy example exact name may differ . part 1: output_mystudy/meta/basic. part 2: output_mystudy/meta/ms2.. part 3: output_mystudy/meta/ms3.. part 4: output_mystudy/meta/ms4.. part 5: output_mystudy/meta/ms5.. part 6: output_mystudy/meta/ms6.. milestone files potentially useful following reasons: copying milestone files new computer, may continue analyses without access original data files. can example helpful process subsets study different computers, pooling resulting milestone data allows finalise analysis single computer. Remember preserve folder structure. run problem, milestone files may allow share problem reproducible example problem without share original large data file.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"parameter-themes","dir":"Articles","previous_headings":"The GGIR function","what":"Parameter themes","title":"2. The GGIR pipeline","text":"parameters GGIR package functions can used parameter GGIR function. parameters internally grouped thematically, independently six parts used : params_rawdata: parameters related handling raw data resampling calibrating. params_metrics: parameters related aggregating raw data epoch level summary measures (metrics). params_sleep: parameters related sleep detection. params_phyact: parameters related physical ()activity. params_247: parameters related 24/7 behaviours fall typical sleep physical ()activity research category measures circadian rhythm 24 hour data description techniques. params_output: parameters relating whether output stored. params_general: general parameters covered categories GGIR user need remember theme parameter belongs . However, may notice documentation structure parameter theme ease navigating parameters. couple ways inspect parameters parameter category default values:","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"ggir-function-documentation","dir":"Articles","previous_headings":"The GGIR function > Parameter themes","what":"GGIR function documentation:","title":"2. The GGIR pipeline","text":"","code":"?GGIR"},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"parameters-vignette","dir":"Articles","previous_headings":"The GGIR function > Parameter themes","what":"Parameters vignette:","title":"2. The GGIR pipeline","text":"Documentation meaning parameter, default value, expected value(s) can found vignette: GGIR configuration parameters.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"from-r-command-line","dir":"Articles","previous_headings":"The GGIR function > Parameter themes","what":"From R command line:","title":"2. The GGIR pipeline","text":"interested one specific category like sleep: interested e.g. parameter HASIB.algo sleep_params object: parameters accepted parameter function GGIR, GGIR like shell around GGIR functionality. However, params_ objects provided input GGIR.","code":"library(GGIR) print(load_params()) library(GGIR) print(load_params()$params_sleep) library(GGIR) print(load_params()$params_sleep[[\"HASIB.algo\"]])"},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"configuration-file-","dir":"Articles","previous_headings":"The GGIR function > Parameter themes","what":"Configuration file.","title":"2. The GGIR pipeline","text":"GGIR stores parameter values csv-file named config.csv. file stored run GGIR root output folder, overwriting existing config.csv file. , like add annotations file, e.g. fourth column, need store somewhere outside output folder specify path file parameter configfile. Note parameters datadir outputdirdiscussed always need specified directly part configfile. practical value eases replication analysis, instead share R script colleagues, sharing config.csv file sufficient. Please make sure GGIR R version installed using reproducibility. See guidance install older package versions.","code":"library(GGIR) GGIR(datadir = \"C:/mystudy/mydata\", outputdir = \"D:/myresults\", configfile = \"D:/myconfigfiles/config.csv\")"},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"parameter-extraction-order","dir":"Articles","previous_headings":"The GGIR function > Parameter themes","what":"Parameter extraction order","title":"2. The GGIR pipeline","text":"parameters provided GGIR call, GGIR always uses . parameters provided GGIR call, GGIR checks whether config.csv file either output folder specified via parameter configfile loads values. parameter neither specified GGIR function call available config.csv file, GGIR use default value’s can inspected discussed section . , important realise consequence logic GGIR revert default parameter values repeated run GGIR unless remove parameter function call delete config.csv file specify original (default) value parameter explicitly GGIR call. ensure clear example: GGIR used first time without specifying parameter mvpathreshold, use default value, 100. specify mvpathreshold = 120, GGIR use instead store config.csv file. run GGIR time delete mvpathreshold = 120 GGIR call, GGIR fall back value 120 now stored config.csv file. delete config.csv file run GGIR , value 100 used .","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"raw-data","dir":"Articles","previous_headings":"Input files","what":"Raw data","title":"2. The GGIR pipeline","text":"GGIR currently works following accelerometer brands formats: GENEActiv .bin Axivity AX3 AX6 .cwa ActiGraph .csv .gt3x (.gt3x newer format generated firmware versions 2.5.0. Serial numbers start “NEO” “MRA” firmware version 2.5.0 earlier use older format .gt3x file). want work .csv exports via commercial ActiLife software, note option export data timestamps, turned . cope absence timestamps GGIR calculate timestamps sample frequency, start time, start date presented file header. Movisens data stored folders. accelerometer brand generates csv output, see documentation functions read.myacc.csv parameter rmc.noise vignette Reading csv files raw data GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"externally-derived-epoch-level-data","dir":"Articles","previous_headings":"Input files","what":"Externally derived epoch-level data","title":"2. The GGIR pipeline","text":"default GGIR assumes data raw discussed chapter 1. However, studies raw data available epoch level aggregate. example, done external software done inside accelerometer device. Although can introduce severe limitations transparency flexibility analysis, GGIR makes attempt facilitate analysis externally performed aggregations raw data. Please find overview file format currently facilitated: Note: Actiwatch ActiGraph, physical activity description sleep classification needs tailored count-specific algorithms: .neishabouricounts = TRUE, acc.metric = \"NeishabouriCount_x\", HASPT.algo = \"NotWorn\" HASIB.algo = \"NotWorn\"; Note 2: UK Biobank csv epoch data, GGIR facilitate sleep analysis arm angle exported. See GGIR CookBook example recipes working external data. process files, GGIR loads content saves GGIR part 1 milestone data, essentially fooling rest GGIR think GGIR part 1 created based raw data input. discussed chapter 3, GGIR non-wear detection two steps: first step done part 1 second step done part 2. relation externally derived epoch data non-wear detected looking consecutive zeros one hour (Actiwatch, ActiGraph) derived file (UK Biobank csv). accelerometer data need analysed stored one folder subfolders folder. Make sure folder contain files accelerometer data. Choose appropriate name folder, preferable reference study project related rather just ‘data’, name folder used identifier dataset integrated name output folder GGIR creates.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"how-to-run-your-analysis","dir":"Articles","previous_headings":"","what":"How to run your analysis?","title":"2. The GGIR pipeline","text":"bare minimum input needed GGIR : Parameter datadir allows specify stored accelerometer data outputdir allows specify like output analyses stored. equal datadir. copy paste code new R script (file ending .R) Source R(Studio), dataset processed output stored specified output directory. GGIR refers file directories folders. unfamiliar term directory: folder. Next, can add parameter mode tell GGIR part(s) run, e.g. mode = 1:5 tells GGIR run five parts default. parameter overwrite, can tell GGIR whether overwrite previously produced milestone data . , parameter idloc tells GGIR find participant ID. default setting likely work data formats, important tailor value parameter study setting. example, files start participant ID followed underscore set idloc=2. See documentation parameter idloc examples. GGIR stores output csv files comma default column separator dot default decimal separator standard UK/US. However, computer configured different region world can modified parameters sep_reports dec_reports, respectively.","code":"library(GGIR) GGIR(datadir = \"C:/mystudy/mydata\", outputdir = \"D:/myresults\")"},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"from-the-r-console-on-your-own-desktoplaptop","dir":"Articles","previous_headings":"How to run your analysis?","what":"From the R console on your own desktop/laptop","title":"2. The GGIR pipeline","text":"Create R-script put library(GGIR) next line GGIR call GGIR(datadir=\"yourdatapath\", outputdir=\"yourdatapath\"). Next, can source R-script source button RStudio: source(\"pathtoscript/myshellscript.R\") GGIR default supports multi-thread processing used process one input file per process, speeding processing data. can turned setting parameter .parallel = FALSE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"in-a-cluster","dir":"Articles","previous_headings":"How to run your analysis?","what":"In a cluster","title":"2. The GGIR pipeline","text":"processing data GGIR desktop/laptop fast enough, advise using GGIR computing cluster. way Sun Grid Engine cluster shown . Please note commands specific computing cluster working . Please consult local cluster specialist explore run GGIR cluster. , share . three files SGE setting: submit.sh run-mainscript.sh myshellscript.R need update ... last line parameters used GGIR. Note f0=f0,f1=f1 essential work. values f0 f1 passed bash script. setup, need call bash submit.sh command line. help computing clusters, GGIR successfully run world’s largest accelerometer datasets UK Biobank German NAKO study.","code":"for i in {1..707}; do n=1 s=$(($(($n * $[$i-1]))+1)) e=$(($i * $n)) qsub /home/nvhv/WORKING_DATA/bashscripts/run-mainscript.sh $s $e done #! /bin/bash #$ -cwd -V #$ -l h_vmem=12G /usr/bin/R --vanilla --args f0=$1 f1=$2 < /home/nvhv/WORKING_DATA/test/myshellscript.R options(echo=TRUE) args = commandArgs(TRUE) if(length(args) > 0) { for (i in 1:length(args)) { eval(parse(text = args[[i]])) } } GGIR(f0=f0,f1=f1,...)"},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"processing-time","dir":"Articles","previous_headings":"","what":"Processing time","title":"2. The GGIR pipeline","text":"time process typical seven-day recording anywhere 3 10 minutes depending sample frequency recording, sensor brand, data format, exact configuration GGIR, specifications computer. observing processing times 20 minutes longer seven-day recording probably slowed factors. tips may able address : Make sure data process machine GGIR run. Processing data located somewhere else computer network can substantially slow software. Make sure machine 8GB RAM memory. Using GGIR old machines 4GB known slow. However, total memory bottle neck. Also consider number processes (threads) CPU can run relative amount memory. Ending 2GB per process seems good target. can helpful turn parallel processing .parallel = FALSE. Avoid computational activities machine running GGIR. example, use DropBox OneDrive make sure sync running GGIR. probably best use machine using GGIR process large datasets. Make sure machine configured automatically turn X hours terminate GGIR. , may want configure machine fall asleep pauses GGIR. Lower value parameter maxNcores default uses number available cores derived command parallel::detectCores() minus 1. might cases demanding operating system. Reduce amount data GGIR loads memory parameter chunksize, can useful machines limited memory processing many files parallel. chunksize value 0.2 make GGIR load data chunks 20% size relative chunks loads default, approximately 12 hours data auto-calibration routine 24 hours data calculation signal metrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter2_Pipeline.html","id":"ggir-output","dir":"Articles","previous_headings":"","what":"GGIR output","title":"2. The GGIR pipeline","text":"GGIR always creates output folder location specified parameter outputdir. output folder name constructed output_ followed name dataset derived distal folder name data directory specified datadir. recommend approach ensures output folder data directory matching names. way less likely confusion data folder output relates . However, possible use datadir specify vector paths individual files, may helpful want process set files position move new folder. scenario, need set parameter studyname tell GGIR dataset name . Inside output folder GGIR create two subfolders: meta results discussed earlier chapter. Inside results find folder named QC (Quality Checks). name QC (Quality Checks) possibly somewhat confusing. Data quality checks best started files stored results folder, files QC subfolder offer complementary information help quality check. GGIR generates reports parts 2, 4, 5, 6 pipeline. parameter .report can specify parts want reports generated. example, .report = c(2, 5) generate report parts 2 5. full GGIR analysis expect least following output files: Output files results subfolder: detailed discussion output can found chapters. Output files results/QC subfolder: detailed discussion output can found chapters. Output files meta/ms5.outraw subfolder: detailed discussion output can found chapters.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"time-gaps-identification-and-imputation","dir":"Articles","previous_headings":"","what":"Time gaps identification and imputation","title":"3. Data Quality Assurance","text":"Accelerometer data stored binary format (e.g. .bin .cwa) typically structured data blocks. data block header top constant number data points per block, usually equivalent seconds data. Axivity accelerometer data stored ‘.cwa’ file format blocks can, rare occasions, corrupted unreadable, therefore creating gap information recorded. ActiGraph accelerometer, also sensor brands export data ‘csv’ file format, possible recording stops certain time starts recording time, therefore creating time gap. GGIR developed efficiently identify manage time gaps.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"time-gaps-in-axivity-cwa-files","dir":"Articles","previous_headings":"Time gaps identification and imputation","what":"Time gaps in Axivity cwa files","title":"3. Data Quality Assurance","text":"Although expected occur often, Axivity cwa data can come faulty data blocks. ‘faulty’ mean data block interpretable. example, faulty blocks may occur device recording mode connected computer USB cable. address , R package GGIRread, used GGIR read cwa files, identifies faulty blocks imputes last recorded non-faulty acceleration value normalised 1 g (g unit gravitational acceleration). sampling rate accelerometer refers number data points recorded stored per second. Axivity devices expected design slightly variable sampling rate time, accounted interpolating data loaded R. example, data may collected 99.7 Hertz one block, interpolation technique interpolate data 100 Hertz. interpolation happens inside R package GGIRread. exact technique used interpolation set parameter interpolationType uses linear interpolation default (interpolationType = 1), can also set nearest neighbour interpolation (interpolationType = 2). quality assurance, GGIRread keeps track variation sampling rate per data block automatically imputes blocks (smallest segment data cwa file, typically seconds long) sampling rate deviates 10% expected sampling rate. imputation technique time gaps detailed earlier section. unhappy 10% threshold possibility changing percentage parameter frequency_tol. Biased sampling rates kind expected extremely rare expected affect normal research conditions, nonetheless like able account . Additionally, monitor process handling faulty blocks outliers sampling rate, GGIRread logs series file health statistics stored GGIR ‘data_quality_report.csv’ file located within ‘QC’ folder output directory ‘results’ (see previous chapter discussion GGIR output). data quality report, comes variable names prefixed ‘filehealth’, detailing number duration time gaps detected recording(s), well number epochs 5-10% 10% bias sampling rate.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"time-gaps-in-actigraph-gt3x-and-ad-hoc-csv-files","dir":"Articles","previous_headings":"Time gaps identification and imputation","what":"Time gaps in ActiGraph gt3x and ad-hoc csv files","title":"3. Data Quality Assurance","text":"manufacturers incorporate functionalities devices let stop recording long episode movement, aiming conserve battery life reduce data size. However, feature results recorded signals containing intermittent time gaps must accounted data processing. example, ActiGraph option called ‘idle sleep mode’ devices, pauses data collection movement detected sustained period time. ActiGraph’s idle sleep mode explained manufacturer’s website. time gaps data considered non-wear time GGIR. GGIR imputes gaps shorter 90 minutes raw data level, using last recorded value (meaning gap) normalised 1 g. approach assumes accelerometer kept orientation last observed. contrary, gaps longer 90 minutes imputed epoch level make data processing memory efficient faster. epoch level imputation discussed chapter 6. number duration time gaps found logged GGIR ‘data_quality_report.csv’ file located within ‘QC’ folder output directory ‘results’ (see previous chapter discussion GGIR output). Studies often forget clarify whether accelerometers configured pause data collection periods movement , , resulting time gaps accounted data processing. Especially, device firmware manufacturer software already imputes time gaps can cause significant bias GGIR estimates. generally speaking, advise : Report whether ‘idle sleep mode’ similar functionalities used. Disable functionality, possible, harms transparency reproducibility research. Indeed, mechanism exists replicate time gaps accelerometer brands, likely challenge accurate assessment sleep sedentary behaviour. data collected ‘idle sleep mode’ similar functionalities referred raw data accelerometry, data collection process involved proprietary pre-processing steps violate core principle raw data collection.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"specific-note-on-actigraph-idle-sleep-mode","dir":"Articles","previous_headings":"Time gaps identification and imputation","what":"Specific note on ActiGraph idle sleep mode","title":"3. Data Quality Assurance","text":"ActiGraph files might exported gt3x csv formats. idle sleep mode used, data files different. gt3x files, time gaps can found signal, imputation made ActiLife software. However, csv files exported ActiLife imputed values three axes periods movement. Note imputation ActiLife software changed point time. Initially imputation zeros recent versions ActiLife imputation uses last recorded value axis. Therefore, need aware GGIR take care time gap imputation relative idle sleep mode using gt3x files, using ActiGraph csv files (latter come time gaps already imputed).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"accelerometer-sensor-calibration","dir":"Articles","previous_headings":"","what":"Accelerometer sensor calibration","title":"3. Data Quality Assurance","text":"Many measurement tools require calibration ranging weighting scales Oxygen sensor accelerometers. Without good calibration risk error causes lack calibration undermines accurate reliable measurement. Confusingly accelerometers, field long time assumed accelerometer need calibrated relative energy expenditure. incorrect energy expenditure entirely different construct. true reference accelerometer sensors acceleration can calibrate gravitational acceleration reference. acceleration sensor works based principle acceleration captured mechanically converted electrical signal. relationship electrical signal acceleration usually assumed linear, involving offset gain factor. familiar terms, compare simple regression equation offset Beta0 (Y-intercept) gain Beta1 (slope). Therefore, offset number add signal adjust systematic error (bias) gain number multiply signal scale , order adjust relative error. shall refer establishment offset gain factor sensor calibration procedure. three types calibration: Factory calibration, done industry (always done, may need refinement afterward). Manual calibration, done researcher (advisable cases even possible. Auto-calibration, done algorithms real life study data (common scenario refine factory calibration). Accelerometers usually calibrated part manufacturing process non-movement conditions using local gravitational acceleration reference, referred factory calibration. manufacturer calibration can later evaluated holding sensor axis parallel () perpendicular direction gravity; readings axis ±1.000 0.000 g, respectively. one derive correction coefficients per axis. However, procedure can cumbersome studies high throughput. Furthermore, calibration check possible data collected past corresponding accelerometer device exist anymore. reason calibraton advisable cases possible. Finally, auto-calibration type calibration done algorithm using already collected real world data withoutb need additional experiments, explain detail.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"auto-calibration-algorithm","dir":"Articles","previous_headings":"Accelerometer sensor calibration","what":"Auto-calibration algorithm","title":"3. Data Quality Assurance","text":"general principle techniques recording acceleration screened non-movement periods. Next, rolling average non-movement periods taken three orthogonal sensor axes used generate three-dimensional ellipsoid representation ideally sphere radius 1 g. , deviations radius three-dimensional ellipsoid 1 g (ideal calibration) can used derive correction factors sensor axis-specific calibration error. auto-calibration performed GGIR uses technique detailed description demonstration can found published paper. success auto-calibration depends number non-movement periods variation accelerometer orientation periods available algorithm. result, auto-calibration expected perform less short recordings (e.g., less day) recordings participant wear accelerometer time. cases, can use recordings sensor -movement periods higher variation orientations derive calibration coefficients, apply coefficients recording interest. , use parameter backup.cal.coef. auto-calibration algorithm applied default can turned parameter .cal = FALSE. recommend turning auto-calibration unless strong reasons .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"non-wear-detection","dir":"Articles","previous_headings":"","what":"Non-wear detection","title":"3. Data Quality Assurance","text":"can happen study participant wear accelerometer. can happen variety reasons: getting tired wearing accelerometer, forgetting put accelerometer back short moment wearing , getting instructed researcher take . However, accelerometer worn, still collect data. accelerometer lying still, data collected looks like participant supposed wear moving. left undetected, wearing accelerometer bias estimates time spent inactive behaviours. Accelerometer non-wear time detected GGIR looking standard deviation range raw acceleration signals. time window statistical values calculated long enough, turn reliable indicators whether accelerometer worn . specifically, standard deviation value range (.e., maximum value minus minimum value) calculated per 60 minute windows start every 15 minutes (e.g. 14:00, 14:15, etc.) . overlapping nature time windows needed improve precision. time window labelled non-wear, least statistical values 2 3 axes meet brand specific thresholds. result, since multiple overlapping time windows classify 15 minutes, 15 minute window classified multiple times. non-wear criteria met windows overlap 15-minute window, labelled non-wear. brands 13.0 mg less 50 mg. size time window (60 minutes) size time intervals 15 minutes defined parameter windowsizes, three values. specifically, first value used non-wear detection discussed next chapter, second value defines mentioned intervals 15 minutes , third value mentioned 60 minutes time window. non-wear classification, discussed , default 2023. Prior , GGIR slightly different non-wear detection algorithm still available via parameter nonwear_approach recommend use .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"identifying-implausible-wear-time","dir":"Articles","previous_headings":"Non-wear detection","what":"Identifying implausible wear time","title":"3. Data Quality Assurance","text":"can happen time classified wear time implausible example accelerometer post moved around researcher ahead actually intended wear period. example, accelerometer post long periods non-wear briefly interrupted periods movement, interpreted algorithm monitor wear. Therefore, GGIR part 2, detected non-wear GGIR part 1 checked implausible wear periods relabelled non-wear. sure mean part 1 2 see chapter 1, gives overview. GGIR part 2 performs check follows: First , detected wear-periods last less six hours, duration less 30% combined duration bordering non-wear periods, relabelled non-wear. Second, remaining wear-periods less three hours, form less 80% bordering non-wear periods, classified non-wear. motivation selecting relatively high criterion (< 30%) combination long period (6 hrs) low criterion (< 80%) combination short period (3 hrs) long periods likely actually related monitor wear time. illustrate algorithm created visual model, see picture . , units time presented squares marked grey detected non-wear time. Period C detected wear-time borders non-wear periods B D. length C less six hours C divided sum B D less 0.3 first criteria met block C turned non-wear period. Visual inspection >100 traces large observational study revealed applying stage three times iteratively allowed improved classification periods characterised intermittent periods non-wear apparent wear.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"implausible-wear-at-the-beginning-and-end-of-the-recording","dir":"Articles","previous_headings":"Non-wear detection","what":"Implausible wear at the beginning and end of the recording","title":"3. Data Quality Assurance","text":"Based experience, participants take accelerometer final 24 hours recording actual end. However, may hard detect accelerometer may still moved. Therefore, GGIR relabels wear-periods final 24 hrs recording shorter three hours preceded least one hour non-wear time non-wear. Finally, recording starts ends period less three hours wear followed preceded non-wear (length), period wear classified non-wear. additional criteria screening beginning end accelerometer file intended filter movements related attaching accelerometer start downloading data accelerometer end. final check can turned parameter nonWearEdgeCorrection, may relevant processing accelerometer data collected single-night polysomnography studies.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"clipping-detection","dir":"Articles","previous_headings":"","what":"Clipping detection","title":"3. Data Quality Assurance","text":"GGIR part 1 also screens acceleration signal “clipping”, .e., sustained unusual high (raw) acceleration values non compatible human movement. 30% data points 15-minute window (used non-wear) close maximal values (technical term dynamic range) sensor, corresponding time period considered potentially unreliable, may explained sensor getting stuck extreme value accelerometers used inappropriately (attached heavily accelerating object). example, dynamic range 8g, accelerations 7.5g marked “clipping”. window also classified clipping value window larger 150% dynamic range sensor. Given clipping rarely happens reported GGIR part non-wear time. clipping non-wear treated merging arrive single indicator amount invalid data. However, keep track occurrence clipping time, GGIR report fraction 15-minute windows recording clipping occurs, see section output .","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"time-gap-imputation","dir":"Articles","previous_headings":"Key parameters","what":"Time gap imputation","title":"3. Data Quality Assurance","text":"imputeTimegaps","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"auto-calibration","dir":"Articles","previous_headings":"Key parameters","what":"Auto-calibration","title":"3. Data Quality Assurance","text":".cal backup.cal.coef","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"non-wear-detection-1","dir":"Articles","previous_headings":"Key parameters","what":"Non-wear detection","title":"3. Data Quality Assurance","text":"windowsizes nonwear_approach nonWearEdgeCorrection","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"clipping-detection-1","dir":"Articles","previous_headings":"Key parameters","what":"Clipping detection","title":"3. Data Quality Assurance","text":"windowsizes dynrange","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter3_QualityAssessment.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"3. Data Quality Assurance","text":"van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Autocalibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Oct 1;117(7):738-44. PMID: 25103964 link van Hees VT, Gorzelniak L, Dean León EC, Eder M, Pias M, Taherian S, Ekelund U, Renström F, Franks PW, Horsch , Brage S. Separating movement gravity components acceleration signal implications assessment human daily physical activity. PLoS One. 2013 Apr 23","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"why-do-we-need-to-extract-metrics","dir":"Articles","previous_headings":"","what":"Why do we need to extract metrics","title":"4. From Raw Data to Acceleration Metrics","text":"Wearable accelerometers widely used health research study physical activity, sleep, behaviours. modern accelerometers can collect store least 30 values per second expressed units gravitational acceleration (g). data collected, important extract kinematically meaningful information . data processing, summary measures describe signal referred metrics signal features. knowledge accelerometer works typical approach metric calculation calculate possible statistical properties acceleration signal like mean, standard deviation, entropy, skewness. However, discussed chapter 1, favour approach try use knowledge sensor. knowledge sensor tells us acceleration signal comes three components need separated: acceleration related gravitational acceleration. absence movement three acceleration signals inform us orientation accelerometer relative gravity proxy posture. Accelerations decelerations related movement, can interpret proxy muscle contractions energy expenditure needed contractions . Measurement error bias. example, signal noise caused electronical components introducing minor variation acceleration signal even real acceleration constant. variation due noise typically small compared variation due movement. Another example calibration errors discussed chapter 3. Finding metric able separate three components provide informative value relation orientation magnitude acceleration proxies mentioned posture muscle contractions, respectively.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"metric-aggregation-per-epoch","dir":"Articles","previous_headings":"","what":"Metric aggregation per epoch","title":"4. From Raw Data to Acceleration Metrics","text":"metrics first calculated resolution raw data, reflects tiny fraction second. exact number data points per second also known sampling rate can vary studies. different sampling rate values directly comparable. However, aggregating metric values per larger time window, known epoch, can make values comparable. , GGIR aggregates values per epoch (e.g. 5 seconds). Aside harmonising data across studies, aggregation per epoch also advantages: Evidence value accelerometer data based epoch-level aggregates, reference values like Oxygen consumption sleep reliably derived sub-second resolution. Aggregating leads less data points makes lot practical work . GGIR, epoch length kept constant across GGIR parts allow consistent interpretation. epoch length set first value parameter windowsizes (default 5 seconds) used throughout steps GGIR, following exceptions: GGIR part 2, time spent MVPA variables (discussed chapter 11) done multiple epoch lengths, one output variable. However, per output variable epoch length held constant throughout recording, GGIR never mixes epoch lengths epoch length affects interpretation value. like reading overview article car speeds alternates unit speed every sentence (.e., miles per hour, meters per second, km per hour, etc). GGIR part 5, user option aggregate epochs 1 minute length parameter part5_agg2_60seconds. example, using 5 second epochs parts 1, 2, 3 4, can informative run part 5 1 minute epoch length.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"acceleration-metrics-available-in-ggir","dir":"Articles","previous_headings":"","what":"Acceleration metrics available in GGIR","title":"4. From Raw Data to Acceleration Metrics","text":"find list metrics GGIR can apply. Multiple metrics can derived GGIR run. acceleration metrics derived GGIR function g.applymetrics. Neishabouri counts GGIR relies R package actifelifecounts. Please see code respective package documentation information exact calculations. use metrics, add parameters GGIR call, e.g.:","code":"GGIR(do.enmo = TRUE, do.mad = TRUE, do.bfen = TRUE, …)"},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"approach-to-removing-the-gravitational-signal-component","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR","what":"Approach to removing the gravitational signal component","title":"4. From Raw Data to Acceleration Metrics","text":"table metrics overview indicates approach used separate gravitation component acceleration signal. two approaches design metrics: Magnitude, metric makes assumption magnitude gravitational acceleration component. Frequency, metric makes assumption frequency content gravitational acceleration component. assumptions known always true conditions, acceleration metric perfect.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"handling-high-frequency-components-in-the-signal","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR","what":"Handling high frequency components in the signal","title":"4. From Raw Data to Acceleration Metrics","text":"argue high frequency components signal treated noise removed. However, likely represent harmonics low frequency movements thus part description movement. elaborate reflection , please see blog post. metrics, listed , letters LF BF name attempt suppress high frequency content signal. , GGIR user can decide whether prefer filter higher frequencies .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"why-ggir-uses-enmo-as-a-default-","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR","what":"Why GGIR uses ENMO as a default.","title":"4. From Raw Data to Acceleration Metrics","text":"one metric can default. Acceleration metric ENMO (Euclidean Norm Minus One negative values rounded zero) default metric since GGIR created. 2013, investigated different ways summarising raw acceleration data (van Hees et al. PLoS ONE 2013). short, different metrics exist little literature support superiority metric time. long different studies use different metrics, findings comparable. Therefore, choice metric ENMO merely pragmatic. GGIR uses ENMO default : 1. ENMO demonstrated value describing variance daily energy expenditure, correlated questionnaire data, able describe patterns physical activity. 2. ENMO easy describe mathematically , therefore, improves reproducibility across studies software tools. 3. ENMO attempts quantify acceleration universal units collapse signal abstract scale. 4. 2013 paper showed ENMO used combination auto-calibration, similar validity filter-based metrics like HFEN BFEN, conceptually similar metrics proposed later MIMSunit, MAD, AI0. 5. Studies criticised ENMO consistently failed apply auto-calibration, attempted apply auto-calibration lab setting, ignoring fact auto-calibration designed short lab settings. needs free-living data work properly. , studies often clear problematic zero imputation idle sleep mode ActiGraph devices dealt .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"notes-on-implementation-of-zero-crossing-counts","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR","what":"Notes on implementation of zero crossing counts","title":"4. From Raw Data to Acceleration Metrics","text":"implementation zero-crossing count GGIR attempt imitate zero-crossed counts previously described Sadeh, Cole, Kripke colleagues late 1980s 1990s. However, guaranteed exact copy original approach, used AMA-32 Motionlogger Actigraph Ambulatory-monitoring Inc. (“AMI”). complete publicly accessible description approach exists.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"missing-information","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR > Notes on implementation of zero crossing counts","what":"Missing information","title":"4. From Raw Data to Acceleration Metrics","text":"missing information calculation : Sadeh specified calculations done based data Y-axis direction Y-axis clarified. Therefore, unclear whether Y-axis time corresponded Y-axis modern sensors. frequency filter used, properties filter missing. Sensitivity sensor: now guessing Motionlogger sensitivity 0.01 g without direct proof. Relationship piezo-electric acceleration signal used time modern piezo-capacitive acceleration signals. personal correspondence AMI, learnt technique kept proprietary never shared sold actigraphy manufacturers (time correspondence October 2021). Based correspondence AMI, can conclude even Actiwatch, ActiGraph, manufacturers, facilitated use 1990s sleep classification algorithms, guarantee exact replication original studies.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"our-guess-on-the-missing-information","dir":"Articles","previous_headings":"Acceleration metrics available in GGIR > Notes on implementation of zero crossing counts","what":"Our guess on the missing information","title":"4. From Raw Data to Acceleration Metrics","text":"Following challenges, implementation zero-crossing count GGIR based educated guess used information find literature product documentation. relation missing information listed : allow specify axis want use parameter Sadeh_axis choose default second axis. use 0.25 - 3 Hertz band-pass filter order 2, can modify parameters zc.lb, zc.hb, zc.order. use 0.01 g stop band, can change parameter zc.sb. assume band-passed signal comparable absence evidence contrary. evaluation, zero-crossing count value range looks plausible compared value range original publications. note ActiGraph users: decide compare GGIR Cole-Kripke estimates ActiLife’s Cole Kripke estimates, aware ActiLife may adopted different Cole-Kripke algorithm original publication presented four algorithms. potential source variation. , ActiLife may used different educated guesses Motionlogger counts calculated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"embedding-your-own-metrics","dir":"Articles","previous_headings":"","what":"Embedding your own metrics","title":"4. From Raw Data to Acceleration Metrics","text":"GGIR users may like use metrics covered GGIR. facilitate , allow external function embedding discussed vignette Embedding external functions GGIR. fact, allows include entire algorithms step detection new sleep classification algorithm like test inside GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"related-output","dir":"Articles","previous_headings":"","what":"Related output","title":"4. From Raw Data to Acceleration Metrics","text":"GGIR part 2, output derived acceleration metric derived GGIR part 1 except metrics anglex, angley, anglez. GGIR part 4, output derived metrics used sleep detection, typically angle count (Neishabouri counts zero-crossing count). GGIR part 5, output derived single metric specified parameter acc.metric. reason constraint part 5 produces many variables creating multiple metrics computationally expensive substantially increase complexity underlying code.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter4_AccMetrics.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"4. From Raw Data to Acceleration Metrics","text":"compiled list related articles may find useful: Van Hees et al. 2011 Estimation Daily Energy Expenditure Pregnant Non-Pregnant Women Using Wrist-Worn Tri-Axial Accelerometer. van Hees et al. 2013 Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. Migueles et al. 2019 Comparability accelerometer signal aggregation metrics across placements dominant wrist cut points assessment physical activity adults. Aittasalo et al. 2015 Mean amplitude deviation calculated raw acceleration data: novel method classifying intensity adolescents’ physical activity irrespective accelerometer brand. Neishabouri et al. 2022 Quantification acceleration activity counts ActiGraph. Karas et al. 2022 Comparison accelerometry-based measures physical activity: retrospective observational data analysis study. van Hees 2019 Ten Misunderstandings surrounding Information Extraction Wearable Accelerometer data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter5_StudyProtocol.html","id":"selectingmasking-the-data","dir":"Articles","previous_headings":"","what":"Selecting/Masking the data","title":"5. Accounting for Study Protocol","text":"important GGIR masks data outside time window participant instructed wear accelerometer. Study protocols differ duration expected wear period, GGIR offers variety ways account study protocol. main parameter data_masking_strategy. requires numeric value indicating one following strategies: data_masking_strategy = 1 indicate specific number hours masked start /end recording, specified parameters hrs.del.start hrs.del.end, respectively. data_masking_strategy = 2 indicate data first last midnight recording considered. data_masking_strategy = 3 indicate active X 24-h blocks starting time day used, X specified parameter ndayswindow. Note can combined aforementioned parameters hrs.del.start hrs.del.end, trim window start end recording. data_masking_strategy = 4 indicate data first midnight considered. data_masking_strategy = 5 similar data_masking_strategy = 3, yet selects X complete calendar days, X specified parameter ndayswindow. Additionally, can set maximum duration accelerometer worn recording starts. Use parameter maxdur specify duration number 24 hour blocks parameter max_calendar_daysfor number calendar days.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter5_StudyProtocol.html","id":"key-parameters","dir":"Articles","previous_headings":"","what":"Key parameters","title":"5. Accounting for Study Protocol","text":"data_masking_strategy hrs.del.start hrs.del.end ndayswindow maxdur max_calendar_days","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter6_DataImputation.html","id":"imputation-of-invalid-epoch-data","dir":"Articles","previous_headings":"","what":"Imputation of invalid epoch data","title":"6. How GGIR Deals with Invalid Data","text":"time segments classified non-wear clipping (see Chapter 3) masked study protocol (see Chapter 5) treated invalid data. GGIR part 2, epoch level metric values imputed, log kept epochs imputed. subsequent analysis done GGIR, imputed time series used. time series without invalid segments used analyses: Weighted average full recording Cosinor analysis (see Chapter 10) specific non-default configuration sleep analysis (see Chapter 8) imputation epoch data done based mean metric value corresponding valid values time day days recording. However, time interval marked invalid across recorded days, value imputed zero, except metric EN imputed 1. example, imagine 5-day recording following ENMO metric data two specific epochs day across five days: imputed shown average 3, 4, 3 3 3.25:","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter6_DataImputation.html","id":"controlling-the-imputation","dir":"Articles","previous_headings":"","what":"Controlling the imputation","title":"6. How GGIR Deals with Invalid Data","text":"worth noting option disable imputation setting parameter .imp = FALSE. means values kept imputed omitted. Disabling imputation recommended use-cases, can relevant studies controlled sleep exercise laboratories sensor known worn throughout experiment. alternative way control imputation specify time segments invalid epochs imputed zeros (ones metric EN) instead following standard GGIR imputation method. , use parameter TimeSegments2ZeroFile.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter6_DataImputation.html","id":"key-parameters","dir":"Articles","previous_headings":"","what":"Key parameters","title":"6. How GGIR Deals with Invalid Data","text":".imp, TimeSegments2ZeroFile","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter6_DataImputation.html","id":"related-output","dir":"Articles","previous_headings":"","what":"Related output","title":"6. How GGIR Deals with Invalid Data","text":"GGIR part 2, plots check data quality highlight segments file considered invalid imputed. plots can found folder “results/QC/”. GGIR part 5, time series produced optionally stored within folder “meta/ms5out.raw/” either csv RData format. time series contain indicator epochs considered invalid imputed.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"data-quality-indicators","dir":"Articles","previous_headings":"","what":"Data quality indicators","title":"7. Describing the Data Without Knowing Sleep","text":"GGIR part 2 summarises data quality checks done previous four chapters, ranging report successfulness auto-calibration procedure number valid days. way, GGIR part 2 ideal place start data quality assurance.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"basic-descriptives","dir":"Articles","previous_headings":"","what":"Basic descriptives","title":"7. Describing the Data Without Knowing Sleep","text":"Descriptive variables calculated reported valid days , criteria valid day defined parameter includedaycrit.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"average-acceleration","dir":"Articles","previous_headings":"Basic descriptives","what":"Average acceleration","title":"7. Describing the Data Without Knowing Sleep","text":"Average acceleration known correlated activity-related energy expenditure. GGIR part 2 provide two types average acceleration: Average per day, stored day considered valid. Note descriptive descriptives also stored GGIR averages across days, weekend days, weekdays, discuss detail later . Weighted average valid data points recording, weighted timing day valid epochs, regardless whether come days whole classified valid .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"acceleration-distribution","dir":"Articles","previous_headings":"Basic descriptives","what":"Acceleration distribution","title":"7. Describing the Data Without Knowing Sleep","text":"get detailed description data, looking distribution acceleration values can informative. GGIR facilitates two ways: specifying quantiles distribution parameter qlevels, fed build-R function quantile, GGIR gives us metric values corresponding quantiles (quantile multiplied 100 percentile). describing time spent acceleration ranges, defined parameter ilevels . distribution acceleration values often referred intensity distribution physical activity literature.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"sets-of-quantiles-mx-metrics-by-rowlands-et-al-","dir":"Articles","previous_headings":"Derived descriptives","what":"Sets of quantiles (MX metrics by Rowlands et al.)","title":"7. Describing the Data Without Knowing Sleep","text":"quantiles, discussed , can used describe accelerations participants exceed active “X” accumulated minutes day. specific approach, proposed Rowlands et al., quantiles referred MX metrics. MX metrics confused active continuous X hours, e.g. M10, used circadian rhythm research also can derived GGIR (see parameter winhr). use MX metrics proposed Rowlands et al., specify durations 24h day want identify accelerations values. example, generate minimum acceleration value active accumulated 30 minutes, can call qlevels = (1410/1440). parameter also accepts nested terms generate multiple MX metrics. example, call M60, M30, M10, can specify following: qlevels = c(c(1380/1440), c(1410/1440), c(1430/1440)). Note: time segments shorter 24 hours specified parameter qwindow, 8-hour school day (described Fairclough et al 2020), denominator qlevels change 1440 (24h) specific segment length. example, use 480 (8h). Accordingly, argument call M60, M30, M10 : qlevels = c(c(1380/1440), c(1410/1440), c(1430/1440)). moment, works one segment length GGIR facilitate generation MX metrics multiple unequal time segments within GGIR function call. output part 2 summary files refer percentile day. Thus, 24-h day, M30 appear “p97.91666_ENMO_mg_0.24hr”. create radar plots MX metrics first described Rowlands et al., GitHub repository provides R code detailed instructions make radar plots using data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"intensity-gradient","dir":"Articles","previous_headings":"Derived descriptives","what":"Intensity gradient","title":"7. Describing the Data Without Knowing Sleep","text":"plot time spent equally spaced acceleration ranges, end asymptotic-shaped curve, indicating little time spent high intensities (acceleration levels) much time spent low intensities. shape distribution may informative hard quantify single number standard form. Therefore, new concept called intensity gradient proposed Rowlands colleagues. intensity gradient defines slope log-transformed axes intensity distribution. specifically, calculate time accumulated incremental acceleration bins (bin size = 25 mg) also keep track mid-point intensity bin, e.g. 62.5 mg bin ranging 50 75 mg. mid-point acceleration bin expressed mg time spent bin expressed minutes log-transformed. log-transformation expected change asymptotic-shaped curve straight line. Subsequently, linear regression fitted data points. slope regression line represents intensity gradient. , calculate correlation coefficient data points help verify degree form straight line (R^2). intensity gradient calculated default. include metric part 2 output, set iglevels = TRUE. , want methodological research , can use parameter define alternative acceleration bins, e.g. using bins 20 instead 25 mg iglevels = c(seq(0, 4000, = 20), 8000).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"key-arguments","dir":"Articles","previous_headings":"","what":"Key arguments","title":"7. Describing the Data Without Knowing Sleep","text":"includedaycrit ilevels qlevels iglevels qwindow .report","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"related-output","dir":"Articles","previous_headings":"","what":"Related output","title":"7. Describing the Data Without Knowing Sleep","text":"GGIR part 2 generates three csv reports: part2_daysummary.csv, part2_summary.csv, data_quality_report.csv. data_quality_report.csv discussed chapter 3, focus first two reports chapter. variables part2_summary.csv recording level aggregates variables part2_daysummary.csv. , variable names starting “AD_” refer average across days, “WD” refers average across weekdays, “” refers average across weekend days, “WWE” refers weighted weekend days ensure weekend days contribute equally, “WWD” refers weighted weekdays ensure weekdays contribute equally. , GGIR part 2 generates report named part2_daysummary_longformat.csv, generated GGIR used day segment analysis, see documentation parameter qwindow. report contains exact information part2_daysummary.csv, long format instead wide format. part2_daysummary_longformat.csv, row represents one segment one day one recording, part2_daysummary.csv, row contains one day one recording segments day organised different columns.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter7_DescribingDataWithoutKnowingSleep.html","id":"descriptive-variables","dir":"Articles","previous_headings":"Related output","what":"Descriptive variables","title":"7. Describing the Data Without Knowing Sleep","text":"clarify b refers part2_summary.csv part2_daysummary.csv, r refers part2_summary.csv .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"sib-vanhees2015","dir":"Articles","previous_headings":"","what":"SIB: vanHees2015","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"algorithm looks periods time z-angle change 5 degrees least 5 minutes. algorithm proposed 2015 article. idea behind algorithm interpretable heuristic compared conventional approaches use magnitude acceleration distinguish sustained inactivity bouts. reason assume vanHees2015 better worse reflection sleep, advancement purely intended terms interpretability. vanHees2015 algorithm default. values 5 5 algorithm can modified parameters anglethreshold timethreshold, currently see basis recommend advise sticking default values.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"sib-notworn-experimental","dir":"Articles","previous_headings":"","what":"SIB: NotWorn (EXPERIMENTAL)","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"Disclaimer: status SIB algorithm experimental described evaluated peer-reviewed publication yet. means revisions algorithm can expected algorithm matures. algorithms named “NotWorn” sib guider (next chapter) designed studies instruction wear accelerometer night. obvious facilitate meaningful sleep analysis. Nonetheless need crude estimate night time versus day time order GGIR part 5 characterise day time behaviours. case dataset use guider setting HASPT.algo = \"NotWorn\" discussed next chapter. , recommend combining using “NotWorn” : .imp = FALSE, HASPT.ignore.invalid = NA, ignorenonwear = FALSE. detection sib periods based acceleration metric defined parameter acc.metric.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"combined-with-count-acceleration-metrics","dir":"Articles","previous_headings":"SIB: NotWorn (EXPERIMENTAL)","what":"Combined with count acceleration metrics","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"using count accelereration metric set HASIB.algo = \"NotWorn\". part 4 sib set equal detected guider window. , effectively guider sib algorithm identical case.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"combined-with-gravitational-unit-acceleration-metrics","dir":"Articles","previous_headings":"SIB: NotWorn (EXPERIMENTAL)","what":"Combined with gravitational unit acceleration metrics","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"using acceleration metrics expresses acceleration gravitational units set HASIB.algo accelerometer expected worn specify second guider parameter HASPT.algo discussed int next chapter, e.g. HASPT.algo = c(\"NotWorn\", \"HDCZA)\". way GGIR first search long non-wear periods indicator sleep use define sleep window found fall back sib-algortihm specified HASIB.algo, e.g. \"vanHees2015\".","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"sib-count-based-algorithms-experimental","dir":"Articles","previous_headings":"","what":"SIB: Count based algorithms (EXPERIMENTAL)","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"Disclaimer: status SIB algorithm experimental described evaluated peer-reviewed publication yet. means revisions algorithm can expected algorithm matures. Accelerometers used sleep research since 1990s. However, initial accelerometers store data gravitational units sub-second level use nowadays stored data 30 60 second epoch aggregates. Although aggregates referred counts many manufacturers calculation counts differs manufacturer. attempted facilitate several sleep detection algorithms literature period “Sadeh1994”, “ColeKripke1992”, “Galland2012”. problem algorithms preprocessing done generate counts insufficiently described literature. zero-crossing count used Sadeh1994 ColeKripke1992 attempt made collect much information found made educated guess missing information. zero-crossing counts discussed chapter 4 acceleration metrics. counts calculated can use following SIB algorithms. uncertain whether Y-axis direction modern accelerometers matches direction Y-axis literature old studies direction Y-axis knowledge never clarified.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"sadeh1994","dir":"Articles","previous_headings":"SIB: Count based algorithms (EXPERIMENTAL)","what":"Sadeh1994","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"algorithm proposed Sadeh et al. link. use set parameter HASIB.algo = \"Sadeh1994\" argument Sadeh_axis = \"Y\" indicate algorithm use Y-axis sensor.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"galland2012","dir":"Articles","previous_headings":"SIB: Count based algorithms (EXPERIMENTAL)","what":"Galland2012","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"algorithm proposed Galland et al. link. use implementation Galland2012 algorithm specify parameter HASIB.algo = \"Galland2012\". , set Sadeh_axis = \"Y\" specify algorithm use Y-axis.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"colekripke1992","dir":"Articles","previous_headings":"SIB: Count based algorithms (EXPERIMENTAL)","what":"ColeKripke1992","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"algorithm proposed Cole et al. link, specifically GGIR uses algortihm proposed paper 10-second non-overlapping epochs counts expressed average per minute. skip re-scoring steps paper showed marginal added value added complexity. use GGIR implementation algortihm, specify parameters HASIB.algo = \"ColeKripke1992\" Sadeh_axis = \"Y\" indicate algorithm use Y-axis sensor.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter8_SleepFundamentalsSibs.html","id":"dealing-with-expected-or-detected-nonwear-time-segments","dir":"Articles","previous_headings":"","what":"Dealing with expected or detected nonwear time segments","title":"8. Sleep Fundamentals: Sustained Inactivity Bout Detection (SIB)","text":"Depending study protocol may want interpret invalid data (typically non-wear) differently. set parameter ignorenonwear=TRUE (default) ignore non-wear period SIB detection. useful prevent nonwear episodes going bed waking contributing sleep.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"time-window-used-for-sleep-analyses","dir":"Articles","previous_headings":"","what":"Time window used for sleep analyses","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"default sleep analysis considers window noon-noon, ideal shift workers may go bed early day wake noon. address , GGIR changes window analysis seems case: sleep log indicates person woke noon, sleep analysis part 4 done window 6pm-6pm. Similarly, guider indicates person woke 11 , sleep analysis part 3 4 done window 6pm-6pm. way method sensitive individuals main sleep period starting noon ending noon, referred daysleepers output. example case shift workers. Note guider L5+/-12 (discussed ) able , consider noon-noon time window.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-sleeplog","dir":"Articles","previous_headings":"Guiders","what":"Guider: Sleeplog","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"sleep log (diary) already used studies. way GGIR uses sleeplog first described 2015 article. Two sleeplog file structures supported: -called basic advanced sleeplog. use guider set location sleeplog value parameter loglocation. General notes GGIR uses sleeplogs guider: GGIR expects start end sleep window specified. one missing sleeplog data assumed missing entire night. GGIR impute sleeplog data. feel imputation desirable running GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"basic-sleep-log","dir":"Articles","previous_headings":"Guiders > Guider: Sleeplog","what":"Basic sleep log","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Example basic sleeplog: One column participant id, first column. Specify column argument colid. Alternatingly one column onset time one column waking time. Specify column column first night argument coln1, example coln1=2. Timestamps stored without date hh:mm:ss hour values ranging 0 23 (24). onset corresponds lights intention fall asleep, specify sleepwindowType = \"TimeInBed\". can multiple sleeplogs spreadsheet. row representing single recording. First row: first row spreadsheet needs filled column names. basic sleep log format matter column names . first night basic sleeplog assumed correspond first recorded night accelerometer recording. know sleep log start later day make sure add columns labels without timestamps. Note recorded night mean data regardless whether data valid. , participant wear accelerometer first night still first night recording.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"advanced-sleep-log","dir":"Articles","previous_headings":"Guiders > Guider: Sleeplog","what":"Advanced sleep log","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Example advanced sleeplog two recordings: Relative basic sleeplog format advanced sleep log format comes following changes: Recording stored rows, information per days stored columns. Information per day preceded one columns holds calendar date. GGIR designed recognise handle date format assumes used date format consistently sleeplog. Per calendar date column wakeup time followed column onset -bed time. Note different basic sleep log, wakeup time follows column onset -bed time. , advanced sleep log calendar date oriented: asking participant woke fell asleep certain date. However, sleep onset time 2am, still fill 02:00:00, even though 02:00:00 next calendar date. can add columns relating self-reported napping time nonwear time. used sleep analysis g.part3 g.part4, used g.part5 facilitate napping analysis, see argument .sibreport paragraph naps. Multiple naps multiple nonwear periods can entered per day. Leave cells missing values blank. Column names critical advanced sleeplog format: Date columns recognised GGIR column name word “date” . advanced sleep log format recognised GGIR looking occurrence least two column names word “date” name. Wakeup times recognised words “wakeup” column name. Sleeponset, bed bed times recognised columns following character combinations name: “onset”, “inbed”, “tobed”, “lightsout”. Napping times recognised columns word “nap” name. Nonwear times recognised columns word “nonwear” name. GGIR guesses data format looping common date formats. date falls within 30 days start date accelerometer recording date format assumed found. starts attempting “Y-m-d” (2015-06-25).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-hdcza","dir":"Articles","previous_headings":"Guiders","what":"Guider: HDCZA","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"HDCZA algorithm designed studies wrist-worn accelerometer (raw) data sleep log available. algorithm first described 2018 article, modified slightly: Step 6 Figure 1 replaced single threshold (0.2 default). short, step 1-6 attempt classify time periods limited change posture. Next, step 7 extracts time blocks longer 30 minutes, step 8 includes intermittent time periods shorter 60 minutes, step 9 looks longest resulting block day, step 10 represents guider window. Note step 10 Figure 1 paper gives false impression step represents final classification SPT window. way guider used identify SPT window described chapter 10. time segment HDCZA derived default noon noon. However, ends 11am noon applied 6pm-6pm time segment. use guider set parameter HASPT.algo = \"HorAngle\".","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-l5-12-legacy-algorithm","dir":"Articles","previous_headings":"Guiders","what":"Guider: L5+/-12 (LEGACY ALGORITHM)","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Disclaimer: legacy algorithm used publications therefore kept inside GGIR. performance expected less available algorithm, recommend using . guider reflects twelve hour window centred around least active 5 hours day. crude approach likely inferior guiders, easy describe. first presented 2018 article. use guider set parameter def.noc.sleep = c().","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-setwindow-legacy-algorithm","dir":"Articles","previous_headings":"Guiders","what":"Guider: setwindow (LEGACY ALGORITHM)","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Disclaimer: legacy algorithm used publications therefore kept inside GGIR. performance expected less available algorithm, recommend using . guider uses set window day recording. Start end time specified argument def.noc.sleep. example, use guider window 10pm 8am set parameter def.noc.sleep = c(22, 8).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-horangle-experimental","dir":"Articles","previous_headings":"Guiders","what":"Guider: HorAngle (EXPERIMENTAL)","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Disclaimer: status guider experimental described evaluated peer-reviewed publication yet. means revisions algorithm can expected algorithm matures. guider designed hip-worn accelerometer (raw) data, looking longest period horizontal trunk. needs GGIR part 1 2 derived angle longitudinal axis. Setting parameter sensor.location=\"hip\" triggers identification longitudinal axis looking angle strongest 24-hour lagged correlation. can also force GGIR use specific axis longitudinal axis parameter longitudinal_axis. Next, algorithm identifies horizontal axis -45 45 degrees considers horizontal posture. Next, used identify largest time bed period, considering horizontal time segments least 30 minutes, looking longest horizontal period day gaps less 60 minutes ignored. Therefore, last 4 steps algorithm identical last four steps HDCZA algorithm. use guider set parameter HASPT.algo = \"HorAngle\"","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"guider-notworn-experimental","dir":"Articles","previous_headings":"Guiders","what":"Guider: NotWorn (EXPERIMENTAL)","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Disclaimer: status guider experimental described evaluated peer-reviewed publication yet. means revisions algorithm can expected algorithm matures. already referenced previous chapter NotWorn guider designed studies instruction wear accelerometer night. obvious facilitate meaningful sleep analysis. Nonetheless need crude estimate night time versus day time order GGIR part 5 characterise day time behaviours. First NotWorn algorithm calculates 5 minute rolling average acceleration metric values (.e., acceleration metric defined parameter acc.metric) applies threshold 5% standard deviation resulting signal. However, threshold less minimum value signal threshold set equal 10th percentile distribution. Next, used identify largest non-movement period, considering segments least 30 minutes, looking longest segment day gaps less 60 minutes ignored. Therefore, last 4 steps algorithm identical last four steps HDCZA HorAngle algorithms. algorithm expected work acceleration metric, count-type metrics metrics gravitational units. use guider set parameter HASPT.algo = \"NotWorn\". , recommend combining using “NotWorn” : .imp = FALSE ignorenonwear = FALSE. Internally HASPT.ignore.invalid always set NA “NotWorn” used. used also define resulting window SIB period ignore identified SIB window ensure entire window treated sleep. , SIB periods detected ignored. However, know experience participants occasionally wear accelerometer night even told . GGIR offers solution working count data accelerometer metrics gravitational units. case, possible specify second guider use accelerometer worn less 25% time detection window (noon-noon 6pm-6pm). happens check whether parameter HASPT.algo two guiders specified. use second one. example, HASPT.algo = c(\"NotWorn\", \"HDCZA\") HASPT.algo = c(\"NotWorn\", \"HorAngle\").","code":""},{"path":"https://wadpac.github.io/GGIR/articles/chapter9_SleepFundamentalsGuiders.html","id":"dealing-with-expected-or-detect-nonwear-time-segments","dir":"Articles","previous_headings":"","what":"Dealing with expected or detect nonwear time segments","title":"9. Sleep Fundamentals: Guiding sleep detection","text":"Depending study protocol may want interpret invalid data (typically non-wear) differently: want rely available time series invalid time segments imputed leave parameter HASPT.ignore.invalid = FALSE default. want guider ignore invalid segment despite efforts impute , see HASPT.ignore.invalid = TRUE. approach may helpful studies accelerometer often worn waking hour day. want guider consider invalid segments movement period set parameter HASPT.ignore.invalid = NA. approach may helpful studies accelerometer often worn night.","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"in--awd-format","dir":"Articles","previous_headings":"Handling externally derived data > Actiwatch data","what":"in .AWD format","title":"Cookbook","text":"","code":"GGIR(datadir = \"/media/actiwatch_awd\", # folder with epoch level .AWD file outputdir = \"/media/myoutput\", dataFormat = \"actiwatch_awd\", extEpochData_timeformat = \"\\%m/\\%d/\\%Y \\%H:\\%M:\\%S\", windowsizes = c(60, 900, 3600), # 60 is the expected epoch length HASIB.algo = \"Sadeh1994\", def.noc.sleep = c()) # <= because we cannot use HDCZA for ZCY"},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"in--csv-format","dir":"Articles","previous_headings":"Handling externally derived data > Actiwatch data","what":"in .CSV format","title":"Cookbook","text":"","code":"GGIR(datadir = \"/media/actiwatch_csv\", # folder with epoch level .AWD file outputdir = \"/media/myoutput\", dataFormat = \"actiwatch_csv\", extEpochData_timeformat = \"\\%m/\\%d/\\%Y \\%H:\\%M:\\%S\", windowsizes = c(15, 900, 3600), # 15 is the expected epoch length HASIB.algo = \"Sadeh1994\", def.noc.sleep = c()) # <= because we cannot use HDCZA for ZCY"},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"uk-biobank-data-in--csv-format","dir":"Articles","previous_headings":"Handling externally derived data","what":"UK Biobank data in .CSV format","title":"Cookbook","text":"","code":"GGIR(datadir = \"/media/ukbiobank\", outputdir = \"/media/myoutput\", dataFormat = \"ukbiobank_csv\", extEpochData_timeformat = \"\\%m/\\%d/\\%Y \\%H:\\%M:\\%S\", windowsizes = c(5, 900, 3600), # We know that data was stored in 5 second epoch desiredtz = \"Europe/London\") # We know that data was collected in the UK"},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"actigraph-count-data-in--csv-format","dir":"Articles","previous_headings":"Handling externally derived data","what":"ActiGraph count data in .CSV format","title":"Cookbook","text":"","code":"GGIR(datadir = \"/examplefiles\", outputdir = \"\", dataFormat = \"actigraph_csv\", windowsizes = c(5, 900, 3600), threshold.in = round(100 * (5/60), digits = 2), threshold.mod = round(2500 * (5/60), digits = 2), threshold.vig = round(10000 * (5/60), digits = 2), extEpochData_timeformat = \"\\%m/\\%d/\\%Y \\%H:\\%M:\\%S\", do.neishabouricounts = TRUE, acc.metric = \"NeishabouriCount_x\")"},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"senwear-data-in--xls-format","dir":"Articles","previous_headings":"Handling externally derived data","what":"Senwear data in .xls format","title":"Cookbook","text":"","code":"GGIR(datadir = \"C:/yoursenseweardatafolder\", outputdir = \"D:/youroutputfolder\", windowsizes = c(60, 900, 3600), threshold.in = 1.5, threshold.mod = 3, threshold.vig = 6, dataFormat = \"sensewear_xls\", extEpochData_timeformat = \"\\%d-\\%b-\\%Y \\%H:\\%M:\\%S\", HASPT.algo = \"NotWorn\")"},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/Cookbook.html","id":"not-worn-during-night","dir":"Articles","previous_headings":"Handling study protocol","what":"Not worn during night","title":"Cookbook","text":"Data type: Study protocol: Worn day, taken night Wear location: “NotWorn” specified second guider can supplied parameter shown . second guider used accelerometer worn 75 percent night. example shows HDCZA.","code":"GGIR(HASPT.algo = c(\"NotWorn\", \"HDCZA\"), HASIB.algo = \"vanHees2015\", do.imp = FALSE, # Do not impute nonwear because sensor was never worn 24/7 HASPT.ignore.invalid = NA, # Treat nonwear as potential part of guider window ignorenonwear = FALSE, # Consider nonwear as potential sleep includenightcrit = 8, includedaycrit = 8)"},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"considerations","dir":"Articles","previous_headings":"","what":"Considerations","title":"Published cut-points and how to use them in GGIR","text":"physical activity research field used called cut-points segment accelerometer time series based level intensity. vignette compiled list published cut-points instructions use GGIR. Please note GGIR refers cut-points thresholds, referring thing: value set values help split levels movement intensity. newer cut-points frequently published list may date. Please let us know aware published cut-points missed!","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-expressed-in-gravitational-units-this-vignette","dir":"Articles","previous_headings":"Considerations","what":"Cut-points expressed in gravitational units (this vignette)","title":"Published cut-points and how to use them in GGIR","text":"vignette focuses cut-points metrics attempt quantify average acceleration per epoch gravitational units. strength metrics values affected sampling rate epoch length improving comparability across studies.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-not-expressed-in-gravitational-units-not-in-this-vignette","dir":"Articles","previous_headings":"Considerations","what":"Cut-points NOT expressed in gravitational units (not in this vignette)","title":"Published cut-points and how to use them in GGIR","text":"However, GGIR also facilitates metrics whose values expressed gravitational units historically used. example, metric described Neishabouri (see GGIR argument .neishabouricounts) reflects indicator accumulated body movement time, referred counts, calculated ActiLife software ActiGraph accelerometer brand. Cut-points counts corresponding ActiGraph brand recurrently proposed literature, example, see systematic review stratification age group. Note cut-points ActiGraph counts proposed introduction multiday raw data collection likely hardware-based calculations may perfectly align ActiGraph software-based (Actilife) calculations counts Neishabouri described. result, older cut-points may need used caution. cut-points find literature ActiGraph counts applied Neishabouri counts directly epoch length specific. cut-points literature need corrected conversion factor. conversion factor calculated epoch length new study (e.g. 5 seconds) divided epoch length original study (e.g. 60 seconds). Note correction differences sampling rate needed Neishabouri counts already account via -sampling. want use cut-point “100 counts per minute” literature 5 second epoch data, GGIR function call look like :","code":"GGIR([...], mode = 1:5, windowsizes = c(5, 900, 3600), do.neishabouricounts = TRUE, acc.metric = \"NeishabouriCount_y\", threshold.in = 100 * (5/60), [...])"},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"relevant-arguments-to-use-cut-points-in-ggir","dir":"Articles","previous_headings":"","what":"Relevant arguments to use cut-points in GGIR","title":"Published cut-points and how to use them in GGIR","text":"argument mvpathreshold used part 2 quantify time accumulated user-specified threshold moderate--vigorous intensity expected occur. mvpathreshold applied metrics extracted part 1 arguments .metric (e.g., .enmo, .mad, .neishabouricounts). part 5, threshold.lig, threshold.mod, threshold.vig used indicate thresholds separate inactivity light, light moderate, moderate vigorous, respectively.thresholds applied metric defined acc.metric (default = “ENMO”). summary table parameters definition calculate acceleration metrics previously used calibration cut-points define used physical activity intensity classification cut-points.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-for-preschoolers","dir":"Articles","previous_headings":"Summary of published cut-points","what":"Cut-points for preschoolers","title":"Published cut-points and how to use them in GGIR","text":"*publications used acceleration metrics sum values per epoch rather average per epoch like GGIR . , use cut-point GGIR, provide scaled version cut-points presented paper : (CutPointFromPaper_in_gsecs/85.7) * 1000. Note sample frequency 87.5 reported publication incorrect based correspondence authors replaced 85.7.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-for-childrenadolescents","dir":"Articles","previous_headings":"Summary of published cut-points","what":"Cut-points for children/adolescents","title":"Published cut-points and how to use them in GGIR","text":"*publications used acceleration metrics sum values per epoch rather average per epoch like GGIR . , use cut-point GGIR, provide scaled version cut-points presented paper : (CutPointFromPaper_in_gmins/(sampleRateFromPaper * EpochLengthInSecondsPaper)) * 1000 ** publication used acceleration metrics expressed cut-points g units. , use cut-point GGIR, provide cut-point multiplied 1000.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-for-adults","dir":"Articles","previous_headings":"Summary of published cut-points","what":"Cut-points for adults","title":"Published cut-points and how to use them in GGIR","text":"*publications used acceleration metrics sum values per epoch rather average per epoch like GGIR . , use cut-point GGIR, provide scaled version cut-points presented paper : (CutPointFromPaper_in_gmins/(sampleRateFromPaper * EpochLengthInSecondsPaper)) * 1000 † publication, cut-point based data sampled 30 Hz 100 Hz. scaling cut-points specified (*), resulting thresholds virtually (ones presented table).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"cut-points-for-older-adults","dir":"Articles","previous_headings":"Summary of published cut-points","what":"Cut-points for older adults","title":"Published cut-points and how to use them in GGIR","text":"*Cut-points derived applying Youden index ROC curves. ** Cut-points derived increasing Sensitivity Specificity light vice versa moderate ROC curves (see paper details).† publications used acceleration metrics sum values per epoch rather average per epoch like GGIR . , use cut-point GGIR, provide scaled version cut-points presented paper : (CutPointFromPaper_in_gmins/(sampleRateFromPaper * EpochLengthInSecondsPaper)) * 1000 ‡ cut-points excluding data aided walking washing activities can found publication.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"notes-on-cut-point-validity","dir":"Articles","previous_headings":"","what":"Notes on cut-point validity","title":"Published cut-points and how to use them in GGIR","text":"Sensor calibration studies , excluding Hildebrand et al. 2016, effort made calibrate acceleration sensors relative gravitational acceleration prior cut-point development. Theoretically can expected cause bias cut-point estimates proportional calibration error device, especially cut-points based acceleration metrics rely assumption accurate calibration metrics: ENMO, EN, ENMOa, also metric SVMgs used studies Esliger 2011, Phillips 2013, Dibben 2020. Idle sleep mode ActiGraph discussed main package vignette, studies using ActiGraph sensor often forget clarify whether idle sleep mode used , accounted data processing. criticism towards cut-point methods? elaborate reflection limitations cut-points motivation cut-points still value GGIR see: https://www.accelting.com/updates/--ggir-facilitate-cut-points/","code":""},{"path":"https://wadpac.github.io/GGIR/articles/CutPoints.html","id":"references","dir":"Articles","previous_headings":"","what":"References","title":"Published cut-points and how to use them in GGIR","text":"Aittasalo 2015: https://bmcsportsscimedrehabil.biomedcentral.com/articles/10.1186/s13102-015-0010-0 Bammann 2021: https://doi.org/10.1371/journal.pone.0252615 Dibben 2020: https://bmcsportsscimedrehabil.biomedcentral.com/articles/10.1186/s13102-020-00196-7 Dillon 2016: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4858250/ Esliger 2011: https://journals.lww.com/acsm-msse/Fulltext/2011/06000/Validation_of_the_GENEA_Accelerometer.22.aspx Fraysse 2020: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7843957/ Hildebrand 2014: https://journals.lww.com/acsm-msse/Fulltext/2014/09000/Age_Group_Comparability_of_Raw_Accelerometer.17.aspx Hildebrand 2016: https://doi.org/10.1111/sms.12795 Migueles 2021: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8150960/ Phillips 2013: https://doi.org/10.1016/j.jsams.2012.05.013 Sanders 2018: https://doi.org/10.1080/02640414.2018.1555904 Schaefer 2014: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3960318/ Roscoe 2017: https://link.springer.com/article/10.1007/s00431-017-2948-2 Vähä-Ypyä 2015: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0134813","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Embedding external functions in GGIR","text":"like GGIR want use algorithms raw data included GGIR external function embedding feature can solution. example, may want pilot new machine learned classifiction algorithm want write data cleaning aggregation steps needed analysis real life ‘lab’ acceleormeter data. works: Internally GGIR loads raw accelerometer data memory blocks 24 hours. data memory, corrected calibration error, resampled sample rate required function, GGIR applies default algorithms well external function provided (Python R). external function expected take input: three-column matrix acceleration data corresponding three acceleration axes, optional parameters argument can R format (character, list, vector, data.frame, etc). output external function expected produce matrix data.frame one multiple columns corresponding output external function.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"example-with-external-r-function","dir":"Articles","previous_headings":"","what":"Example with external R function","title":"Embedding external functions in GGIR","text":"example apply function counts() R package activityCounts raw data, produces estimate Actigraph counts per second.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"write-external-function","dir":"Articles","previous_headings":"Example with external R function","what":"Write external function","title":"Embedding external functions in GGIR","text":"Create file calculateCounts.R insert following code:","code":"calculateCounts = function(data=c(), parameters=c()) { # data: 3 column matrix with acc data # parameters: the sample rate of data library(\"activityCounts\") if (ncol(data) == 4) data= data[,2:4] mycounts = counts(data=data, hertz=parameters, x_axis=1, y_axis=2, z_axis=3, start_time = Sys.time()) mycounts = mycounts[,2:4] #Note: do not provide timestamps to GGIR return(mycounts) }"},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"provide-external-function-to-ggir","dir":"Articles","previous_headings":"Example with external R function","what":"Provide external function to GGIR","title":"Embedding external functions in GGIR","text":"Create new .R file running GGIR analysis, e.g. named myscript.R, insert following code. forget update filepath first line point calculateCounts.R file. code creates object myfun type list expected come following elements: FUN character string specifying location external function want apply. parameters parameters used function, can stored format (vector, matrix, list, data.frame). user make sure external function can handle object. expected_sample_rate Expected sample rate, inputdata difference sample rate, data resampled. expected_unit Expected unit acceleration external function: “mg”, “g” “ms2”. input data different converted. colnames Character vector names columns produced external function. outputres resolution (seconds) output produced external function. Note, needs equal multitude short epoch size g.part1 output (5 seconds) short epoch size multitude resolution. way GGIR can aggregate repeat external function output used inside GGIR. minlength minimum length (seconds) input data needed, typically window per output provided. outputtype Character indicate type external function output. Set “numeric” data stored numbers (numeric format), “character” character string. aggfunction data needs aggregated match short epoch size g.part1 output (5 seconds) element specifies function used aggregation, e.g. mean, sum, median. timestamp Boolean indicated whether timestamps (seconds since 1-1-1970) passed external function first columm data matrix.. reporttype Character indicate type reporting GGIR: “scalar” averaged per day, “event” summed per day, “type” categorical variable can aggregated per day tabulating . Next, add call GGIR function GGIR myfun provided one arguments: Please see information function GGIR.","code":"source(\"~/calculateCounts.R\") myfun = list(FUN=calculateCounts, parameters= 30, expected_sample_rate= 30, expected_unit=\"g\", colnames = c(\"countsX\",\"countsY\",\"countsZ\"), outputres = 1, minlength = 1, outputtype=\"numeric\", aggfunction = sum, timestamp=F, reporttype=\"scalar\") library(GGIR) GGIR(datadir=\"~/myaccelerometerdata\", outputdir=\"~/myresults\", mode=1:2, epochvalues2csv = TRUE, do.report=2, myfun=myfun) #<= this is where object myfun is provided to GGIR"},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"example-with-external-python-function","dir":"Articles","previous_headings":"","what":"Example with external Python function","title":"Embedding external functions in GGIR","text":"example use external Python function estimate dominant signal frequency per acceleration axis. Note can also done R, shows even Python functions can provided.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"write-external-function-1","dir":"Articles","previous_headings":"Example with external Python function","what":"Write external function","title":"Embedding external functions in GGIR","text":"Create dominant_frequency.py insert code shown : Create dominant_frequency.R calls python function insert following code:","code":"import numpy def dominant_frequency(x, sf): # x: vector with data values # sf: sample frequency fourier = numpy.fft.fft(x) frequencies = numpy.fft.fftfreq(len(x), 1/sf) magnitudes = abs(fourier[numpy.where(frequencies > 0)]) peak_frequency = frequencies[numpy.argmax(magnitudes)] return peak_frequency dominant_frequency = function(data=c(), parameters=c()) { # data: 3 column matrix with acc data # parameters: the sample rate of data source_python(\"dominant_frequency.py\") sf=parameters N = nrow(data) ws = 5 # windowsize if (ncol(data) == 4) data= data[,2:4] data = data.frame(t= floor(seq(0,(N-1)/sf,by=1/sf)/ws), x=data[,1], y=data[,2], z=data[,3]) df = aggregate(data, by = list(data$t), FUN=function(x) {return(dominant_frequency(x,sf))}) df = df[,-c(1:2)] return(df) } }"},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"provide-external-function-to-ggir-1","dir":"Articles","previous_headings":"Example with external Python function","what":"Provide external function to GGIR","title":"Embedding external functions in GGIR","text":"Create new .R file running GGIR analysis, e.g. named myscript.R, insert following blocks code. Specification Python environment use, can also conda environment docker container (see documentation R package details). Make sure Python environment required dependencies external function, need numpy. Specify myfun object explained R example. forget update filepath \"~/dominant_frequency.R\" file. Add call function GGIR myfun provided argument. Note , .parallel set FALSE. Unfortunately Python embedding R package reticulate multi-threading R package foreach used GGIR combine well.","code":"library(\"reticulate\") use_virtualenv(\"~/myvenv\", required = TRUE) # Local Python environment py_install(\"numpy\", pip = TRUE) source(\"~/dominant_frequency.R\") myfun = list(FUN=dominant_frequency, parameters= 30, expected_sample_rate= 30, expected_unit=\"g\", colnames = c(\"domfreqX\", \"domfreqY\", \"domfreqZ\"), minlength = 5, outputres = 5, outputtype=\"numeric\", aggfunction = median timestamp=F, reporttype=\"scalar\") library(GGIR) GGIR(datadir=\"~/myaccelerometerdata\", outputdir=\"~/myresults\", mode=1:2, epochvalues2csv = TRUE, do.report=2, myfun=myfun, do.parallel = FALSE)"},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"part-1","dir":"Articles","previous_headings":"Integration in GGIR output","what":"Part 1","title":"Embedding external functions in GGIR","text":"external function output included time series produced function GGIR function g.part1 stored RData-file /output_nameofstudy/meta/basic. resolution output GGIR set GGIR argument windowsizes, c(5,900,3600) default. , first element 5 specifies short epoch size seconds. output external function less resolution aggregated function specificied aggfunction myfun object. count example used sum dominant frequency example used median.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"part-2","dir":"Articles","previous_headings":"Integration in GGIR output","what":"Part 2","title":"Embedding external functions in GGIR","text":"Next, part2 GGIR aims detect non-wear periods imputes . impute time series can found part 2 milestone data folder: /output_nameofstudy/meta/ms2.. want directly stored csv file set argument epochvalues2csv = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/ExternalFunction.html","id":"external-functions-released-by-ggir-collaborators","dir":"Articles","previous_headings":"","what":"External functions released by GGIR collaborators:","title":"Embedding external functions in GGIR","text":"Wrist-based step detection algorithm: https://github.com/ShimmerEngineering/Verisense-Toolbox/tree/master/Verisense_step_algorithm Wrist-based sleep classification described Sundararajan et al. 2021 link paper, corresponding code : https://github.com/wadpac/Sundararajan-SleepClassification-2021/tree/master/ggir_ext","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"ggir-part-1","dir":"Articles","previous_headings":"","what":"GGIR Part 1","title":"GGIR output","text":"GGIR part 1, outputs RData files used GGIR part 2. RData files intended direct use GGIR user.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"ggir-part-2","dir":"Articles","previous_headings":"","what":"GGIR Part 2","title":"GGIR output","text":"Part 2 generates following output: part2_summary.csv: Person level summary (see ) part2_daysummary.csv: Day level summary (see ) QC/data_quality_report.csv: Overview calibration results whether file corrupt short processed, QC/plots check data quality 1.pdf: pdf visualisation acceleration time series 15 minute resolution invalid data segments highlighted colours (yellow: non-wear based standard deviation threshold, brown: non-wear extra filtering step (introduced 2013), purple: clipping)","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"day-level-summary-csv","dir":"Articles","previous_headings":"GGIR Part 2","what":"Day level summary (csv)","title":"GGIR output","text":"non-exhaustive list, concepts explained summary.csv","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"data_quality_report-csv","dir":"Articles","previous_headings":"GGIR Part 2","what":"Data_quality_report (csv)","title":"GGIR output","text":"data_quality_report.csv stored subfolder folder results/QC.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"ggir-part-3","dir":"Articles","previous_headings":"","what":"GGIR Part 3","title":"GGIR output","text":"GGIR part 3, outputs RData files used GGIR part 4 5. RData files intended direct use GGIR user.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"ggir-part-4","dir":"Articles","previous_headings":"","what":"GGIR Part 4","title":"GGIR output","text":"Part 4 generates following output:","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"night-level-summaries-csv","dir":"Articles","previous_headings":"GGIR Part 4","what":"Night level summaries (csv)","title":"GGIR output","text":"part4_nightsummary_sleep_cleaned.csv QC/part4_nightsummary_sleep_full.csv latter ’_full’ name intended aid clarifying nights () excluded cleaned summary report. Although, nights accelerometer worn excluded . , 30 day recording accelerometer worn day 7 onward find last 22 nights either csv-report. csv. files contain variables shown . Non-default variables part 4 csv report additional stored used sleeplog captures time bed, using guider HorAngle hip-worn accelerometer data. either applies set argument sleepwindowType “TimeInBed”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"person-level-summaries-csv","dir":"Articles","previous_headings":"GGIR Part 4","what":"Person level summaries (csv)","title":"GGIR output","text":"part4_summary_sleep_cleaned.csv QC/part4_summary_sleep_full.csv person level report variables derived variables night level summary. Minor extensions variable names explain variables aggregated across days. Please find extra clarification variable names meaning may obvious:","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"visualisation-pdf","dir":"Articles","previous_headings":"GGIR Part 4","what":"Visualisation (pdf)","title":"GGIR output","text":"Visualisation support data quality checks: - visualisation_sleep.pdf (optional) input argument .visual set TRUE GGIR can show following visual comparison time window asleep (bed) according sleeplog detected sustained inactivity bouts according accelerometer data. visualisation stored results folder visualisation_sleep.pdf. Explanation image: line represents one night. Colours used distinguish definitions sustained inactivity bouts (2 definitions case) indicate existence absence overlap sleeplog. argument outliers.set FALSE visualise available nights dataset. outliers.set TRUE visualise nights difference onset waking time sleeplog sustained inactivity bouts larger value argument criterror. visualisation outliers.set TRUE critererror set 4 powerful identify entry errors sleeplog data van Hees et al PLoSONE 2015. 25 thousand nights data, visualisation allowed us quickly zoom problematic nights investigate possible mistakes GGIR mistakes data entry.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"ggir-part-5","dir":"Articles","previous_headings":"","what":"GGIR Part 5","title":"GGIR output","text":"output part 5 dependent parameter configuration, generate many output files unique combination three thresholds provided. example, following files generated threshold configuration 30 light activity, 100 moderate 400 vigorous activity: part5_daysummary_MM_L30M100V400_T5A5.csv part5_daysummary_WW_L30M100V400_T5A5.csv part5_personsummary_MM_L30M100V400_T5A5.csv part5_personsummary_WW_L30M100V400_T5A5.csv file summary reports/Report_nameofdatafile.pdf","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"day-level-summary-csv-1","dir":"Articles","previous_headings":"GGIR Part 5","what":"Day level summary (csv)","title":"GGIR output","text":"Special note working compositional data analysis: duration dur_ variables _total_ name add total length waking hours day. Similarly, duration dur_ variables excluding variables _total_ name excluding variable dur_day_min, dur_spt_min, dur_day_spt_min also add length full day. Motivation default boutcriter.= 0.9: idea allow bouts 30 minutes make sense allow breaks 20 percent (6 minutes!) used stringent criteria highest category. Please note can change criteria via arguments boutcriter.mvpa, boutcriter., boutcriter.lig.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRoutput.html","id":"person-level-summary-csv-1","dir":"Articles","previous_headings":"GGIR Part 5","what":"Person level summary (csv)","title":"GGIR output","text":"variables person level summary derived day level summary, extended _pla indicate variable calculated plain average across valid days. Variables extended _wei represent weighted average across days weekend days always weighted 2/5 relative contribution week days.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"default-argument-values","dir":"Articles","previous_headings":"","what":"Arguments/parameters description","title":"GGIR configuration parameters","text":"information shown auto-generated identical information provided GGIR package pdf manual.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"mode","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"mode","title":"GGIR configuration parameters","text":"Numeric (default = 1:5). Specify five parts need run, e.g., mode = 1 makes g.part1 run; mode = 1:5 makes whole GGIR pipeline run, g.part1 g.part5. Optionally mode can also include number 6 tell GGIR run g.part6 currently development.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"datadir","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"datadir","title":"GGIR configuration parameters","text":"Character (default = c()). Directory accelerometer files stored, e.g., “C:/mydata”, list accelerometer filenames directories, e.g. c(“C:/mydata/myfile1.bin”, “C:/mydata/myfile2.bin”).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"outputdir","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"outputdir","title":"GGIR configuration parameters","text":"Character (default = c()). Directory output needs stored. Note function attempt create folders directory uses folder keep output.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"studyname","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"studyname","title":"GGIR configuration parameters","text":"Character (default = c()). datadir folder, study given name data directory. datadir list filenames studyname specified input argument used name study.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"f0","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"f0","title":"GGIR configuration parameters","text":"Numeric (default = 1). File index start (default = 1). Index refers filenames sorted alphabetical order.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"f1","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"f1","title":"GGIR configuration parameters","text":"Numeric (default = 0). File index finish (defaults number files available).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-report","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"do.report","title":"GGIR configuration parameters","text":"Numeric (default = c(2, 4, 5, 6)). parts generate summary spreadsheet: 2, 4, 5, /6. Default c(2, 4, 5, 6). report generated based available milestone data. creating milestone data multiple machines advisable turn report generation generating milestone data, value = c(), merge milestone data turn report generation back setting overwrite FALSE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"configfile","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"configfile","title":"GGIR configuration parameters","text":"Character (default = c()). Configuration file previously generated function GGIR. See details.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"myfun","dir":"Articles","previous_headings":"Arguments/parameters description > GGIR function input arguments","what":"myfun","title":"GGIR configuration parameters","text":"List (default = c()). External function object applied raw data. See package vignette detailed tutorial examples use function embedding: https://cran.r-project.org/package=GGIR/vignettes/ExternalFunction.html","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"overwrite","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"overwrite","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). want overwrite analysis milestone data exists? overwrite = FALSE, milestone data previous analysis used available visual reports created .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"acc-metric","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"acc.metric","title":"GGIR configuration parameters","text":"Character (default = “ENMO”). one acceleration metrics want use acceleration magnitude analyses GGIR part 5 visual report? example: “ENMO”, “LFENMO”, “MAD”, “NeishabouriCount_y”, “NeishabouriCount_vm”. one acceleration metric can specified selected metric needs calculated part 1 (see g.part1) via arguments .enmo = TRUE .mad = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"maxncores","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"maxNcores","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Maximum number cores use argument .parallel set true. GGIR default uses either maximum number available cores number files process (whichever lower), argument allows set lower maximum.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"print-filename","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"print.filename","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). Whether print filename analysing (case .parallel = FALSE). Printing filename can useful investigate problems (e.g., verify file read).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-parallel","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"do.parallel","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). Whether use multi-core processing (works least 4 CPU cores available).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"windowsizes","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"windowsizes","title":"GGIR configuration parameters","text":"Numeric vector, three values (default = c(5, 900, 3600)). indicate lengths windows c(window1, window2, window3): window1 short epoch length seconds, default 5, time window acceleration angle metrics calculated; window2 long epoch length seconds non-wear signal clipping defined, default 900 (expected multitude 60 seconds); window3 window length data used non-wear detection default 3600 seconds. , window3 larger window2 use overlapping windows, window2 equals window3 non-wear periods assessed non-overlapping windows.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"desiredtz","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"desiredtz","title":"GGIR configuration parameters","text":"Character (default = ““, .e., system timezone). Timezone device configured experiments took place. experiments took place different timezone, use argument timezone experiments took place argument configtz specify device configured. Use ”TZ identifier” specified ://en.wikipedia.org/wiki/Zone.tabhttps://en.wikipedia.org/wiki/Zone.tab set desiredtz, e.g., “Europe/London”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"configtz","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"configtz","title":"GGIR configuration parameters","text":"Character (default = ““, .e., system timezone). moment functional GENEActiv .bin, AX3 cwa, ActiGraph .gt3x, ad-hoc csv file format. Timezone accelerometer configured. use argument timezone configuration timezone recording took place different. Use ”TZ identifier” specified ://en.wikipedia.org/wiki/Zone.tabhttps://en.wikipedia.org/wiki/Zone.tab set configtz, e.g., “Europe/London”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"idloc","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"idloc","title":"GGIR configuration parameters","text":"Numeric (default = 1). idloc = 1 code assumes ID number stored obvious header field. Note ActiGraph data ID never stored file header. value set 2, 5, 6, 7, GGIR looks filename extracts character string preceding first occurance “_” (idloc = 2), ” ” (space, idloc = 5), “.” (dot, idloc = 6), “-” (idloc = 7), respectively. may noticed idloc 3 4 skipped, used one study 2012, actively maintained anymore, legacy code omitted.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dayborder","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"dayborder","title":"GGIR configuration parameters","text":"Numeric (default = 0). Hour days start end (dayborder = 4 mean 4 ).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"part5_agg2_60seconds","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"part5_agg2_60seconds","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). Whether use aggregate epochs 60 seconds part GGIR g.part5 analysis. Aggregation doen averaging. Note working count metrics Neishabouri counts means threshold can stay part 2, threshold expressed relative original epoch size, even averaged per minute. example want use cut-point 100 count per minute specify mvpathreshold = 100 * (5/60) well `threshold.mod = 100 * (5/60) regardless whether set part5_agg2_60seconds TRUE FALSE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sensor-location","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"sensor.location","title":"GGIR configuration parameters","text":"Character (default = “wrist”). indicate sensor location, default wrist. hip, HDCZA algorithm sleep detection also requires longitudinal axis sensor -45 +45 degrees.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"expand_tail_max_hours","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"expand_tail_max_hours","title":"GGIR configuration parameters","text":"Numeric (default = NULL). parameter replaced recordingEndSleepHour.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"recordingendsleephour","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"recordingEndSleepHour","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Time (hours) recording end (later) expand g.part1 output synthetic data trigger sleep detection last night. Using argument recordingEndSleepHour implies assumption participant fell asleep end recording recording ended recordingEndSleepHour hour last day. assumption may always hold true used caution. synthetic data metashort entails: timestamps continuing regularly, zeros acceleration metrics EN, one EN. Angle columns created way triggers sleep detection using equation: round(sin((1:length_expansion) / (900/epochsize))) * 15. keep track tail expansion g.part1 stores length expansion RData files, passed via g.part2, g.part3, g.part4 g.part5. g.part5 tail expansion size included additional variable csv-reports. g.part4 csv-report last night omitted, know sleep estimates last night trustworthy. Similarly, g.part5 output columns related sleep assessment omitted last window avoid biasing averages. , synthetic data also ignored visualizations time series output avoid biased output.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dataformat","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"dataFormat","title":"GGIR configuration parameters","text":"Character (default = “raw”). indicate format data datadir. Alternatives: ukbiobank_csv, actiwatch_csv, actiwatch_awd, actigraph_csv, sensewear_xls, correspond epoch level data files , respecitively, UK Biobank csv format, Actiwatch csv format, Actiwatch awd format, ActiGraph csv format, Sensewear xls format (also works xlsx). , assumed epoch size UK Biobank csvdata 5 seconds. epoch size non-raw data formats flexible, make sure set first value argument windowsizes accordingly. Also working non-raw data formats specify argument extEpochData_timeformat documented . ukbiobank_csv nonwear column data , actiwatch_csv, actiwatch_awd, actigraph_csv, sensewear_xls non-wear detected 60 minute rolling zeros. length window can modified third value argument windowsizes expressed seconds.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"maxrecordinginterval","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"maxRecordingInterval","title":"GGIR configuration parameters","text":"Numeric (default = NULL). indicate maximum gap hours repeated measurements ID recordings appended. , assumption ID can matched, make sure argument idloc set correctly. argument maxRecordingInterval set NULL (default) recordings appended. recordings overlap GGIR use data latest recording. recordings separated timegap recordings filled data points resemble monitor worn. maximum value maxFile gap 504 (21 days). recordings accelerometer brand appended. part 2 csv report show number appended recordings, sampling rate , time overlap gap names filenames respective recording.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"extepochdata_timeformat","dir":"Articles","previous_headings":"Arguments/parameters description > General Parameters","what":"extEpochData_timeformat","title":"GGIR configuration parameters","text":"Character (default = “%d-%m-%Y %H:%M:%S”). specify time format used external epoch level data argument dataFormat set “actiwatch_csv”, “actiwatch_awd”, “actigraph_csv” “sensewear_xls”. example “%Y-%m-%d %:%M:%S %p” “2023-07-11 01:24:01 PM” “%m/%d/%Y %H:%M:%S” “2023-07-11 13:24:01”","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"chunksize","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"chunksize","title":"GGIR configuration parameters","text":"Numeric (default = 1). Value specify size chunks loaded fraction approximately 12 hour period auto-calibration procedure fraction 24 hour period metric calculation, e.g., 0.5 equals 6 12 hour chunks, respectively. machines less 4Gb RAM memory < 2GB memory per process using .parallel = TRUE value 1 recommended. value constrained GGIR lower 0.05. Please note setting 0.05 produce output 3rd value parameter windowsizes 3600.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"spherecrit","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"spherecrit","title":"GGIR configuration parameters","text":"Numeric (default = 0.3). minimum required acceleration value (g) sides 0 g axis. Used judge whether sphere sufficiently populated","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"minloadcrit","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"minloadcrit","title":"GGIR configuration parameters","text":"Numeric (default = 168). minimum number hours code needs read autocalibration procedure effective (sensitive multitudes 12 hrs, values ceiled). loading hours extra data loaded calibration error reduced 0.01 g.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"printsummary","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"printsummary","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE print summary calibration procedure console done.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-cal","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"do.cal","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). Whether apply auto-calibration g.calibrate. Recommended setting TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"backup-cal-coef","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"backup.cal.coef","title":"GGIR configuration parameters","text":"Character (default = “retrieve”). Option use backed-calibration coefficient instead deriving calibration coefficients analysing file twice. Argument backup.cal.coef two usecase. Use case 1: auto-calibration fails user option provide back-calibration coefficients via argument. value argument needs name directory csv-spreadsheet following column names subsequent values: “filename” names accelerometer files calibration coefficients need applied case auto-calibration fails; “scale.x”, “scale.y”, “scale.z” scaling coefficients; “offset.x”, “offset.y”, “offset.z” offset coefficients, ; “temperature.offset.x”, “temperature.offset.y”, “temperature.offset.z” temperature offset coefficients. can useful analysing short lasting laboratory experiments insufficient sphere data perform auto-calibration, calibration coefficients can derived alternative way. users responsibility compile csv-spreadsheet. Instead building file user can also Use case 2: user wants avoid performing auto-calibration repeatedly file. backup.cal.coef value set “retrieve” (default) GGIR look “data_quality_report.csv” file outputfolder QC, holds previously generated calibration coefficients. want happen, deleted data_quality_report.csv QC folder set value “redo”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dynrange","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"dynrange","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Provide dynamic range 8 gravity.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"minimumfilesizemb","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"minimumFileSizeMB","title":"GGIR configuration parameters","text":"Numeric (default = 2). Minimum File size MB required enter processing. argument can help avoid short uninformative files enter analyses. Given typical accelerometer collects several MBs per hour, default setting skip tiny files.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-dec","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.dec","title":"GGIR configuration parameters","text":"Character (default = “.”). Decimal used numbers, dec argument [utils]read.csv [data.table]fread.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-firstrow-acc","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.firstrow.acc","title":"GGIR configuration parameters","text":"Numeric (default = NULL). First row (number) acceleration data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-firstrow-header","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.firstrow.header","title":"GGIR configuration parameters","text":"Numeric (default = NULL). First row (number) header. Leave blank file header.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-header-length","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.header.length","title":"GGIR configuration parameters","text":"Numeric (default = NULL). file header, specify header length (number rows).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-col-acc","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.col.acc","title":"GGIR configuration parameters","text":"Numeric, three values (default = c(1, 2, 3)). Vector three column (numbers) acceleration signals stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-col-temp","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.col.temp","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Scalar column (number) temperature stored. Leave default setting temperature available. temperature used g.calibrate.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-col-time","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.col.time","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Scalar column (number) timestamps stored. Leave default setting timestamps stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-unit-acc","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.unit.acc","title":"GGIR configuration parameters","text":"Character (default = “g”). Character unit acceleration values: “g”, “mg”, “bit”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-unit-temp","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.unit.temp","title":"GGIR configuration parameters","text":"Character (default = “C”). Character unit temperature values: (K)elvin, (C)elsius, (F)ahrenheit.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-unit-time","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.unit.time","title":"GGIR configuration parameters","text":"Character (default = “POSIX”). Character unit timestamps: “POSIX”, “UNIXsec” (seconds since origin, see argument rmc.origin), “character”, “ActivPAL” (exotic timestamp format used ActivPAL activity monitor).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-format-time","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.format.time","title":"GGIR configuration parameters","text":"Character (default = “%Y-%m-%d %H:%M:%OS”). Character giving date-time format used [base]strptime. used rmc.unit.time: character POSIX.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-bitrate","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.bitrate","title":"GGIR configuration parameters","text":"Numeric (default = NULL). unit acceleration bit provide bit rate, e.g., 12 bit.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-dynamic_range","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.dynamic_range","title":"GGIR configuration parameters","text":"Numeric character (default = NULL). unit acceleration bit provide dynamic range deviation g zero, e.g., +/-6g mean argument needs 6. give argument character value code search file header elements name equal character value use corresponding numeric value next dynamic range.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-unsignedbit","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.unsignedbit","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). unsignedbit = TRUE means bits positive numbers. unsignedbit = FALSE bits positive negative.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-origin","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.origin","title":"GGIR configuration parameters","text":"Character (default = “1970-01-01”). Origin time unit time UNIXsec, e.g., 1970-1-1.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-desiredtz","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.desiredtz","title":"GGIR configuration parameters","text":"Character (default = NULL). Timezone experiments took place. argument scheduled deprecated now used overwrite desiredtz provided.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-configtz","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.configtz","title":"GGIR configuration parameters","text":"Character (default = NULL). Timezone device configured. argument scheduled deprecated now used overwrite configtz provided.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-sf","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.sf","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Sample rate Hertz, stored file header used instead (see argument rmc.headername.sf).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-headername-sf","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.headername.sf","title":"GGIR configuration parameters","text":"Character (default = NULL). file header: Row name sample frequency can found.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-headername-sn","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.headername.sn","title":"GGIR configuration parameters","text":"Character (default = NULL). file header: Row name serial number can found.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-headername-recordingid","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.headername.recordingid","title":"GGIR configuration parameters","text":"Character (default = NULL). file header: Row name recording ID can found.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-header-structure","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.header.structure","title":"GGIR configuration parameters","text":"Character (default = NULL). Used split header name header value, e.g., “:” ” “.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-check4timegaps","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.check4timegaps","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). indicate whether gaps time imputed zeros. sensing equipment provides accelerometer gaps time. rest GGIR designed , setting argument TRUE gaps time filled zeros.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-noise","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.noise","title":"GGIR configuration parameters","text":"Numeric (default = 13). Noise level acceleration signal m-units, used working ad-hoc .csv data formats using read.myacc.csv. read.myacc.csv take rmc.noise argument, interacting GGIR g.part1 rmc.noise used.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"nonwear_range_threshold","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"nonwear_range_threshold","title":"GGIR configuration parameters","text":"Numeric (default 150) used define maximum value range per axis non-wear detection, used combination brand specific standard deviation per axis.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-col-wear","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.col.wear","title":"GGIR configuration parameters","text":"Numeric (default = NULL). external wear detection outcome stored part data can used GGIR. argument specifies column wear detection (Boolean) stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-doresample","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.doresample","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). indicate whether resample data based available timestamps extracted sample rate file header.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"interpolationtype","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"interpolationType","title":"GGIR configuration parameters","text":"Integer (default = 1). indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"imputetimegaps","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"imputeTimegaps","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). indicate whether timegaps larger 1 sample imputed. Currently used .gt3x data ActiGraph .csv format, timegaps can expected result Actigraph’s idle sleep.mode configuration.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"frequency_tol","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"frequency_tol","title":"GGIR configuration parameters","text":"Number (default = 0.1) passed readAxivity GGIRread package. Represents frequency tolerance fraction 0 1. relative bias per data block larger fraction data block imputed lack movement gravitational oriationed guessed recent valid data block. applicable Axivity .cwa data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"rmc-scalefactor-acc","dir":"Articles","previous_headings":"Arguments/parameters description > Raw Data Parameters","what":"rmc.scalefactor.acc","title":"GGIR configuration parameters","text":"Numeric value (default 1) scale acceleration signals via multiplication. example, data provided m/s2 setting 1/9.81 derive gravitational units.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-anglex","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.anglex","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates angle X axis relative horizontal: = (^-1_rollmedian(x)(acc_rollmedian(y))^2 + (acc_rollmedian(z))^2) * 180/","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-angley","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.angley","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates angle Y axis relative horizontal: = (^-1_rollmedian(y)(acc_rollmedian(x))^2 + (acc_rollmedian(z))^2) * 180/","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-anglez","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.anglez","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE, calculates angle Z axis relative horizontal: = (^-1_rollmedian(z)(acc_rollmedian(x))^2 + (acc_rollmedian(y))^2) * 180/","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-zcx","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.zcx","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric zero-crossing count x-axis. computation specifics see source code function g.applymetrics","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-zcy","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.zcy","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric zero-crossing count y-axis. computation specifics see source code function g.applymetrics","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-zcz","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.zcz","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric zero-crossing count z-axis. computation specifics see source code function g.applymetrics","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-enmo","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.enmo","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE, calculates metric: = _x^2 + acc_y^2 + acc_z^2 - 1 (ENMO < 0, ENMO = 0).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-lfenmo","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.lfenmo","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric ENMO low-pass filtered accelerations (computation specifics see source code function g.applymetrics). filter bound defined parameter hb.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-en","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.en","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates Euclidean Norm raw accelerations: = _x^2 + acc_y^2 + acc_z^2","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-mad","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.mad","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates Mean Amplitude Deviation: = 1n|r_i - |","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-enmoa","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.enmoa","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric: = _x^2 + acc_y^2 + acc_z^2 - 1 (ENMOa < 0, ENMOa = |ENMOa|).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-roll_med_acc_x","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.roll_med_acc_x","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-roll_med_acc_y","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.roll_med_acc_y","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-roll_med_acc_z","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.roll_med_acc_z","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-dev_roll_med_acc_x","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.dev_roll_med_acc_x","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-dev_roll_med_acc_y","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.dev_roll_med_acc_y","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-dev_roll_med_acc_z","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.dev_roll_med_acc_z","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-bfen","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.bfen","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-hfen","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.hfen","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-hfenplus","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.hfenplus","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-lfen","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.lfen","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-lfx","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.lfx","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-lfy","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.lfy","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-lfz","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.lfz","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-hfx","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.hfx","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-hfy","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.hfy","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-hfz","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.hfz","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-bfx","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.bfx","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-bfy","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.bfy","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-bfz","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.bfz","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-brondcounts","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.brondcounts","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). option deprecated (October 2022) due issues activityCounts package used dependency. TRUE, calculated metric via R package activityCounts. called BrondCounts large number activity counts physical activity sleep research field. calling brondcounts clarify counts proposed Jan Brønd implemented R Ruben Brondeel. brondcounts intended imitation counts produced one closed source ActiLife software ActiGraph.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-neishabouricounts","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"do.neishabouricounts","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates metric via R package actilifecounts, implementation algorithm used closed-source software ActiLife ActiGraph (methods published doi: 10.1038/s41598-022-16003-x). use name first author (instead ActiLifeCounts) paper call NeishabouriCount uncertainty ActiLife implement algorithm time. use Neishabouri counts physical activity intensity classification part 5 (.e., metric threshold.lig, threshold.mod, threshold.vig applied), acc.metric argument needs set one following: “NeishabouriCount_x”, “NeishabouriCount_y”, “NeishabouriCount_z”, “NeishabouriCount_vm” use counts x-, y-, z-axis vector magnitude, respectively.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"hb","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"hb","title":"GGIR configuration parameters","text":"Numeric (default = 15). Higher boundary frequency filter (Hertz) used filter-based metrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"lb","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"lb","title":"GGIR configuration parameters","text":"Numeric (default = 0.2). Lower boundary frequency filter (Hertz) used filter-based metrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"n","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"n","title":"GGIR configuration parameters","text":"Numeric (default = n). Order frequency filter used filter-based metrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"zc-lb","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"zc.lb","title":"GGIR configuration parameters","text":"Numeric (default = 0.25). Used zero-crossing counts . Lower boundary cut-frequency filter.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"zc-hb","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"zc.hb","title":"GGIR configuration parameters","text":"Numeric (default = 3). Used zero-crossing counts . Higher boundary cut-frequencies filter.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"zc-sb","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"zc.sb","title":"GGIR configuration parameters","text":"Numeric (default = 0.01). Stop band used calculation zero crossing counts. Value acceleration threshold g units acceleration rounded zero.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"zc-order","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"zc.order","title":"GGIR configuration parameters","text":"Numeric (default = 2). Used zero-crossing counts . Order frequency filter.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"zc-scale","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"zc.scale","title":"GGIR configuration parameters","text":"Numeric (default = 1) Used zero-crossing counts . Scaling factor applied counts calculated (GGIR part 3).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"actilife_lfe","dir":"Articles","previous_headings":"Arguments/parameters description > Metrics Parameters","what":"actilife_LFE","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE, calculates NeishabouriCount metric low-frequency extension filter proposed closed source ActiLife software ActiGraph. applicable metric NeishabouriCount.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"includedaycrit","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"includedaycrit","title":"GGIR configuration parameters","text":"Numeric (default = 16). Minimum required number valid hours calendar day specific analysis part 2. specify two values c(16, 16) first value used part 2 second value used part 5 applied criterion full part 5 window. Note applied addition parameter includedaycrit.part5 looks valid data waking hours.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ndayswindow","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"ndayswindow","title":"GGIR configuration parameters","text":"Numeric (default = 7). data_masking_strategy set 3 5, size window number days. data_masking_strategy 3 value can fractional, e.g. 7.5, data_masking_strategy 5 needs integer.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"strategy","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"strategy","title":"GGIR configuration parameters","text":"Deprecated replaced data_masking_strategy. strategy specified value passed used data_masking_strategy.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"data_masking_strategy","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"data_masking_strategy","title":"GGIR configuration parameters","text":"Numeric (default = 1). deal knowledge study protocol. data_masking_strategy = 1 means select data based hrs.del.start hrs.del.end. data_masking_strategy = 2 makes data first midnight last midnight used. data_masking_strategy = 3 selects active X days file X specified argument ndayswindow, days series 24-h blocks starting time day (X hours beginning end period can deleted arguments hrs.del.start hrs.del.end) data_masking_strategy = 4 use data first midnight. data_masking_strategy = 5 similar data_masking_strategy = 3, selects X complete calendar days X specified argument ndayswindow (X hours beginning end period can deleted arguments hrs.del.start hrs.del.end).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"maxdur","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"maxdur","title":"GGIR configuration parameters","text":"Numeric (default = 0). many DAYS start experiment experiment definitely stop? (set zero unknown).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"hrs-del-start","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"hrs.del.start","title":"GGIR configuration parameters","text":"Numeric (default = 0). many HOURS start experiment wearing monitor start? Used GGIR g.part2 data_masking_strategy = 1.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"hrs-del-end","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"hrs.del.end","title":"GGIR configuration parameters","text":"Numeric (default = 0). many HOURS end experiment wearing monitor definitely end? Used GGIR g.part2 data_masking_strategy = 1.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"includedaycrit-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"includedaycrit.part5","title":"GGIR configuration parameters","text":"Numeric (default = 2/3). Inclusion criteria used part 5 number valid hours waking hours day, value smaller equal 1 used fraction waking hours, value 1 used absolute number valid hours required. confuse argument argument includedaycrit used GGIR part 2 applies entire day.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"excludefirstlast-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"excludefirstlast.part5","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE first last window (waking-waking, midnight-midnight, sleep onset-onset) ignored g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"timesegments2zerofile","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"TimeSegments2ZeroFile","title":"GGIR configuration parameters","text":"Character (default = NULL). Takes path csv file columns “windowstart” “windowend” refer start end time time windows format “2024-10-12 20:00:00”, “filename” GGIR milestone data file without “meta_” segment name. GGIR part 2 uses set acceleration values zero non-wear classification zero (meaning sensor worn). Motivation: accelerometer worn night GGIR automatically labels invalid, user may like treat zero movement. Disclaimer: functionality developed 2019. hindsight generic enough need revision. Please contact GGIR maintainers like us invest time improving functionality.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-imp","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"do.imp","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). Whether impute missing values (e.g., suspected monitor non-wear clippling) g.impute GGIR g.part2. Recommended setting TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"data_cleaning_file","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"data_cleaning_file","title":"GGIR configuration parameters","text":"Character (default = NULL). Optional path csv file create holds four columns: ID, day_part5, relyonguider_part4, night_part4. ID hold participant ID. Columns day_part5 night_part4 allow specify day(s) night(s) need excluded g.part5 g.part4, respectively. including multiple day(s)/night(s) create new line day/night. , done regardless whether rest GGIR thinks day(s)/night(s) valid. Column relyonguider_part4 allows specify nights g.part4 fully rely guider. See also package vignette.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"minimum_mm_length-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"minimum_MM_length.part5","title":"GGIR configuration parameters","text":"Numeric (default = 23). Minimum length hours MM day included cleaned g.part5 results.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"excludefirstlast","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"excludefirstlast","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE first last night measurement ignored sleep assessment g.part4.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"includenightcrit","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"includenightcrit","title":"GGIR configuration parameters","text":"Numeric (default = 16). Minimum number valid hours per night (24 hour window noon noon), used sleep assessment g.part4.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"excludefirst-part4","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"excludefirst.part4","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE first night measurement ignored sleep assessment g.part4.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"excludelast-part4","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"excludelast.part4","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). TRUE last night measurement ignored sleep assessment g.part4.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"max_calendar_days","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"max_calendar_days","title":"GGIR configuration parameters","text":"Numeric (default = 0). maximum number calendar days include (set zero unknown).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"nonwearedgecorrection","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"nonWearEdgeCorrection","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE non-wear detection around edges recording (first last 3 hours) corrected following description vanHees2013 default since . functionality advisable working sleep clinic exercise lab data typically lasting less day.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"nonwear_approach","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"nonwear_approach","title":"GGIR configuration parameters","text":"Character (default = “2023”). Whether use traditional version non-wear detection algorithm (nonwear_approach = “2013”) new version (nonwear_approach = “2023”). 2013 version use longsize window (windowsizes[3], one hour default) check conditions nonwear identification flag nonwear mediumsize window (windowsizes[2], 15 min default) middle. 2023 version differs flag nonwear full longsize window. 2013 method longsize window centered centre mediumsize window, 2023 method longsizewindow aligned left edge left edge mediumsize window.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"segmentwearcrit-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"segmentWEARcrit.part5","title":"GGIR configuration parameters","text":"Numeric (default = 0.5). Fraction qwindow segment expected valid part 5, 0.3 indicates least 30 percent time valid.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"segmentdaysptcrit-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"segmentDAYSPTcrit.part5","title":"GGIR configuration parameters","text":"Numeric vector length 2 (default = c(0.9, 0)). Inclusion criteria proportion segment classified day (awake) spt (sleep period time) considered valid. interested comparing time spent behaviour better set one two numbers 0, defines proportion segment classified day spt, respectively. default setting focus waking hour segments includes segments overlap least 90 percent waking hours. order shift focus SPT use c(0, 0.9) ensures segments overlap least 90 percent SPT included. Setting zero problematic comparing time spent behaviours days individuals: complete segment averaged incomplete segments (someone going bed waking middle segment) longer clear whether person less active sleeps segment. Similarly clear whether person wakefulness SPT segment woke went bed segment.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"study_dates_file","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"study_dates_file","title":"GGIR configuration parameters","text":"Character (default = c()). Full path csv file containing first last date expected wear period every study participant (dates provided per individual). Expected format activity diary : First column headers followed one row per recording. three columns: first column recording ID, needs match ID GGIR extracts accelerometer file; second column contain first date study; third column last date study. Date columns default format “23-04-2017”, date format specified argument study_dates_dateformat (). specified (default), GGIR use first last day recording beginning end study. Note dates used top data_masking_strategy selected.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"study_dates_dateformat","dir":"Articles","previous_headings":"Arguments/parameters description > Cleaning Parameters","what":"study_dates_dateformat","title":"GGIR configuration parameters","text":"Character (default = “%d-%m-%Y”). specify date format used study_dates_file used [base]strptime.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"anglethreshold","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"anglethreshold","title":"GGIR configuration parameters","text":"Numeric (default = 5). Angle threshold (degrees) sustained inactivity periods detection. algorithm look periods time (timethreshold) angle variability lower anglethreshold. can specified multiple thresholds, implemented, e.g., anglethreshold = c(5,10).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"timethreshold","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"timethreshold","title":"GGIR configuration parameters","text":"Numeric (default = 5). Time threshold (minutes) sustained inactivity periods detection. algorithm look periods time (timethreshold) angle variability lower anglethreshold. can specified multiple thresholds, implemented, e.g., timethreshold = c(5,10).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ignorenonwear","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"ignorenonwear","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE ignore detected monitor non-wear periods avoid confusion monitor non-wear time sustained inactivity.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"haspt-algo","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"HASPT.algo","title":"GGIR configuration parameters","text":"Character (default = “HDCZA”). indicate algorithm used sleep period time detection. Default “HDCZA” Heuristic algorithm looking Distribution Change Z-Angle described van Hees et al. 2018. options included: “HorAngle”, based HDCZA replaces non-movement detection HDCZA algorithm looking time segments angle longitudinal sensor axis angle relative horizontal plane -45 +45 degrees. “NotWorn” also HDCZA looks time segments rolling average acceleration magnitude 5 per cent standard deviation, see Cookbook vignette Annexes https://wadpac.github.io/GGIR/ detailed guidance use “NotWorn”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"hasib-algo","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"HASIB.algo","title":"GGIR configuration parameters","text":"Character (default = “vanHees2015”). indicate algorithm used define sustained inactivity bouts (.e., likely sleep). Options: “vanHees2015”, “Sadeh1994”, “Galland2012”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sadeh_axis","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"Sadeh_axis","title":"GGIR configuration parameters","text":"Character (default = “Y”). indicate axis use Sadeh1994 algorithm, algortihms relied count-based Actigraphy Galland2012.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"longitudinal_axis","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"longitudinal_axis","title":"GGIR configuration parameters","text":"Integer (default = NULL). indicate axis longitudinal axis. provided, function estimate longitudinal axis axis highest 24 hour lagged autocorrelation. used sensor.location = “hip” HASPT.algo = “HorAngle”.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"haspt-ignore-invalid","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"HASPT.ignore.invalid","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). indicate whether invalid time segments ignored heuristic guiders. FALSE (default), imputed angle activity metric invalid time segments used. TRUE, invalid time segments ignored (.e., contribute guider). NA, invalid time segments considered movement segments can contribute guider. HASPT.algo “NotWorn”, HASPT.ignore.invalid automatically set NA.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"loglocation","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"loglocation","title":"GGIR configuration parameters","text":"Character (default = NULL). Path csv file sleep log information. See package vignette format file.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"colid","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"colid","title":"GGIR configuration parameters","text":"Numeric (default = 1). Column number sleep log spreadsheet participant ID code stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"coln1","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"coln1","title":"GGIR configuration parameters","text":"Numeric (default = 2). Column number sleep log spreadsheet onset first night starts.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"nnights","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"nnights","title":"GGIR configuration parameters","text":"Numeric (default = NULL). argument deprecated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"relyonguider","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"relyonguider","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). Sustained inactivity bouts (sib) overlap guider labelled sleep. relyonguider = FALSE sib overlaps partially guider sib defines edge SPT window guider. relyonguider = TRUE sib overlaps partially guider guider defines edge SPT window sib. participants instructed wear accelerometer waking hours ignorenonware=FALSE set relyonguider=TRUE, scenarios set FALSE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"def-noc-sleep","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"def.noc.sleep","title":"GGIR configuration parameters","text":"Numeric (default = 1). time window sustained inactivity assumed represent sleep, e.g., def.noc.sleep = c(21, 9). used sleep log entry available. left blank def.noc.sleep = c() 12 hour window centred least active 5 hours 24 hour period used instead. , L5 hardcoded change changing argument winhr function g.part2. def.noc.sleep filled single integer, e.g., def.noc.sleep=c(1) window detected based built algorithms. See argument HASPT.algo HASPT specifying algorithms use.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sleeplogsep","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"sleeplogsep","title":"GGIR configuration parameters","text":"Character (default = NULL). argument deprecated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sleepwindowtype","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"sleepwindowType","title":"GGIR configuration parameters","text":"Character (default = “SPT”). indicate type information sleeplog, “SPT” sleep period time. Set “TimeInBed” sleep log recorded time bed enable calculation sleep latency sleep efficiency.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"possible_nap_window","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"possible_nap_window","title":"GGIR configuration parameters","text":"Numeric (default = c(9, 18)). Numeric vector length two range clock hours naps assumed take place, e.g., possible_nap_window = c(9, 18). Currently used context explorative nap classification algortihm trained 3.5 year olds.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"possible_nap_dur","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"possible_nap_dur","title":"GGIR configuration parameters","text":"Numeric (default = c(15, 240)). Numeric vector length two range duration (minutes) nap, e.g., possible_nap_dur = c(15, 240). Currently used context explorative nap classification algortihm trained 3.5 year olds.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"nap_model","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"nap_model","title":"GGIR configuration parameters","text":"Character (default = NULL). specify classification model. Currently option “hip3yr”, corresponds model trained hip data 3-3.5 olds trained parent diary data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sleepefficiency-metric","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"sleepefficiency.metric","title":"GGIR configuration parameters","text":"Numeric (default = 1). 1 (default), sleep efficiency calculated detected sleep time SPT window divided log-derived time bed. 2, sleep efficiency calculated detected sleep time SPT window divided detected duration sleep period time plus sleep latency (sleep latency refers difference time bed sleep onset). sleepefficiency.metric considered argument sleepwindowType = “TimeInBed”","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"possible_nap_edge_acc","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"possible_nap_edge_acc","title":"GGIR configuration parameters","text":"Numeric (default = Inf). Maximum acceleration SIB nap considered. default allow possible naps.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"hdcza_threshold","dir":"Articles","previous_headings":"Arguments/parameters description > Sleep Parameters","what":"HDCZA_threshold","title":"GGIR configuration parameters","text":"Numeric (default = c()) HASPT.algo set “HDCZA” HDCZA_threshold NULL, (e.g., HDCZA_threshold = 0.2), value used threshold 6th step diagram Figure 1 van Hees et al. 2018 Scientific Report (doi: 10.1038/s41598-018-31266-z). However, supported research yet intended facilitate methodological research, advise sticking default line publication. , HDCZA_threshold set numeric vector length 2, e.g. c(10, 15), used percentile multiplier mentioned 6th step.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"mvpathreshold","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"mvpathreshold","title":"GGIR configuration parameters","text":"Numeric (default = 100). Acceleration threshold MVPA estimation GGIR g.part2. can single number vector numbers, e.g., mvpathreshold = c(100, 120). latter case code estimate MVPA separately threshold. variable left blank, e.g., mvpathreshold = c(), MVPA estimated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutcriter","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutcriter","title":"GGIR configuration parameters","text":"Numeric (default = 0.8). number 0 1, defines fraction bout needs mvpathreshold, used GGIR g.part2.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"mvpadur","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"mvpadur","title":"GGIR configuration parameters","text":"Numeric (default = 10). bout duration(s) MVPA calculated. used GGIR g.part2.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutcriter-in","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutcriter.in","title":"GGIR configuration parameters","text":"Numeric (default = 0.9). number 0 1, defines fraction bout needs threshold.lig.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutcriter-lig","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutcriter.lig","title":"GGIR configuration parameters","text":"Numeric (default = 0.8). number 0 1, defines fraction bout needs threshold.lig threshold.mod.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutcriter-mvpa","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutcriter.mvpa","title":"GGIR configuration parameters","text":"Numeric (default = 0.8). number 0 1, defines fraction bout needs threshold.mod.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"threshold-lig","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"threshold.lig","title":"GGIR configuration parameters","text":"Numeric (default = 40). g.part5: Threshold light physical activity separate inactivity light. Value can one number vector multiple numbers, e.g., threshold.lig =c(30,40). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"threshold-mod","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"threshold.mod","title":"GGIR configuration parameters","text":"Numeric (default = 100). g.part5: Threshold moderate physical activity separate light moderate. Value can one number vector multiple numbers, e.g., threshold.mod = c(100, 120). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"threshold-vig","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"threshold.vig","title":"GGIR configuration parameters","text":"Numeric (default = 400). g.part5: Threshold vigorous physical activity separate moderate vigorous. Value can one number vector multiple numbers, e.g., threshold.vig =c(400,500). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutdur-mvpa","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutdur.mvpa","title":"GGIR configuration parameters","text":"Numeric (default = c(1, 5, 10)). Duration(s) MVPA bouts minutes extracted. start identification longest shortest duration. default setting, start 10 minute bouts, followed 5 minute bouts rest data, followed 1 minute bouts rest data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutdur-in","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutdur.in","title":"GGIR configuration parameters","text":"Numeric (default = c(10, 20, 30)). Duration(s) inactivity bouts minutes extracted. Inactivity bouts detected segments data labelled sleep MVPA bouts. start identification longest shortest duration. default setting, start identification 30 minute bouts, followed 20 minute bouts rest data, followed 10 minute bouts rest data. Note use term inactivity instead sedentary behaviour lowest intensity level behaviour. reason GGIR attempt classifying activity type sitting moment, feel using term sedentary behaviour fail communicate .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"boutdur-lig","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"boutdur.lig","title":"GGIR configuration parameters","text":"Numeric (default = c(1, 5, 10)). Duration(s) light activity bouts minutes extracted. Light activity bouts detected segments data labelled sleep, MVPA, inactivity bouts. start identification longest shortest duration. default setting, start identification 10 minute bouts, followed 5 minute bouts rest data, followed 1 minute bouts rest data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"frag-metrics","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"frag.metrics","title":"GGIR configuration parameters","text":"Character (default = NULL). Fragmentation metric extract. Can “mean”, “TP”, “Gini”, “power”, “CoV”, “NFragPM”, metrics “”. See package vignette description fragmentation metrics.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"part6_threshold_combi","dir":"Articles","previous_headings":"Arguments/parameters description > Physical activity Parameters","what":"part6_threshold_combi","title":"GGIR configuration parameters","text":"Character (default = “40_100_120”) indicate threshold combination derived part 5 used part 6","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"qwindow","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"qwindow","title":"GGIR configuration parameters","text":"Numeric character (default = c(0, 24)). specify windows variables calculated, e.g., acceleration distribution, number valid hours, LXMX analysis, MVPA. numeric, qwindow length two, e.g., qwindow = c(0, 24), variables calculated full 24 hours day. qwindow = c(8, 24) variables calculated window 0-8, 8-24 0-24. days recording segmented based values. want use day specific segmentation day can set qwindow full path activity diary file (character). Expected format activity diary : First column headers followed one row per recording, first column recording ID, needs match ID GGIR extracts accelerometer file. Followed date column format “23-04-2017”, date format specified argument qwindow_dateformat (). Use character combination date, Date DATE column name. followed one multiple columns start times activity types day format hours:minutes:seconds. header column used label activity type. Insert new date column continuing activity types next day. Leave missing values empty. activity log used individuals appear activity log still processed value qwindow = c(0, 24). Dates activity log data can skipped, need column date followed column next date. times activity diary multiple short window size (epoch length), next epoch considered (e.g., epoch 5 seconds, 8:00:02 redefined 8:00:05 activity log). using qwindow functionality combination GGIR part 5 make sure check arguments segmentWEARcrit.part5 segmentDAYSPTcrit.part5 specified research needs.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"qlevels","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"qlevels","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Vector percentiles value needs extracted. need expressed fraction 1, e.g., c(0.1, 0.5, 0.75). limit number percentiles. left empty percentiles extracted. Distribution derived short epoch metric data. Argument qlevels can example used MX-metrics (e.g. Rowlands et al) discussed ://cran.r-project.org/package=GGIR/vignettes/GGIR.htmlmain package vignette","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"qwindow_dateformat","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"qwindow_dateformat","title":"GGIR configuration parameters","text":"Character (default = “%d-%m-%Y”). specify date format used activity log used [base]strptime.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ilevels","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"ilevels","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Levels acceleration value frequency distribution m, e.g., ilevels = c(0,100,200). limit number levels. left empty intensity levels extracted. Distribution derived short epoch metric data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ivis_windowsize_minutes","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"IVIS_windowsize_minutes","title":"GGIR configuration parameters","text":"Numeric (default = 60). Window size Intradaily Variability (IV) Interdaily Stability () metrics minutes, needs able add 24 hours.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ivis_epochsize_seconds","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"IVIS_epochsize_seconds","title":"GGIR configuration parameters","text":"Numeric (default = NULL). argument deprecated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ivis-activity-metric","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"IVIS.activity.metric","title":"GGIR configuration parameters","text":"Numeric (default = 2). Metric used activity calculation. Value = 1, uses continuous scaled acceleration. Value = 2, tries collapse acceleration binary score rest versus active try simulate original approach.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"ivis_acc_threshold","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"IVIS_acc_threshold","title":"GGIR configuration parameters","text":"Numeric (default = 20). Acceleration threshold distinguish inactive active.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"qm5l5","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"qM5L5","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Percentiles (quantiles) calculated L5 M5 window.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"mx-ig-min-dur","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"MX.ig.min.dur","title":"GGIR configuration parameters","text":"Numeric (default = 10). Minimum MX duration needed order intensity gradient calculated.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"m5l5res","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"M5L5res","title":"GGIR configuration parameters","text":"Numeric (default = 10). Resolution L5 M5 analysis minutes.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"winhr","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"winhr","title":"GGIR configuration parameters","text":"Numeric (default = 5). Vector window size(s) (unit: hours) LX MX analysis, look least active consecutive number X hours.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"iglevels","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"iglevels","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Levels acceleration value frequency distribution mused intensity gradient calculation (according method Rowlands 2018). default argument empty intensity gradient calculation done. user can either provide single value () make intensity gradient use bins iglevels = c(seq(0,4000,=25), 8000) user specify distribution. constriction number levels.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"luxthresholds","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"LUXthresholds","title":"GGIR configuration parameters","text":"Numeric (default = c(0, 100, 500, 1000, 3000, 5000, 10000)). Vector numeric sequence corresponding thresholds used calculate time spent LUX ranges.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"lux_cal_constant","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"LUX_cal_constant","title":"GGIR configuration parameters","text":"Numeric (default = NULL). LUX_cal_constant LUX_cal_exponent provided LUX values converted based formula y = constant * exp(x * exponent)","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"lux_cal_exponent","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"LUX_cal_exponent","title":"GGIR configuration parameters","text":"Numeric (default = NULL). LUX_cal_constant LUX_cal_exponent provided LUX LUX values converted based formula y = constant * exp(x * exponent)","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"lux_day_segments","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"LUX_day_segments","title":"GGIR configuration parameters","text":"Numeric (default = NULL). Vector hours day segmented LUX analysis.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"l5m5window","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"L5M5window","title":"GGIR configuration parameters","text":"Argument deprecated version 1.5-24. argument used define start end time, 24 hour clock hours, L5M5 needs calculated. Now done argument qwindow.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"cosinor","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"cosinor","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). Whether apply cosinor analysis ActCR package.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"part6cr","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"part6CR","title":"GGIR configuration parameters","text":"Boolean (default = FALSE) indicate whether circadian rhythm analysis run part 6.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"part6hca","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"part6HCA","title":"GGIR configuration parameters","text":"Boolean (default = FALSE) indicate whether Household Co Analysis run part 6.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"part6window","dir":"Articles","previous_headings":"Arguments/parameters description > 24/7 Parameters","what":"part6Window","title":"GGIR configuration parameters","text":"Character vector length two (default = c(“start”, “end”)) indicate start end time series used circadian rhythm analysis part 6. words, parameters used Household co-analysis. Alternative values : “Wx”, “Ox”, “Hx”, “x” number indicat xth wakeup, onset hour recording. Negative values “x” also possible count relative end recording. example, c(“W1”, “W-1”) goes first till last wakeup, c(“H5”, “H-5”) ignores first last 5 hours, c(“O2”, “W10”) goes second onset till 10th wakeup time.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"epochvalues2csv","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"epochvalues2csv","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). g.part2: TRUE epoch values exported csv file. , non-wear time imputed possible.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"save_ms5rawlevels","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"save_ms5rawlevels","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). g.part5: Whether save time series classification (levels) csv RData files (defined save_ms5raw_format). Note time stamps stored column timenum UTC format (.e., seconds 1970-01-01). convert timenum time stamp format, need specify desired time zone, e.g., .POSIXct(mdat$timenum, tz = “Europe/London”).","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"save_ms5raw_format","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"save_ms5raw_format","title":"GGIR configuration parameters","text":"Character (default = “csv”). g.part5: specify data stored: either “csv” “RData”. used save_ms5rawlevels = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"save_ms5raw_without_invalid","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"save_ms5raw_without_invalid","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). g.part5: indicate whether remove invalid days time series output files. used save_ms5rawlevels = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"storefolderstructure","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"storefolderstructure","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). Store folder structure accelerometer data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"timewindow","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"timewindow","title":"GGIR configuration parameters","text":"Character (default = c(“MM”, “WW”)). g.part5: Timewindow summary statistics derived. Value can “MM” (midnight midnight), “WW” (waking time waking time), “OO” (sleep onset sleep onset), combination .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"viewingwindow","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"viewingwindow","title":"GGIR configuration parameters","text":"Numeric (default = 1). Centre day displayed around noon (viewingwindow = 1) around midnight (viewingwindow = 2) visual report generated visualreport = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dofirstpage","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"dofirstpage","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). indicate whether first page histograms summarizing whole measurement added file summary reports generated visualreport = TRUE.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"visualreport","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"visualreport","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE, generate visual report based combined output g.part2 g.part4. Please note visual report initially developed provide something show study participants data quality checking purposes. time improved visual report also useful QC-ing data. However, scorings shown visual report created visual report may reflect scorings main GGIR analyses reported quantitative csv-reports. effort past 10 years gone making sure csv-report correct, visualreport mostly side project. unfortunate hope find funding future design new report specifically purpose QC-ing analyses done GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"week_weekend_aggregate-part5","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"week_weekend_aggregate.part5","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). g.part5: indicate whether week weekend-days aggregates stored. turned default generates large number extra columns output report.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-part3-pdf","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"do.part3.pdf","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). g.part3: Whether generate pdf g.part3.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"outliers-only","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"outliers.only","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). g.part4: used .visual = TRUE. FALSE, available nights included visual representation data sleeplog. TRUE, nights difference onset waking time larger variable argument criterror included.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"criterror","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"criterror","title":"GGIR configuration parameters","text":"Numeric (default = 3). g.part4: used .visual = TRUE outliers.= TRUE. criterror specifies number minimum number hours difference sleep log accelerometer estimate night included visualisation.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-visual","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"do.visual","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). g.part4: TRUE, function generate pdf visual representation overlap sleeplog entries accelerometer detections. can used visually verify sleeplog entries come obvious mistakes.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-sibreport","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"do.sibreport","title":"GGIR configuration parameters","text":"Boolean (default = FALSE). g.part4: indicate whether generate report sustained inactivity bouts (SIB). set TRUE advanced sleep diary available part 4 part 5 use generate summary statistics overlap self-reported nonwear napping SIB. , SIB can filter based argument possible_nap_edge_acc first value possible_nap_dur","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"do-part2-pdf","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"do.part2.pdf","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). g.part2: Whether generate pdf g.part2.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sep_reports","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"sep_reports","title":"GGIR configuration parameters","text":"Character (default = “,”). Value used sep argument [data.table]fwrite writing csv reports.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"sep_config","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"sep_config","title":"GGIR configuration parameters","text":"Character (default = “,”). Value used sep argument [data.table]fwrite writing csv config file.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dec_reports","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"dec_reports","title":"GGIR configuration parameters","text":"Character (default = “.”). Value used dec argument [data.table]fwrite writing csv reports.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"dec_config","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"dec_config","title":"GGIR configuration parameters","text":"Character (default = “.”). Value used dec argument [data.table]fwrite writing csv config file.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/GGIRParameters.html","id":"visualreport_without_invalid","dir":"Articles","previous_headings":"Arguments/parameters description > Output Parameters","what":"visualreport_without_invalid","title":"GGIR configuration parameters","text":"Boolean (default = TRUE). TRUE, reports generated visualreport = TRUE show windows sufficiently valid data according includedaycrit viewingwindow = 1 includenightcrit viewingwindow = 2","code":""},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"accelerometer-file-names","dir":"Articles","previous_headings":"","what":"Accelerometer file names","title":"Household Co-Analysis","text":"household co-analysis requires households family member can recognised. assume following logic file names: StudyNumber-HouseholdID-MemberID_anyotherinformation.bin example .bin file, applies .cwa .csv files. example files: 001-002-001_12345-2023.bin 001-002-002_23456-2023.bin 001-002-M_23456-2023.bin recognised household ID 002 member IDs 001, 002, M.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"configuring-ggir","dir":"Articles","previous_headings":"","what":"Configuring GGIR","title":"Household Co-Analysis","text":"following input arguments needed run Household co-analysis: Household co-analysis integrated GGIR part 6, need run GGIR part 1 6, mode = 1:6. windowsizes = c(5, 60, 3600). Setting second value 60 ensures light temperature, available, aggregated per minute. part5_agg2_60seconds = TRUE. ensures GGIR part 5 stores time series 1 minute resolution. part6HCA = TRUE tell GGIR perform Household Co-Analysis. part6_threshold_combi = \"30_100_400\" 30, 100 400 need correspond accelerometer threshold combination used part 5 want use part 6. GGIR part 5 facilitates multiple threshold combinations part 6 need select one. GGIR arguments can set according needs. example:","code":"datadir = \"C:/projects/studyZ/binfiles\" outputdir = \"C:/projects/studyZ\" library(GGIR) GGIR(mode = 1:5, datadir = datadir, idloc = 2, outputdir = outputdir, do.report = c(2, 4, 5), do.parallel = TRUE, overwrite = FALSE, printsummary = TRUE, desiredtz = \"America/Halifax\", windowsizes = c(5, 60, 3600), threshold.lig = 30, threshold.mod = 100, threshold.vig = 400, part6_threshold_combi = \"30_100_400\", boutcriter.in = 1, boutcriter.lig = 1, boutcriter.mvpa = 0.9, boutdur.in = 30, boutdur.lig = 10, boutdur.mvpa = 5, part6HCA = TRUE, save_ms5rawlevels = TRUE, # Not necessary because GGIR will set this to TRUE when part6HCA is TRUE. save_ms5raw_without_invalid = FALSE, # <= Needed for household co-analysis part5_agg2_60seconds = TRUE, visualreport = FALSE)"},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"household-co-analysis","dir":"Articles","previous_headings":"","what":"Household co-analysis","title":"Household Co-Analysis","text":"GGIR part 1, 2, 3, 4, 5 recording processed individually without considering relations recordings. Next, part 6 subdivided alligning time series produced part 1 5 per household, pairwise analysis data.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"align-individuals","dir":"Articles","previous_headings":"Household co-analysis","what":"Align individuals","title":"Household Co-Analysis","text":"Household members one member ignored. Next, per household per household member code loads merges time series produced GGIR part 1 part 5. Days, defined waking-waking-, removed less 20% valid data waking hours, sleep period time window, day whole. Next, time series completed indicates valid household member pairs time points. Finally, store: aligned time series per household separate csv files GGIR output directory (.../results/part6HouseholdCoAnalysis/alignedTimeseries). columns file documented . pdf file names timeseriesPlot.pdf plots aligned time series facilitate visual inspection data completeness per household.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"pairwise-analysis","dir":"Articles","previous_headings":"Household co-analysis","what":"Pairwise analysis","title":"Household Co-Analysis","text":"Per household identify possible member pairs loop pairs. Per member pair code identify wake-time pairs. , wake-times occur within last 15 minutes time series ignored need least recording time quantify behaviour waking . Per wake-pair assess woke first second, time difference, corresponding calendar dates waking . Next, code quantifies: Activity person first woke minute second person woke Activity second person wake woke LUX person first woke tminute second person woke LUX second person wake woke . Describe matching waking hours pairs: Correlation continuous acceleration values (ENMO metric) Derive binary class inactivity/active (ENMO metric, threshold < 50) ICC based binary scores (irr package, model=twoway, type=agreement, unit=single) Cohen’s Kappa (psych package) Similarity binary scores (calculation line Sleep Regularity Index) Describe noon-noon window stronger focus sleep: Describe binary class sleep/wakefulness (note: attempt classify daytime naps) ICC based binary scores (irr package, model=twoway, type=agreement, unit=single) Cohen’s Kappa (psych package) Similarity binary scores (calculation line Sleep Regularity Index) Describe wakefulness dynamics SPT prior wakeup: Look indices spt prior wakeup individuals SPT. Assess fraction data valid Identify wake times night wake-time: Assess whether persons woke time, person wake within 5 minutes, person wake within 5 minutes. Store output csv one row per unique household pair, columns clarify household members pair household .","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"alignedtimesieres","dir":"Articles","previous_headings":"Output variables","what":"alignedTimesieres","title":"Household Co-Analysis","text":"GGIR output folder .../results/part6HouseholdCoAnalysis/alignedTimeseries find csv files time series per household. data dictionary shows column names get household two members: X Y. columns copied time series output files, documented . Therefore, column documented .","code":""},{"path":"https://wadpac.github.io/GGIR/articles/HouseHoldCoanalysis.html","id":"pairwise-summary-report","dir":"Articles","previous_headings":"Output variables","what":"Pairwise summary report","title":"Household Co-Analysis","text":"stored inside pairwise_summary_all_housholds.csv","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Reading csv files with raw data in GGIR","text":"GGIR can automatically read data -frequently used accelerometer brands field: GENEActiv .bin Axivity AX3 AX6 .wav, .csv .cwa ActiGraph .csv .gt3x (.gt3x newer format generated firmware versions 2.5.0). Note Actigraph users: want work .csv exports via ActiLife note option export data timestamps. Please causes memory issues GGIR. cope absence timestamps GGIR re-caculate timestamps sample frequency start time date presented file header Movisens data stored folders Genea (accelerometer commercially available anymore, used studies 2007 2012) .bin .csv However, accelerometer manufacturers proliferating increasing number brands market. reason, GGIR includes read.myacc.csv function, able read accelerometer raw triaxial data stored csv files, independently brand. vignette provides general introduction use GGIR read accelerometer raw data stored csv files. works: Internally GGIR loads csv files accelerometer data standardises output format make data compatible GGIR functions. Data format standardisation includes unit measurement, timestamp, header format, column locations.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"the-read-myacc-csv-function","dir":"Articles","previous_headings":"","what":"The read.myacc.csv function","title":"Reading csv files with raw data in GGIR","text":"rest GGIR functions, read.myacc.csv intended used within function GGIR. arguments read.myacc.csv can easily recognized start “rmc”. GGIR function checks whether argument rmc.firstrow.acc provided user; case, GGIR attempt read data read.myacc.csv. words always need specify rmc.firstrow.acc use read.myacc.csv.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"input-arguments","dir":"Articles","previous_headings":"The read.myacc.csv function","what":"Input arguments","title":"Reading csv files with raw data in GGIR","text":"read.myacc.csv function tries read csv files wide variety formats, key arguments specify depend characteristics csv file process. Overall, argument relevant, left default setting (e.g., csv file contain temperature data, arguments related temperature settings left default values). present summary available input arguments. Please see parameters vignette elaborate description input arguments. , arguments also covered function documentation read.myacc.csv function.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"general-arguments","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"General arguments","title":"Reading csv files with raw data in GGIR","text":"rmc.file - Filename file read working directory, full path file otherwise. rmc.nrow - Number rows read, nrow argument nrows . whole file read default (.e., rmc.nrow = Inf). rmc.skip - Number rows skip, skip argument . rmc.dec - Decimal separator used numbers, dec argument data.table::. “.” (default) usually “,”. rmc.firstrow.acc - First row (number) acceleration data. rmc.unit.acc - Character unit acceleration values: “g”, “mg”, “bit”. rmc.desiredtz - Timezone device worn. rmc.confgitz - Timezone device configured. rmc.sf - Sample rate Hertz, stored file header used instead.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"header","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments for files containing a header","title":"Reading csv files with raw data in GGIR","text":"rmc.firstrow.header - First row (number) header. Leave blank (default) file header. rmc.header.length - file header, specify header length (numeric). rmc.headername.sf - file header, row name (character) sample frequency can found. rmc.headername.sn - file header, row name (character) serial number can found. rmc.headername.recordingid - file header, row name (character) recording ID can found. rmc.header.structure - Character used split header name header value, e.g. “:” ” “.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"arguments-for-files-including-timestamps","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments for files including timestamps","title":"Reading csv files with raw data in GGIR","text":"rmc.col.time - Scalar column (number) timestamps stored. Leave default setting timestamps stored. rmc.unit.time - Character unit timestamps: “POSIX”, “UNIXsec” (seconds since origin, see argument rmc.origin), “character”, “ActivPAL” (exotic timestamp format used ActivPAL activity monitor). rmc.format.time - Character string giving date-time format used . used rmc.unit.time: character POSIX. rmc.origin - Origin time unit time UNIXsec, e.g. 1970-1-1.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"arguments-for-files-with-acceleration-stored-in-bits","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments for files with acceleration stored in bits","title":"Reading csv files with raw data in GGIR","text":"rmc.bitrate - Numeric: unit acceleration bit provide bit rate, e.g. 12 bit. rmc.dynamic_range - Numeric, unit acceleration bit provide dynamic range deviation g zero, e.g. +/-6g mean argument needs 6. give argument character value code search file header elements name equal character value use corresponding numeric value next dynamic range. rmc.unsignedbit - Boolean, unsignedbit = TRUE means bits positive numbers. unsignedbit = FALSE bits positive negative.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"arguments-for-files-including-temperature","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments for files including temperature","title":"Reading csv files with raw data in GGIR","text":"rmc.col.temp - Scalar column (number) temperature stored. Leave default setting temperature avaible. temperature used . rmc.unit.temp - Character unit temperature values: (K)elvin, (C)elsius, (F)ahrenheit.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"arguments-for-files-including-wear-time-information","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments for files including wear time information","title":"Reading csv files with raw data in GGIR","text":"rmc.col.wear - external wear detection outcome stored part data can used GGIR. argument specifies column wear detection (Boolean) stored.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"arguments-to-find-time-gaps-and-resampling","dir":"Articles","previous_headings":"The read.myacc.csv function > Input arguments","what":"Arguments to find time gaps and resampling","title":"Reading csv files with raw data in GGIR","text":"rmc.check4timegaps - Boolean indicate whether gaps time imputed zeros. rmc.doresample - Boolean indicate whether resample data based available timestamps extracted sample rate file header interpolationType - Integer indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"usage-of-the-read-myacc-csv-function","dir":"Articles","previous_headings":"","what":"Usage of the read.myacc.csv function","title":"Reading csv files with raw data in GGIR","text":"section shows example real case read.myacc.csv function can used. csv file read following structure: file contains timestamps column 1 (formatted “%d/%m/%Y %H:%M:%OS”), acceleration signals (g’s) x, y, z axis columns 2, 3, 4, respectively, temperature information Celsius column 5. Also, file header. First, test read file using read.myacc.csv function GGIR follows.","code":"library(GGIR) read.myacc.csv(rmc.file = \"C:/mystudy/mydata/datafile.csv\", rmc.nrow = Inf, rmc.skip = 0, rmc.dec = \".\", rmc.firstrow.acc = 2, rmc.col.acc = 2:4, rmc.col.temp = 5, rmc.col.time=1, rmc.unit.acc = \"g\", rmc.unit.temp = \"C\", rmc.unit.time = \"POSIX\", rmc.format.time = \"%d/%m/%Y %H:%M:%OS\", rmc.desiredtz = \"Europe/London\", rmc.sf = 100)"},{"path":"https://wadpac.github.io/GGIR/articles/readmyacccsv.html","id":"example-using-the-shell-function","dir":"Articles","previous_headings":"Usage of the read.myacc.csv function","what":"Example using the shell function","title":"Reading csv files with raw data in GGIR","text":"rmc.firstrow.acc argument defined within GGIR function, data read read.myacc.csv. GGIR needs user specify row starts accelerometer data within csv, argument must always explicitly specified user. Thus, call GGIR including rmc arguments look follows (note rmc.file, rmc.nrow, rmc.skip arguments used GGIR arguments already defined datadir, strategy, header arguments, respectively).","code":"library(GGIR) GGIR( mode=c(1,2,3,4,5), datadir=\"C:/mystudy/mydata/datafile.csv\", outputdir=\"D:/myresults\", do.report=c(2,4,5), #===================== # read.myacc.csv arguments #===================== rmc.nrow = Inf, rmc.dec = \".\", rmc.firstrow.acc = 2, rmc.col.acc = 2:4, rmc.col.temp = 5, rmc.col.time=1, rmc.unit.acc = \"g\", rmc.unit.temp = \"C\", rmc.unit.time = \"POSIX\", rmc.format.time = \"%d/%m/%Y %H:%M:%OS\", rmc.desiredtz = \"Europe/London\", rmc.sf = 100, rmc.noise = 0.013 )"},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Day segment analyses with GGIR","text":"specific person active morning afternoon? children active work hours leisure time? much inactivity occurs work office workers? Questions like can answered GGIR first specify parameters. main input argument specified qwindow, can used following ways: specify clock hours day based segmented day analyses take place. specify activity log (diary) used guide segmentation per individual per day recording. following sections discuss scenarios.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"clock-hour-based-segmentation","dir":"Articles","previous_headings":"","what":"Clock hour-based segmentation","title":"Day segment analyses with GGIR","text":"perform clock hour segmentation, need provide function GGIR argument qwindow assign numeric vector hours segmentation. start end day, explicitly provided vector GGIR add . Please find example values qwindow. number values used qwindow unlimited, aware analyses MX-metrics impossible small windows produce empty results. Day Saving Time (DST) taken account identifying start day, identifying day segments. words, 23 hour days processed 24 hours first midnight. ensure segment length identical across days week, needed ease comparison outcome variables across days.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"segmentation-guided-by-activity-log","dir":"Articles","previous_headings":"","what":"Segmentation guided by activity log","title":"Day segment analyses with GGIR","text":"perform activity-log based segmentation, need provide function GGIR argument qwindow assign full path activity log .csv format, e.g. qwindow=\"C:/myactivitylog.csv\". activity log expected .csv-file following structure: Rows: First row represents column headers row represents one accelerometer recording. ID-column: first column expected hold recording ID, needs match ID GGIR extracts accelerometer file. unsure format ID values, apply GGIR sample accelerometer files using default argument settings. ID column generated part 2 .csv reports show participant ID extracted GGIR. ID extracted, see documentation argument idloc, helps specify location participant file name file header. ID extraction fails accelerometer files matched corresponding activity log entries. Date-column: ID column followed date column first log day. ensure GGIR recognises date correctly, specify argument qwindow_dateformat. default format \"\\%d-\\%m-\\%Y\" 23-2-2021 indicate 23rd February 2021. date formatted 2-23-21 specify\"\\%m-\\%d-\\%y\". column name date column needs include character combination “date” “Date” “DATE”. Use date format consistently throughout activity diary. Start-times: date column followed one multiple columns start times activity types day format hours:minutes:seconds. provide dates cells. header column used label activity type. Insert new date column continuing activity types next day. Leave missing values empty. Missing values: values missing preceding succeeding time point used edges segment. example means define segment -C ID 1234, ID 6789 defined segments -B B-C, segment -C derived . Notes: - activity log collected individuals processed qwindow value c(0,24). - Dates activity log data can skipped, need column date followed column next date. - end time one activity assumed start time next activity. currently facilitate overlapping time segments.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"implementation-in-ggir","dir":"Articles","previous_headings":"","what":"Implementation in GGIR","title":"Day segment analyses with GGIR","text":"approaches implemented GGIR part 2 part 5. Therefore specific output variables calculated part 2 5 available per day, per person, per segment day based argument qwindow Note qwindow used part 5 timewindow includes \"MM\" (see specific documentation timewindow} parameters vignette) moment, specifying argument qwindow triggers calculation qwindow segments part 2 part 5, may result longer time finish analysis. interested segments either part 2 part 5, option might run GGIR parts 1:2 argument qwindow interest, set qwindow = NULL run GGIR parts 3:5 (vice versa: qwindow = NULL GGIR parts 1:2, desired qwindow segments running GGIR parts 3:5). information output variables calculated part pipeline, see main GGIR vignette.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"examples","dir":"Articles","previous_headings":"","what":"Examples","title":"Day segment analyses with GGIR","text":"information use GGIR function call see explanation main GGIR vignette.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"clock-hour-based-segmentation-1","dir":"Articles","previous_headings":"Examples","what":"Clock-hour based segmentation:","title":"Day segment analyses with GGIR","text":"","code":"library(\"GGIR\") GGIR(datadir = \"/your/data/directory\", outputdir = \"/your/output/directory\", mode = 1:5, # <= run GGIR parts 1 to 5 do.report = c(2, 5), # <= generate csv-report for GGIR part 2 and part 5 qwindow = c(0, 6, 12, 18, 24), timewindow = \"MM\")"},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"activity-log-based-segmentation","dir":"Articles","previous_headings":"Examples","what":"Activity log based segmentation:","title":"Day segment analyses with GGIR","text":"running code GGIR creates output folder output directory specified argument outputdir. subfolder results find csv files reports generated part 2 part 5 pipeline: Part 2 part2_summary.csv recording level summary, 1 row per recording recording level aggregates day segments columns. part2_daysummary.csv day level summary, 1 row per day day segment specific outcomes columns. part2_daysummary_longformat.csv day level summary long format, row represents one segment one day one recording. part2_summary.csv part2_daysummary.csv column names tell day segment correspond . example, column names ending _18-24hr refer time segment 18:00-24:00. part2_daysummary_longformat.csv time segment clarified via columns qwindow_timestamps qwindow_name. Part 5 part 5, information segments days exported different csv reports person-level day-level summaries. files include word “Segments” filename provided long format aggregated per day per person: part5_daysummary_Segments[...].csv day level summary long format, row represents one segment one day one recording. part5_personsummary_Segments[...].csv recording level summary long format, row represents average outcome one specific segments across days segment available per participant.","code":"library(\"GGIR\") GGIR(datadir = \"/your/data/directory\", outputdir = \"/your/output/directory\", mode = 1:5, # <= run GGIR parts 1 to 5 do.report = c(2, 5), # <= generate csv-report for GGIR part 2 and part 5 qwindow = \"/path/to/your/activity/log.csv\", timewindow = \"MM\")"},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"cleaning-parameters-for-day-segments-in-part-5","dir":"Articles","previous_headings":"","what":"Cleaning parameters for day segments (in part 5):","title":"Day segment analyses with GGIR","text":"part 5, analyses performed per segment day come possibility clean reports based information available segments. users can select include segments given amount wear time segment (segmentWEARcrit.part5), well given awake time sleep period time segment (segmentDAYSPTcrit.part5). arguments likely critical meaningful analysis data. presence sleep segment physical activity bias physical inactivity estimates presence physical activity segment sleep bias sleep estimates. become impossible quantify whether lack one presence behaviour drives association example health outcome.","code":""},{"path":"https://wadpac.github.io/GGIR/articles/TutorialDaySegmentAnalyses.html","id":"analyses-performed-per-day-segment","dir":"Articles","previous_headings":"","what":"Analyses performed per day segment","title":"Day segment analyses with GGIR","text":"analyses GGIR per segment day, include: Acceleration distribution (part 2): Derived argument ilevels specified. find variable names [0,36)_ENMO_mg means time spent 0 36 mg defined acceleration metric ENMO. Number valid hours data (part 2): recognise N_valid_hours_in_window tells number valid hours per time window, N_valid_hours number valid hours per day. Non-wear time percentage (part 5): nonwear_day_perc, nonwear_spt_perc, nonwear_day_spt_perc tell proportion segment classified non-wear awake time (day) sleep period time (spt). LXMX analysis (part 2 part5): LXMX analysis, stands least active X hours segment. recognise variable names like L5hr_ENMO_mg start time least active five hours defined metric ENMO, L5_ENMO_mg average acceleration hours. Intensity gradient analysis (part 2 part 5): find variables start ig_gradient_ See description GGIR part 2 output main GGIR vignette details. Time spent Moderate Vigorous Physical Activity (MVPA) (part 2 part 5): find variables MVPA_E5S_T201_ENMO MVPA_E5S_B1M80%_T201_ENMO. See description GGIR part 2 output main GGIR vignette details. Time spent sleeping, inactivity physical activity intensities (part 5): find variables part 5 reports, bouted, unbouted, total time version variables. See description GGIR part 5 output main GGIR vignette details.","code":""},{"path":"https://wadpac.github.io/GGIR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Vincent T van Hees. Author, maintainer. Jairo H Migueles. Author. Severine Sabia. Contributor. Matthew R Patterson. Contributor. Zhou Fang. Contributor. Joe Heywood. Contributor. Joan Capdevila Pujol. Contributor. Lena Kushleyeva. Contributor. Mathilde Chen. Contributor. Manasa Yerramalla. Contributor. Patrick Bos. Contributor. Taren Sanders. Contributor. Chenxuan Zhao. Contributor. Segantin Gaia. Contributor. Medical Research Council UK. Copyright holder, funder. Accelting. Copyright holder, funder. French National Research Agency. Copyright holder, funder.","code":""},{"path":"https://wadpac.github.io/GGIR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"van Hees V, Migueles J, Fang Z, Zhao J, Heywood J, Mirkes E, Sabia S (2024). GGIR: Raw Accelerometer Data Analysis. doi:10.5281/zenodo.1051064, R package version 3.1-2, https://CRAN.R-project.org/package=GGIR. van Hees V, Fang Z, Langford J, Assah F, MohammadMirkes , da Silva , Trenell M, White T, Wareham N, Brage S (2014). “Autocalibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents.” Journal Applied Physiology, 117(7), 738–744. https://doi.org/10.1152/japplphysiol.00421.2014. van Hees V, Sabia S, Anderson K, Denton S, Oliver J, Catt M, Abell J, Kivimaki M, Trenell M, Singh-Manoux (2015). “Novel, Open Access Method Assess Sleep Duration Using Wrist-Worn Accelerometer.” PLoS One, 10(11). doi:10.1371/journal.pone.0142533, https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0142533. van Hees V, Sabia S, Jones S, Wood , Anderson K, Kivimaki M, Frayling T, Pack , Bucan M, Trenell M, Mazzotti D, Gehrman P, Singh-Manoux , Weedon M (2018). “Estimating sleep parameters using accelerometer without sleep diary.” Scientific Reports, 8(1). doi:10.1038/s41598-018-31266-z, https://www.nature.com/articles/s41598-018-31266-z. Migueles J, Rowlands , Huber F, Sabia S, van Hees V (2019). “GGIR: Research Community-Driven Open Source R Package Generating Physical Activity Sleep Outcomes Multi-Day Raw Accelerometer Data.” Journal Measurement Physical Behavior, 2(3). doi:10.1123/jmpb.2018-0063, https://doi.org/10.1123/jmpb.2018-0063.","code":"@Manual{, title = {{GGIR}: Raw Accelerometer Data Analysis}, author = {Vincent T {van Hees} and Jairo H Migueles and Zhou Fang and Jing Hua Zhao and Joe Heywood and Evgeny Mirkes and Severine Sabia}, year = {2024}, note = {R package version 3.1-2}, doi = {10.5281/zenodo.1051064}, url = {https://CRAN.R-project.org/package=GGIR}, } @Article{, title = {Autocalibration of accelerometer data for free-living physical activity assessment using local gravity and temperature: an evaluation on four continents}, author = {Vincent T {van Hees} and Zhou Fang and Joss Langford and Felix Assah and A MohammadMirkes and Inacio C {da Silva} and Michael I Trenell and Tom White and Nicholas J Wareham and Soren Brage}, journal = {Journal of Applied Physiology}, volume = {117}, number = {7}, pages = {738--744}, year = {2014}, url = {https://doi.org/10.1152/japplphysiol.00421.2014}, } @Article{, title = {A Novel, Open Access Method to Assess Sleep Duration Using a Wrist-Worn Accelerometer}, author = {Vincent T {van Hees} and Severine Sabia and Kirstie N Anderson and Sarah J Denton and James Oliver and Michael Catt and Jesica G Abell and Mika Kivimaki and Michael I Trenell and Archana Singh-Manoux}, doi = {10.1371/journal.pone.0142533}, journal = {PLoS One}, volume = {10}, number = {11}, year = {2015}, url = {https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0142533}, } @Article{, title = {Estimating sleep parameters using an accelerometer without sleep diary}, author = {Vincent T {van Hees} and Severine Sabia and Samuel E Jones and Andrew R Wood and Kirstie N Anderson and Mika Kivimaki and Tim M Frayling and Allan I Pack and Maja Bucan and Michael I Trenell and Diego R Mazzotti and Philip R Gehrman and Archana Singh-Manoux and Michael N Weedon}, doi = {10.1038/s41598-018-31266-z}, journal = {Scientific Reports}, volume = {8}, number = {1}, year = {2018}, url = {https://www.nature.com/articles/s41598-018-31266-z}, } @Article{, title = {GGIR: A Research Community-Driven Open Source R Package for Generating Physical Activity and Sleep Outcomes From Multi-Day Raw Accelerometer Data}, author = {Jairo H Migueles and Alex V Rowlands and Florian Huber and Severine Sabia and Vincent T {van Hees}}, doi = {10.1123/jmpb.2018-0063}, journal = {Journal for the Measurement of Physical Behavior}, volume = {2}, number = {3}, year = {2019}, url = {https://doi.org/10.1123/jmpb.2018-0063}, }"},{"path":[]},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"interest fostering open welcoming environment, contributors maintainers pledge making participation project community harassment-free experience everyone, regardless age, body size, disability, ethnicity, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation.","code":""},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes creating positive environment include: Using welcoming inclusive language respectful differing viewpoints experiences Gracefully accepting constructive criticism Focusing best community Showing empathy towards community members Examples unacceptable behavior participants include: use sexualized language imagery unwelcome sexual attention advances Trolling, insulting/derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical electronic address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"our-responsibilities","dir":"","previous_headings":"","what":"Our Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Project maintainers responsible clarifying standards acceptable behavior expected take appropriate fair corrective action response instances unacceptable behavior. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, ban temporarily permanently contributor behaviors deem inappropriate, threatening, offensive, harmful.","code":""},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within project spaces public spaces individual representing project community. Examples representing project community include using official project e-mail address, posting via official social media account, acting appointed representative online offline event. Representation project may defined clarified project maintainers.","code":""},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported contacting main project maintainer v.vanhees@accelting.com. complaints reviewed investigated result response deemed necessary appropriate circumstances. project team obligated maintain confidentiality regard reporter incident. details specific enforcement policies may posted separately.","code":""},{"path":"https://wadpac.github.io/GGIR/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 1.4, available https://www.contributor-covenant.org/version/1/4/code--conduct.html","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing guidelines","title":"Contributing guidelines","text":"welcome kind contribution software, simple comment question full fledged pull request. Please read follow Code Conduct. contribution can one following cases: question; think may found bug (including unexpected behavior); want make kind change code base (e.g. fix bug, add new feature, update documentation); want make new release code base. sections outline steps case.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"questions","dir":"","previous_headings":"","what":"Questions","title":"Contributing guidelines","text":"use search functionality see someone already experienced issue; search yield relevant results, start new conversation.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"bugs","dir":"","previous_headings":"","what":"Bugs","title":"Contributing guidelines","text":"use search functionality see someone already filed issue; issue search yield relevant results, make new issue, choose Bug report type. includes checklist make sure provide enough information rest community understand cause context problem.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"changes-or-additions","dir":"","previous_headings":"","what":"Changes or additions","title":"Contributing guidelines","text":"(important) announce plan rest community start working. announcement form (new) issue. Choose Feature request type, includes checklist things consider get discussion going; (important) wait kind consensus reached idea good idea; needed, fork repository Github profile create feature branch latest master commit. working feature branch, make sure stay date master branch pulling changes, possibly ‘upstream’ repository (follow instructions ); make sure existing tests still work running test suite RStudio; add tests (necessary); update expand documentation, see package documentation guidelines; make sure release notes inst/NEWS.Rd updated; add name contributors lists DESCRIPTION file; push feature branch (fork ) GGIR repository GitHub; create pull request, e.g. following instructions . pull request template includes checklist items. case feel like ’ve made valuable contribution, don’t know write run tests , generate documentation: don’t let discourage making pull request; can help ! Just go ahead submit pull request, keep mind might asked append additional commits pull request.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"coding-style","dir":"","previous_headings":"Changes or additions","what":"Coding style","title":"Contributing guidelines","text":"loosely follow tidyverse style guide, enforce every rule strictly. instance, prefer = instead <- default assignment operator. doubt style use, don’t hesitate get touch. general guidelines try adhere : Use standard R much possible, keep dependencies minimum. Keep loops minimum. Don’t make lines long. first time contributor, don’t worry coding style much. help get things shape.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"package-documentation","dir":"","previous_headings":"Changes or additions","what":"Package documentation","title":"Contributing guidelines","text":"currently three sources documenting package: reference manual, including package basic information functions documentation files. package vignettes. github.io website (built pkgdown package).","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"reference-manual","dir":"","previous_headings":"Changes or additions > Package documentation","what":"Reference manual","title":"Contributing guidelines","text":"reference manual gets information .Rd documents within man folder package repository. Therefore, updating information files automatically update reference manual. Note GGIR functions intended direct interaction user, , documentation arguments centralized details section man/GGIR.Rd. example want add extra parameter params_247 documented . , forget include new argument functions .","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"package-vignettes","dir":"","previous_headings":"Changes or additions > Package documentation","what":"Package vignettes","title":"Contributing guidelines","text":"folder vignettes GGIR repository contains .Rmd files. .Rmd files start word ‘chapter’ used traditional package vignettes hosted CRAN. Use files edit existing vignette, use structure vignettes build new one. .Rmd files name starts word ‘chapter’ ignored. chapter-vignettes used github.io website (see next section). create new vignette CRAN create new package vignette CRAN, please use usethis::use_vignette() make sure name vignette file start “chapter”. example, want create new vignette sleep CRAN, may following: create new “sleep.Rmd” file within vignettes folder GGIR repository. can edit file build vignette. remove vignette CRAN two ways remove vignette CRAN: Removing Rmd file corresponding vignette vignettes folder, note file information lost. Adding path vignette .Rbuildignore file available GGIR repository. example, remove GGIRParameters vignette CRAN, can add:","code":"usethis::use_vignette(name = \"sleep\", title = \"How to analyse your sleep data in GGIR\") ^vignettes/GGIRParameters.Rmd"},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"githubio-website","dir":"","previous_headings":"Changes or additions > Package documentation","what":"github.io website","title":"Contributing guidelines","text":"updating adding information github.io website, need use pkgdown configuration file can found repositories root directory, well chapter vignettes discussed . edit information existing chapter Open vignette corresponding chapter wish edit (see _pkgdown.yml) file chapter vignette path (href). Make changes vignette. Run pkgdown::build_site() function. add new chapter Create Rmd file vignette via usethis::use_vignette() make sure name vignette starts “chapter”, example: Open _pkgdown.yml file fill name reference new chapter menu. Make sure follow coding structure rest chapters. Run pkgdown::build_site() function. remove chapter Remove lines corresponding chapter _pkgdown.yml file line 42 onwards. Optionally may remove Rmd file corresponding chapter, step 1, chapter appear github.io website. Run pkgdown::build_site() function. edit name chapter Chapter names defined twice, _pkgdown.yml file vignette file . need make sure titles match first used drop-list github.io website specific page chapter.","code":"usethis::use_vignette(name = \"chapterSleep\", title = \"10. How to analyse your sleep data in GGIR\")"},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"adding-the-changes-to-the-master-branch","dir":"","previous_headings":"Changes or additions > Package documentation","what":"Adding the changes to the master branch","title":"Contributing guidelines","text":"last step committing pushing changes github making pull request contribution package. Note , running pkgdown::build_site() function edit files within docs folder, probably add new files. applies editing information github.io website. important changes files docs folder also part pull requests, otherwise website updated.","code":""},{"path":"https://wadpac.github.io/GGIR/CONTRIBUTING.html","id":"new-release","dir":"","previous_headings":"","what":"New release","title":"Contributing guidelines","text":"GGIR follows release cycle process described document.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/appendRecords.html","id":null,"dir":"Reference","previous_headings":"","what":"Append GGIR milestone data from neighbouring or overlapping recordings — appendRecords","title":"Append GGIR milestone data from neighbouring or overlapping recordings — appendRecords","text":"Append GGIR part 1 milestone data format neighbouring overlapping recording. recordings overlap use data newest recordings. time gap larger 2 days recordings appended. intended direct use user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/appendRecords.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Append GGIR milestone data from neighbouring or overlapping recordings — appendRecords","text":"","code":"appendRecords(metadatadir, desiredtz = \"\", idloc = 1, maxRecordingInterval = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/appendRecords.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Append GGIR milestone data from neighbouring or overlapping recordings — appendRecords","text":"metadatadir See g.part2 desiredtz See GGIR idloc See GGIR maxRecordingInterval See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/appendRecords.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Append GGIR milestone data from neighbouring or overlapping recordings — appendRecords","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyCosinorAnalyses.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply Cosinor Analyses to time series — applyCosinorAnalyses","title":"Apply Cosinor Analyses to time series — applyCosinorAnalyses","text":"Wrapper function around cosinorAnalyses first prepares time series applying cosinorAnlayses","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyCosinorAnalyses.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply Cosinor Analyses to time series — applyCosinorAnalyses","text":"","code":"applyCosinorAnalyses(ts, qcheck, midnightsi, epochsizes)"},{"path":"https://wadpac.github.io/GGIR/reference/applyCosinorAnalyses.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply Cosinor Analyses to time series — applyCosinorAnalyses","text":"ts Data.frame timestamps acceleration metric. qcheck Vector equal length number rows ts value 1 invalid timestamps, 0 otherwise. midnightsi Indices midnights time series epochsizes Epoch size ts qcheck respectively","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyCosinorAnalyses.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Apply Cosinor Analyses to time series — applyCosinorAnalyses","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply external function to acceleration data. — applyExtFunction","title":"Apply external function to acceleration data. — applyExtFunction","text":"Applies external function raw acceleration data within GGIR. makes easier new algorithms developed pilotted accelerometer data taking advantage existing comprehensive GGIR data management analysis infrastructure. function direct interaction user, please supply object myfun GGIR g.part1. Object myfun list detailed .","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply external function to acceleration data. — applyExtFunction","text":"","code":"applyExtFunction(data, myfun, sf, ws3, interpolationType=1)"},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply external function to acceleration data. — applyExtFunction","text":"data Data data.frame present internally g.getmeta. least four columns first timestamp followed x, y, z acceleration. myfun See details, short: myfun list object holds external function applied data various parameters aid process. sf Sample frequency (Hertz) data object ws3 Short epoch size (first value windowsizes g.getmeta). interpolationType Integer indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Apply external function to acceleration data. — applyExtFunction","text":"output external algorithm aggregated repeated fit short epoch length GGIR. Therefore, short epoch length GGIR multitude resolution external function output, visa versa.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Apply external function to acceleration data. — applyExtFunction","text":"See package vignette detailed tutorial examples use function embedding: https://cran.r-project.org/web/package=GGIR/vignettes/applyExtFunction.pdf Function applyExtFunction typically used GGIR user directly.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/applyExtFunction.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Apply external function to acceleration data. — applyExtFunction","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"Calculates Sleep Regularity Index per day pair proposed Phillips colleagues 2017 expanded day-pair level estimates.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"","code":"CalcSleepRegularityIndex(data = c(), epochsize = c(), desiredtz= c())"},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"data Data.frame produced function g.sib.det. epochsize Numeric value epoch size seconds. desiredtz Character timezone database name, see also g.getmeta","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"Data.frame columns: day (day number); Sleep Regularity Index, definition must lie range -100 (reversed regularity), 0 (random pattern), 100 (perfect regularity); weekday (e.g. Wednesday); frac_valid, number 0 1 indicating fraction 24 hour period valid data available current next day, ; date.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"Calculates Sleep Regularity Index per day pair. Absense missing data used criteria calculation. Instead code asses fraction time matching valid data points found days. Later g.part4 fraction used include exclude days based excludenightcrit criteria also uses sleep variables. g.report.part4 day-level SRI values stored, also aggregated across recording days, weekend days, weekend days, respectively. Therefore, function broader functionality algorithm proposed Phillips colleagues 2017.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/CalcSleepRegularityIndex.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculates Sleep Regularity Index — CalcSleepRegularityIndex","text":"Andrew J. K. Phillips, William M. Clerx, et al. Irregular sleep/wake patterns associated poorer academic performance delayed circadian sleep/wake timing. Scientific Reports. 2017 June 12","code":""},{"path":"https://wadpac.github.io/GGIR/reference/checkMilestoneFolders.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks for existence of folders to process — checkMilestoneFolders","title":"Checks for existence of folders to process — checkMilestoneFolders","text":"Checks whether milestone folders exist, create needed, check whether folders empty. done part 1 5 part 6, different handled inside g.part6.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/checkMilestoneFolders.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks for existence of folders to process — checkMilestoneFolders","text":"","code":"checkMilestoneFolders(metadatadir, partNumber)"},{"path":"https://wadpac.github.io/GGIR/reference/checkMilestoneFolders.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks for existence of folders to process — checkMilestoneFolders","text":"metadatadir Character, path root outputfolder. partNumber Numeric, number set 2, 3, 4 5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/checkMilestoneFolders.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks for existence of folders to process — checkMilestoneFolders","text":"value produced","code":""},{"path":"https://wadpac.github.io/GGIR/reference/checkMilestoneFolders.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Checks for existence of folders to process — checkMilestoneFolders","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_log.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to revise format of user-provided logs — check_log","title":"Function to revise format of user-provided logs — check_log","text":"Function revise format missing values dates user-provided","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_log.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to revise format of user-provided logs — check_log","text":"","code":"check_log(log, dateformat, colid = 1, datecols = c(), logPath, logtype)"},{"path":"https://wadpac.github.io/GGIR/reference/check_log.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to revise format of user-provided logs — check_log","text":"log Data frame log read data.table::fread. dateformat Character specifying expected date format used log. colid Numeric column containing file ID. datecols Numeric column/s containing dates. logPath Character containing full path activity log checked. logtype Character accepts \"activity log\" \"study dates log\" moment. used warning messages.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_log.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to revise format of user-provided logs — check_log","text":"Data.frame containing revised log.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_log.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to revise format of user-provided logs — check_log","text":"Vincent T van Hees Jairo H Migueles ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_myfun.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks myfun object before it is passed to applyExtfunction — check_myfun","title":"Checks myfun object before it is passed to applyExtfunction — check_myfun","text":"Checks object myfun list check elements list : element names expected, value element expected type length.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_myfun.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks myfun object before it is passed to applyExtfunction — check_myfun","text":"","code":"check_myfun(myfun, windowsizes)"},{"path":"https://wadpac.github.io/GGIR/reference/check_myfun.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks myfun object before it is passed to applyExtfunction — check_myfun","text":"myfun See applyExtFunction windowsizes See g.getmeta).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_myfun.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks myfun object before it is passed to applyExtfunction — check_myfun","text":"0 checkes passed, 1 one checks pass. Error message printed console feedback checks pass.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_myfun.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Checks myfun object before it is passed to applyExtfunction — check_myfun","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Check default parameters — check_params","title":"Check default parameters — check_params","text":"Checks parameter objects class logical combinations. Called extract_params. intended direct use GGIR users.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check default parameters — check_params","text":"","code":"check_params(params_sleep = c(), params_metrics = c(), params_rawdata = c(), params_247 = c(), params_phyact = c(), params_cleaning = c(), params_output = c(), params_general = c())"},{"path":"https://wadpac.github.io/GGIR/reference/check_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check default parameters — check_params","text":"params_sleep List sleep parameters params_metrics List parameters related metrics params_rawdata List parameters related raw data reading processing params_247 List parameters related 24/7 behavioural analysis, includes anything fit physical activity sleep research params_phyact List parameters related physical activity analysis params_cleaning List parameters related cleaning time series, including masking imputation params_output List parameters related GGIR stores output params_general List parameters related general topics","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check default parameters — check_params","text":"Lists updated parameter objects","code":""},{"path":"https://wadpac.github.io/GGIR/reference/check_params.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check default parameters — check_params","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/convertEpochData.html","id":null,"dir":"Reference","previous_headings":"","what":"convert external Epoch data to GGIR part 1 milestone data format — convertEpochData","title":"convert external Epoch data to GGIR part 1 milestone data format — convertEpochData","text":"convert externally created Epoch data GGIR part 1 milestone data format. Function intended direct use user. aim allow using GGIR top extrnally derived epoch data. See argument dataFormat GGIR details use functionality.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/convertEpochData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"convert external Epoch data to GGIR part 1 milestone data format — convertEpochData","text":"","code":"convertEpochData(datadir = c(), metadatadir = c(), params_general = c(), verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/convertEpochData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"convert external Epoch data to GGIR part 1 milestone data format — convertEpochData","text":"datadir See GGIR metadatadir See GGIR params_general Parameters object see GGIR verbose See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/convertEpochData.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"convert external Epoch data to GGIR part 1 milestone data format — convertEpochData","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/correctOlderMilestoneData.html","id":null,"dir":"Reference","previous_headings":"","what":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","title":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","text":"older versions GGIR stored milestone data part 1 factor. function identifies occurs convert affected columns appropriate class (e.g., numeric).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/correctOlderMilestoneData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","text":"","code":"correctOlderMilestoneData(x)"},{"path":"https://wadpac.github.io/GGIR/reference/correctOlderMilestoneData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","text":"x Data frame metashort metalong data generated g.part1","code":""},{"path":"https://wadpac.github.io/GGIR/reference/correctOlderMilestoneData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","text":"Data frame class fixed appropriate columns (.e., light temperature columns)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/correctOlderMilestoneData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Corrects milestone data from g.part1 generated in older GGIR versions — correctOlderMilestoneData","text":"","code":"if (FALSE) { # \\dontrun{ correctOlderMilestoneData(x) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/cosinorAnalyses.html","id":null,"dir":"Reference","previous_headings":"","what":"Apply cosinor anlaysis and extended cosinor analysis — cosinorAnalyses","title":"Apply cosinor anlaysis and extended cosinor analysis — cosinorAnalyses","text":"Applies cosinor anlaysis ActCR package time series","code":""},{"path":"https://wadpac.github.io/GGIR/reference/cosinorAnalyses.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Apply cosinor anlaysis and extended cosinor analysis — cosinorAnalyses","text":"","code":"cosinorAnalyses(Xi, epochsize = 60, timeOffsetHours = 0)"},{"path":"https://wadpac.github.io/GGIR/reference/cosinorAnalyses.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Apply cosinor anlaysis and extended cosinor analysis — cosinorAnalyses","text":"Xi Vector time series movement indicators epochsize Numeric epochsize seconds timeOffsetHours Numeric time hours relative next midnight","code":""},{"path":"https://wadpac.github.io/GGIR/reference/cosinorAnalyses.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Apply cosinor anlaysis and extended cosinor analysis — cosinorAnalyses","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/createConfigFile.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates Config File based on variables in function GGIR environment — createConfigFile","title":"Creates Config File based on variables in function GGIR environment — createConfigFile","text":"used inside GGIR. intended direct use user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/createConfigFile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates Config File based on variables in function GGIR environment — createConfigFile","text":"","code":"createConfigFile(config.parameters = c(), GGIRversion = \"\")"},{"path":"https://wadpac.github.io/GGIR/reference/createConfigFile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates Config File based on variables in function GGIR environment — createConfigFile","text":"config.parameters List arguments used GGIR. GGIRversion GGIR version mumber incorported ConfigFile.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/createConfigFile.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Creates Config File based on variables in function GGIR environment — createConfigFile","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_acc_csv.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates csv data file for testing purposes — create_test_acc_csv","title":"Creates csv data file for testing purposes — create_test_acc_csv","text":"Creates file Actigraph csv data format dummy data can used testing. file includes accelerometer data bouts higher acceleration, variations non-movement periods range accelerometer positions allow testing auto-calibration functionality.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_acc_csv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates csv data file for testing purposes — create_test_acc_csv","text":"","code":"create_test_acc_csv(sf=3,Nmin=2000,storagelocation=c(), start_time = NULL, starts_at_midnight = FALSE)"},{"path":"https://wadpac.github.io/GGIR/reference/create_test_acc_csv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates csv data file for testing purposes — create_test_acc_csv","text":"sf Sample frequency Hertz, default low minimize file size Nmin Number minutes (minimum 720) storagelocation Location test file named testfile.csv stored value provided function uses current working directory start_time Start time recording, hh:mm:ss format. starts_at_midnight Boolean indicating whether recording start midnight. Ignored start_time specified.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_acc_csv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates csv data file for testing purposes — create_test_acc_csv","text":"function produce output values. file stored","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_acc_csv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates csv data file for testing purposes — create_test_acc_csv","text":"","code":"if (FALSE) { # \\dontrun{ create_test_acc_csv() } # }"},{"path":"https://wadpac.github.io/GGIR/reference/create_test_sleeplog_csv.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","title":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","text":"Creates sleeplog file format expected g.part4 dummy data (23:00 onset, 07:00 waking time every night).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_sleeplog_csv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","text":"","code":"create_test_sleeplog_csv(Nnights = 7, storagelocation = c(), advanced = FALSE, sep = \",\", begin_date = \"2016/06/25\")"},{"path":"https://wadpac.github.io/GGIR/reference/create_test_sleeplog_csv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","text":"Nnights Number nights (minimum 1) storagelocation Location test file named testfile.csv stored value provided function uses current working directory advanced Boolean indicate whether create advanced sleeplog also includes logs nap times nonwear sep Character indicate column separator csv file. begin_date Character indicate first date (format \"2016/06/25\") used advanced sleeplog format. Ignored generated basic sleeplog format.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_sleeplog_csv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","text":"function produce output values. file stored","code":""},{"path":"https://wadpac.github.io/GGIR/reference/create_test_sleeplog_csv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Creates csv sleeplog file for testing purposes — create_test_sleeplog_csv","text":"","code":"if (FALSE) { # \\dontrun{ create_test_sleeplog_csv() } # }"},{"path":"https://wadpac.github.io/GGIR/reference/data.calibrate.html","id":null,"dir":"Reference","previous_headings":"","what":"Example output from g.calibrate — data.calibrate","title":"Example output from g.calibrate — data.calibrate","text":"data.calibrate example output g.calibrate","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.calibrate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example output from g.calibrate — data.calibrate","text":"","code":"data(data.calibrate)"},{"path":"https://wadpac.github.io/GGIR/reference/data.calibrate.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example output from g.calibrate — data.calibrate","text":"format : chr \"data.calibrate\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.calibrate.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example output from g.calibrate — data.calibrate","text":"data collected one individual testing purposes","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.calibrate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example output from g.calibrate — data.calibrate","text":"","code":"data(data.calibrate)"},{"path":"https://wadpac.github.io/GGIR/reference/data.getmeta.html","id":null,"dir":"Reference","previous_headings":"","what":"Example output from g.getmeta — data.getmeta","title":"Example output from g.getmeta — data.getmeta","text":"data.getmeta example output g.getmeta","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.getmeta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example output from g.getmeta — data.getmeta","text":"","code":"data(data.getmeta)"},{"path":"https://wadpac.github.io/GGIR/reference/data.getmeta.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example output from g.getmeta — data.getmeta","text":"format : chr \"data.getmeta\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.getmeta.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example output from g.getmeta — data.getmeta","text":"data collected one individual testing purposes","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.getmeta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example output from g.getmeta — data.getmeta","text":"","code":"data(data.getmeta)"},{"path":"https://wadpac.github.io/GGIR/reference/data.inspectfile.html","id":null,"dir":"Reference","previous_headings":"","what":"Example output from g.inspectfile — data.inspectfile","title":"Example output from g.inspectfile — data.inspectfile","text":"data.inspectfile example output g.inspectfile","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.inspectfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Example output from g.inspectfile — data.inspectfile","text":"","code":"data(data.inspectfile)"},{"path":"https://wadpac.github.io/GGIR/reference/data.inspectfile.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Example output from g.inspectfile — data.inspectfile","text":"format : chr \"data.inspectfile\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.inspectfile.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Example output from g.inspectfile — data.inspectfile","text":"data collected one individual testing purposes","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.inspectfile.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Example output from g.inspectfile — data.inspectfile","text":"","code":"data(data.inspectfile)"},{"path":"https://wadpac.github.io/GGIR/reference/data.metalong.html","id":null,"dir":"Reference","previous_headings":"","what":"Metalong object as part of part 1 milestone data — data.metalong","title":"Metalong object as part of part 1 milestone data — data.metalong","text":"data.metalong example metalong data.frame stored g.part1","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.metalong.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Metalong object as part of part 1 milestone data — data.metalong","text":"","code":"data(data.metalong)"},{"path":"https://wadpac.github.io/GGIR/reference/data.metalong.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Metalong object as part of part 1 milestone data — data.metalong","text":"format : chr \"data.metalong\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.metalong.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Metalong object as part of part 1 milestone data — data.metalong","text":"data collected one individual testing purposes","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.metalong.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Metalong object as part of part 1 milestone data — data.metalong","text":"","code":"data(data.metalong)"},{"path":"https://wadpac.github.io/GGIR/reference/data.ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Time series data.frame stored by part 5 — data.ts","title":"Time series data.frame stored by part 5 — data.ts","text":"data.ts example data.frame stored g.part5","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Time series data.frame stored by part 5 — data.ts","text":"","code":"data(data.ts)"},{"path":"https://wadpac.github.io/GGIR/reference/data.ts.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Time series data.frame stored by part 5 — data.ts","text":"format : chr \"data.ts\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.ts.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Time series data.frame stored by part 5 — data.ts","text":"data collected one individual testing purposes matches data object data.metalong","code":""},{"path":"https://wadpac.github.io/GGIR/reference/data.ts.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Time series data.frame stored by part 5 — data.ts","text":"","code":"data(data.ts)"},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":null,"dir":"Reference","previous_headings":"","what":"Generates vector of file names out of datadir input argument — datadir2fnames","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"Uses input argument datadir g.part1 output isfilelist generate vector filenames","code":""},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"","code":"datadir2fnames(datadir,filelist)"},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"datadir See g.part1 filelist Produced isfilelist","code":""},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"Character vector filenames","code":""},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/datadir2fnames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generates vector of file names out of datadir input argument — datadir2fnames","text":"","code":"if (FALSE) { # \\dontrun{ datadir2fnames(datadir = \"C:/mydatafolder\",filelist=TRUE) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":null,"dir":"Reference","previous_headings":"","what":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"Detects periods accelerometer worn accelerometer signal stuck close dynamic range limit accelerometer.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"","code":"detect_nonwear_clipping(data = c(), windowsizes = c(5, 900, 3600), sf = 100, clipthres = 7.5, sdcriter = 0.013, racriter = 0.05, nonwear_approach = \"2013\", params_rawdata = c())"},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"data Matrix raw accelerometer data X, Y, Z axes. windowsizes Numeric vector length three, short, long epoch window size seconds. sf Sample frequency Hertz. clipthres Threschold detect clipping _g_ units. Usually 0.5 _g_ dynamic range accelerometer. sdcriter Criteria define non-wear time, defined estimated noise measured raw accelerometer data. racriter Absolute criteria absolute range accelerations define non-wear time. nonwear_approach Whether use traditional version non-wear detection algorithm (nonwear_approach = \"2013\", default) new version (nonwear_approach = \"2023\"). 2013 version use longsize window (windowsizes[3], one hour default) check conditions nonwear identification flag nonwear mediumsize window (windowsizes[2], 15 min default) middle. 2023 version differs flag nonwear full longsize window. 2013 method longsize window centered centre mediumsize window, 2023 method longsizewindow aligned left edge left edge mediumsize window. params_rawdata See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"List containing next numeric vectors: NWav (non-wear score), 1 3 indicating number axes met non wear criteria. CWav (clipping score), binary, 0-1 indicating non-clipping clipping, respectively. nmin minimum numebr windows block data. number vectors represent long epoch duration (.e., ws2, 900 seconds default).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"Vincent T van Hees Jairo Hidalgo Migueles ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"van Hees et al. 2011, doi: 10.1371/journal.pone.0022922. van Hees et al. 2013, doi: 10.1371/journal.pone.0061691 (supplementary material).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/detect_nonwear_clipping.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Detect non-wear and clipping time in the raw accelerometer data — detect_nonwear_clipping","text":"","code":"if (FALSE) { # \\dontrun{ detect_nonwear_clipping(data = data, windowsizes = c(900, 3600), sf = sf, clipthres = clipthres, sdcriter = sdcriter, racriter = racriter, nonwear_approach = \"old\") } # }"},{"path":"https://wadpac.github.io/GGIR/reference/extractID.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract ID from file header object — extractID","title":"Extract ID from file header object — extractID","text":"Extract ID file header object.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extractID.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract ID from file header object — extractID","text":"","code":"extractID(hvars, idloc, fname)"},{"path":"https://wadpac.github.io/GGIR/reference/extractID.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract ID from file header object — extractID","text":"hvars Object extracted g.inspectfile idloc See GGIR fname File (base)name.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extractID.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract ID from file header object — extractID","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extract_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract parameters from input and add them to params — extract_params","title":"Extract parameters from input and add them to params — extract_params","text":"Extracts parameters separately provided input adds params objects. intended direct use GGIR users.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extract_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract parameters from input and add them to params — extract_params","text":"","code":"extract_params(params_sleep = c(), params_metrics = c(), params_rawdata = c(), params_247 = c(), params_phyact = c(), params_cleaning = c(), params_output = c(), params_general = c(), input = c(), configfile_csv = c(), params2check = c(\"sleep\", \"metrics\", \"rawdata\", \"247\", \"phyact\", \"cleaning\", \"output\", \"general\"))"},{"path":"https://wadpac.github.io/GGIR/reference/extract_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract parameters from input and add them to params — extract_params","text":"params_sleep List sleep parameters params_metrics List parameters related metrics params_rawdata List parameters related raw data reading processing params_247 List parameters related 24/7 behavioural analysis, includes anything fit physical activity sleep research params_phyact List parameters related physical activity analysis params_cleaning List parameters related cleaning time series, including masking imputation params_output List parameters related GGIR stores output params_general List parameters related general topics input objects provided users configfile_csv Csv configuration file params2check Character vector indicate params objects need checked. allows us prevent function checking params objects used context function extract_params used.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extract_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract parameters from input and add them to params — extract_params","text":"Lists updated parameter objects","code":""},{"path":"https://wadpac.github.io/GGIR/reference/extract_params.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract parameters from input and add them to params — extract_params","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.abr.day.names.html","id":null,"dir":"Reference","previous_headings":"","what":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","title":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","text":"Abbreviates daynames Monday becomes MON Sunday becomes SUN","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.abr.day.names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","text":"","code":"g.abr.day.names(daynames)"},{"path":"https://wadpac.github.io/GGIR/reference/g.abr.day.names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","text":"daynames Vector daynames character format","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.abr.day.names.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.abr.day.names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Abbreviates daynames to numbers, needed for report generation in g.plot5 — g.abr.day.names","text":"","code":"daynames = c(\"Monday\",\"Friday\") daynames_converted = g.abr.day.names(daynames)"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.avday.html","id":null,"dir":"Reference","previous_headings":"","what":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","text":"Generatess average day analyses fills corresponding output matrix, g.analyse.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.avday.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","text":"","code":"g.analyse.avday(doquan, averageday, M, IMP, t_TWDI, quantiletype, ws3, doiglevels, firstmidnighti, ws2, midnightsi, params_247 = c(), qcheck = c(), acc.metric = c(), ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.avday.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","text":"doquan Boolean whether quantile analysis done averageday produced g.impute M produced g.getmeta IMP produced g.impute t_TWDI qwindow described g.analyse quantiletype see g.analyse ws3 Epoch size seconds doiglevels Boolean indicate whether iglevels calculated firstmidnighti see g.detecmidnight ws2 see g.weardec midnightsi see g.detecmidnight params_247 See g.part2 qcheck Vector indicators data valid (value=0) invalid (value=1). acc.metric Character, see g.part1. , used decided acceleration metric use IVIS cosinor analyses. ... argument used previous version g.analyse.avday, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.avday.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","text":"InterdailyStability IntradailyVariability igfullr_names igfullr QUAN qlevels_names ML5AD ML5AD_names","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.avday.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.avy","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"Analyses output functions within packages generate basic descriptive summary accelerometer data file. Analyses include: Average acceleration per day, per measurement, L5M5 analyses (assessment five hours lowest acceleration highest acceleration). , traditionally popular variable MVPA automatically extracted six variants: without bout criteria combination epoch = epoch length defined g.getmeta (first value input argument windowsizes), 1 minute, 5 minutes, bout durations 1 minute, 5 minutes 10 minutes combination epoch length defined g.getmeta.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"","code":"g.analyse(I, C, M, IMP, params_247 = c(), params_phyact = c(), params_general = c(), params_cleaning = c(), quantiletype = 7, myfun = c(), ID, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"output function g.inspectfile C output function g.calibrate M output function g.getmeta IMP output function g.impute params_247 See GGIR params_phyact See GGIR params_general See GGIR params_cleaning See GGIR quantiletype type quantile function use (default recommended). details, see quantile function STATS package myfun External function object applied raw data, see g.getmeta. ID ID extracted g.part2. ... argument used previous version g.analyse, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"g.analyse generated two data,franeL summary summary file analysed daysummary summary per day file analysed data.frames used function g.report.part2 generate csv reports. exaplantion columns data.frame subsequent csv reports can found package vignette (Output part 2).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to analsyse meta-data generated by g.getmeta and g.impute — g.analyse","text":"","code":"data(data.getmeta) data(data.inspectfile) data(data.calibrate) if (FALSE) { # \\dontrun{ #inspect file: I = g.inspectfile(datafile) #autocalibration: C = g.calibrate(datafile) #get meta-data: M = g.getmeta(datafile, desiredtz = \"Europe/London\", windowsizes = c(5, 900, 3600), daylimit = FALSE, offset = c(0, 0, 0), scale = c(1, 1, 1), tempoffset = c(0, 0, 0)) } # } #impute meta-data: IMP = g.impute(M = data.getmeta, I = data.inspectfile, ID = \"01wk0\") #analyse and produce summary: A = g.analyse(I = data.inspectfile, C = data.calibrate, M = data.getmeta, IMP, ID = \"01wk0\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perday.html","id":null,"dir":"Reference","previous_headings":"","what":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","text":"Generates day specific analyses fills corresponding output matrix, g.analyse.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perday.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","text":"","code":"g.analyse.perday(ndays, firstmidnighti, time, nfeatures, midnightsi, metashort, averageday, doiglevels, nfulldays,lastmidnight, ws3, ws2, qcheck, fname, idloc, sensor.location, wdayname, tooshort, includedaycrit, doquan, quantiletype, doilevels, domvpa, mvpanames, wdaycode, ID, deviceSerialNumber, ExtFunColsi, myfun, desiredtz = \"\", params_247 = c(), params_phyact = c(), ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perday.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","text":"ndays Number days file firstmidnighti see g.detecmidnight time timestamp column metalong converted character nfeatures estimate number variables need stored output matrix midnightsi see g.detecmidnight metashort see g.impute averageday produced g.impute doiglevels Boolean indicate whether iglevels calculated nfulldays Number days first last midnight recording lastmidnight see g.detecmidnight ws3 Epoch size seconds ws2 see g.weardec qcheck vector zeros ones epoch, respenting quality check derived g.impute fname RData filename produced g.part1 idloc see g.analyse sensor.location produced g.extractheadervars wdayname character weekdayname tooshort 0 (file short) 1 (file short) includedaycrit see g.analyse doquan Boolean whether quantile analysis done quantiletype see g.analyse doilevels Boolean whether generate ilevels, see g.analyse domvpa Boolean whether mvpa analysis mvpanames Matrix 6 columns 1 row holding names six mvpa variables wdaycode Equal M$wday produced g.getmeta ID Person Identification number, can numeric character deviceSerialNumber produced g.extractheadervars ExtFunColsi column index metashort metric stored myfun External function object applied raw data, see g.getmeta. desiredtz see g.part1 params_247 See g.part2 params_phyact See g.part2 ... argument used previous version g.analyse.perday, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perday.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","text":"daysummary Summary per day file analysed ds_names Variable names daysummary windowsummary Window summary, used selectdayfile specified ws_names Variable names windowsummary","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perday.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perday","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perfile.html","id":null,"dir":"Reference","previous_headings":"","what":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","text":"Generates recording specific analyses fills corresponding output matrix, g.analyse.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","text":"","code":"g.analyse.perfile(I, C, metrics_nav, AveAccAve24hr, doquan, doiglevels, tooshort, params_247, params_cleaning, params_general, output_avday, output_perday, dataqual_summary, file_summary)"},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perfile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","text":"output g.inspectfile C output g.calibrate metrics_nav List three objects help navigate acceleration metrics AveAccAve24hr Average acceleration average 24 hour cycle doquan Boolean whether quantile analysis done doiglevels Boolean indicate whether iglevels calculated tooshort 0 (file short) 1 (file short) params_247 see GGIR params_cleaning see GGIR params_general see GGIR output_avday Output g.analyse.avday output_perday Output g.analyse.perday dataqual_summary Data.frame data quality summary indicators produced g.analyse","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perfile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","text":"filesummary summary file analysed daysummary Summary per day file analysed","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.analyse.perfile.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function supports g.analyse. Not intended for direct use by user. — g.analyse.perfile","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract metrics from acceleration signals — g.applymetrics","title":"Extract metrics from acceleration signals — g.applymetrics","text":"Function extract metrics acceleration signal. intended direct use user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract metrics from acceleration signals — g.applymetrics","text":"","code":"g.applymetrics(data, sf, ws3, metrics2do, n = 4, lb = 0.2, hb = 15, zc.lb = 0.25, zc.hb = 3, zc.sb = 0.01, zc.order = 2, actilife_LFE = FALSE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract metrics from acceleration signals — g.applymetrics","text":"data Three column matrix x, y, z acceleration data n filter order, see GGIR details sf sample frequency ws3 Epoch size seconds metrics2do Dataframe Boolean indicator metrics whether extracted . instance, metrics2do$.bfen = TRUE, indicates bfen metric extracted lb Lower boundery cut-frequencies, see GGIR. hb Higher boundery cut-frequencies, see GGIR. zc.lb See GGIR zc.hb See GGIR zc.sb See GGIR zc.order See GGIR actilife_LFE See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract metrics from acceleration signals — g.applymetrics","text":"Dataframe metric values columns average per epoch (ws3)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract metrics from acceleration signals — g.applymetrics","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.applymetrics.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract metrics from acceleration signals — g.applymetrics","text":"","code":"Gx = runif(n=10000,min=0,max=2) Gy = runif(n=10000,min=1,max=3) Gz = runif(n=10000,min=0,max=2) data = cbind(Gx, Gy, Gz) colnames(data) = c(\"x\", \"y\", \"z\") metrics2do = data.frame(do.bfen=TRUE,do.enmo=TRUE,do.lfenmo=FALSE, do.en=FALSE,do.hfen=FALSE,do.hfenplus=FALSE,do.mad=FALSE,do.anglex=FALSE, do.angley=FALSE,do.anglez=FALSE,do.roll_med_acc_x=FALSE, do.roll_med_acc_y=FALSE,do.roll_med_acc_z=FALSE, do.dev_roll_med_acc_x=FALSE,do.dev_roll_med_acc_y=FALSE, do.dev_roll_med_acc_z=FALSE,do.enmoa=FALSE, do.lfx=FALSE, do.lfy=FALSE, do.lfz=FALSE, do.hfx=FALSE, do.hfy=FALSE, do.hfz=FALSE, do.bfx=FALSE, do.bfy=FALSE, do.bfz=FALSE, do.zcx=FALSE, do.zcy=FALSE, do.zcz=FALSE, do.brondcounts=FALSE, do.neishabouricounts=FALSE) extractedmetrics = g.applymetrics(data,n=4,sf=40,ws3=5,metrics2do)"},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":null,"dir":"Reference","previous_headings":"","what":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"Function starts identifying ten second windows non-movement. Next, average acceleration per axis per window used estimate calibration error (offset scaling) per axis. function provides recommended correction factors address calibration error summary callibration procedure.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"","code":"g.calibrate(datafile, params_rawdata = c(), params_general = c(), params_cleaning = c(), inspectfileobject = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"datafile Name accelerometer file params_rawdata See g.part1 params_general See g.part1 params_cleaning See g.part1 inspectfileobject Output function g.inspectfile. verbose Boolean (default = TRUE). indicate whether console message printed. Note warnings error always printed can suppressed suppressWarning() suppressMessages(). ... argument used previous version g.calibrate, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"scale scaling correction values, e.g. c(1,1,1) offset offset correction values, e.g. c(0,0,0) tempoffset correction values related temperature, e.g. c(0,0,0) cal.error.start absolute difference Euclidean norm non-movement windows 1 g autocalibration cal.error.end absolute difference Euclidean norm non-movement windows 1 g autocalibration spheredata average, standard deviation, Euclidean norm temperature (available) ten second non-movement windows used autocalibration procedure npoints number 10 second -movement windows used populate sphere nhoursused number hours measurement data scanned find ten second time windows movement meantempcal mean temperature corresponding data used autocalibration. applies data temperate data collected available GGIR, GENEActiv, Axivity, instances ad-hoc .csv data.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"Vincent T van Hees Zhou Fang","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Auto-calibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Aug 7","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.calibrate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"function to estimate calibration error and make recommendation for addressing it — g.calibrate","text":"","code":"if (FALSE) { # \\dontrun{ datafile = \"C:/myfolder/testfile.bin\" #Apply autocalibration: C = g.calibrate(datafile) print(C$scale) print(C$offset) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.conv.actlog.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","title":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","text":"Function read activity log convert data.frame ID date different qwindow vector.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.conv.actlog.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","text":"","code":"g.conv.actlog(qwindow, qwindow_dateformat=\"%d-%m-%Y\", epochSize = 5)"},{"path":"https://wadpac.github.io/GGIR/reference/g.conv.actlog.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","text":"qwindow Path csv file activity log. Expected format activity diary : First column headers followed one row per recording, first column recording ID, needs match ID GGIR extracts accelerometer file. Followed date column format \"23-04-2017\", date format specified argument qwindow_dateformat (). Use character combination date, Date DATE column name. followed one multiple columns start times activity types day format hours:minutes:seconds. header column used label activity type. Insert new date column continuing activity types next day. Leave missing values empty. activitylog used individuals appear activitylog still processed value c(0,24). Dates activiy log data can skipped, need column date followed column next date. times activitylog multiple short window size (epoch length), next epoch considered (e.g., epoch 5 seconds, 8:00:02 redefined 8:00:05 activity log). qwindow_dateformat Character specifying date format used activity log. epochSize Short epoch size (first value windowsizes g.getmeta).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.conv.actlog.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","text":"Data.frame column ID, date qwindow, qwindow value qwindow vector","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.conv.actlog.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to read activity log and make it useful for the rest of GGIR. — g.conv.actlog","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.convert.part2.long.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert part 2 report to long format — g.convert.part2.long","title":"Convert part 2 report to long format — g.convert.part2.long","text":"direct access used. function used inside g.report.part2 convert2 part 2 report long ormat multiple segments per day","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.convert.part2.long.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert part 2 report to long format — g.convert.part2.long","text":"","code":"g.convert.part2.long(daySUMMARY)"},{"path":"https://wadpac.github.io/GGIR/reference/g.convert.part2.long.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert part 2 report to long format — g.convert.part2.long","text":"daySUMMARY Object available inside g.report.part2","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.convert.part2.long.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert part 2 report to long format — g.convert.part2.long","text":"Data.frame long format version daySUMMARY","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.convert.part2.long.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert part 2 report to long format — g.convert.part2.long","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.create.sp.mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","title":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","text":"Function convert data sleep period matrix part g.part4.R. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.create.sp.mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","text":"","code":"g.create.sp.mat(nsp,spo,sleepdet.t,daysleep=FALSE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.create.sp.mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","text":"nsp Integer indicating number sleep periods spo Empty matrix overview sleep periods, 5 columns along nps sleepdet.t Part detected sleep g.sib.det one night one sleep definition daysleep Boolean indicator whether person woke noon (daysleeper)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.create.sp.mat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","text":"spo matrix start end sleep period calendardate date corresponding day night started item wdayname weekdayname","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.create.sp.mat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Converts sleep period information. Not intended for direct use — g.create.sp.mat","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.detecmidnight.html","id":null,"dir":"Reference","previous_headings":"","what":"Detect all midnights in a time series — g.detecmidnight","title":"Detect all midnights in a time series — g.detecmidnight","text":"Detect midnights time series","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.detecmidnight.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detect all midnights in a time series — g.detecmidnight","text":"","code":"g.detecmidnight(time,desiredtz, dayborder)"},{"path":"https://wadpac.github.io/GGIR/reference/g.detecmidnight.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detect all midnights in a time series — g.detecmidnight","text":"time Vector timestamps, either iso8601 POSIX format desiredtz See g.part2 dayborder see g.analyse","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.detecmidnight.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detect all midnights in a time series — g.detecmidnight","text":"Output function list containing following objects: firstmidnight = timestamp first midnight firstmidnighti = index first midnight lastmidnight = timestamp last midnight lastmidnighti = index last midnight midnights = timestamps midnights midnightsi = indeces midnights","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.detecmidnight.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detect all midnights in a time series — g.detecmidnight","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":null,"dir":"Reference","previous_headings":"","what":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"function used g.readaccfile assess numeric data interpretted","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"","code":"g.dotorcomma(inputfile, dformat, mon, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"inputfile full path inputfile dformat Data format code: 1=.bin, 2=.csv, 3=.wav, 4=.cwa, 5=.csv ad-hoc monitor brand mon Monitor code (accelorometer brand): 0=undefined, 1=GENEA, 2=GENEActiv, 3=Actigraph, 4=Axivity, 5=Movisense, 6=Verisense ... input arguments needed function read.myacc.csv working non-standard csv formatted files.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"Character object showing decimals separated","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.dotorcomma.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Assesses whether decimals in fileheader are stored with comma or dot separated decimals — g.dotorcomma","text":"","code":"if (FALSE) { # \\dontrun{ decn = g.dotorcomma(inputfile=\"C:/myfile.bin\",dformat=1,mon=2) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts header variables from header object — g.extractheadervars","title":"Extracts header variables from header object — g.extractheadervars","text":"Function intended direct interaction package end user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts header variables from header object — g.extractheadervars","text":"","code":"g.extractheadervars(I)"},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts header variables from header object — g.extractheadervars","text":"Object produced g.inspectfile","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts header variables from header object — g.extractheadervars","text":"ID = participant identifier iid = investigator identifier HN = handedness BodyLocation = Attachement location sensor SX = sex deviceSerialNumber = serial number","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extracts header variables from header object — g.extractheadervars","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.extractheadervars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extracts header variables from header object — g.extractheadervars","text":"","code":"data(data.inspectfile) headervars = g.extractheadervars(I=data.inspectfile)"},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":null,"dir":"Reference","previous_headings":"","what":"Fragmentation metrics from time series. — g.fragmentation","title":"Fragmentation metrics from time series. — g.fragmentation","text":"function used g.part5 derive time series fragmentation metrics. function assumes NA values nonwear time accounted data enters function.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fragmentation metrics from time series. — g.fragmentation","text":"","code":"g.fragmentation(frag.metrics = c(\"mean\", \"TP\", \"Gini\", \"power\", \"CoV\", \"NFragPM\", \"all\"), LEVELS = c(), Lnames=c(), xmin=1, mode = \"day\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fragmentation metrics from time series. — g.fragmentation","text":"frag.metrics Character fragmentation metric exract. Can \"mean\", \"TP\", \"Gini\", \"power\", \"CoV\", \"NFragPM\", metrics \"\". See details. LEVELS Numeric vector behavioural level classes derived identify_levels Lnames Character vector names classes used LEVELS, see details. xmin Numeric scalar indicate minimum recordable fragment length. g.part5 derived epoch length. mode Character indicate whether input data daytime (\"day\") sleep period time (\"spt\").","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fragmentation metrics from time series. — g.fragmentation","text":"List Character object showing decimals separated TP_PA2IN Transition probability physical activity inactivity . TP_IN2PA Transition probability physical inactivity activity Nfrag_IN2LIPA Number inacitivty fragments succeeded LIPA (light physical activity) TP_IN2LIPA Transition probability physical inactivity LIPA Nfrag_IN2MVPA Number inacitivty fragments succeeded MVPA (moderate vigorous physical activity) TP_IN2MVPA Transition probability physical inactivity MVPA Nfrag_MVPA Number MVPA fragments Nfrag_LIPA Number LIPA fragments mean_dur_MVPA mean MVPA fragment duration mean_dur_LIPA mean LIPA fragment duration Nfrag_IN Number inactivity fragments Nfrag_PA Number activity fragments mean_dur_IN mean duration inactivity fragments mean_dur_PA mean duration activity fragments Gini_dur_IN Gini index corresponding inactivity fragment durations Gini_dur_PA Gini index corresponding activity fragment durations CoV_dur_IN Coefficient Variance corresponding inactivity fragment durations CoV_dur_PA Coefficient Variance corresponding activity fragment durations alpha_dur_IN Alpha fitted power distribution inactivity fragment durations alpha_dur_PA Alpha fitted power distribution activity fragment durations x0.5_dur_IN x0.5 corresponding alpha_dur_IN x0.5_dur_PA x0.5 corresponding alpha_dur_PA W0.5_dur_IN W0.5 corresponding alpha_dur_IN W0.5_dur_PA W0.5 corresponding alpha_dur_PA NFragPM_IN Number fragments per minutes NFragPM_PA Number PA fragments per minutes PA SD_dur_IN Standard deviation duration inactivity fragments SD_dur_PA Standard deviation duration physical activity fragments","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fragmentation metrics from time series. — g.fragmentation","text":"See package vignette description fragmentation metrics. short, abbreviation \"TP\" refers transition probality metrics, abbreviation \"CoV\" refers Coefficient Variance, metric \"NFragPM\" refers Number fragments per minute. Regarding Lnames argument. class names included categorised follows: Inactive, name includes character strings \"day_IN_unbt\" \"day_IN_bts\" LIPA, name includes character strings \"day_LIG_unbt\" \"day_LIG_bts\" MVPA, name includes character strings \"day_MOD_unbt\", \"day_VIG_unbt\", \"day_MVPA_bts\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fragmentation metrics from time series. — g.fragmentation","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.fragmentation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fragmentation metrics from time series. — g.fragmentation","text":"","code":"if (FALSE) { # \\dontrun{ x = c(6, 5, 6, 7, 6, 6, 7, 6, 6, 5, 6, 6, 6, 5, 7, 6, 6, 5, 5, 5, 6, 7, 6, 6, 6, 6, 7, 6, 5, 5, 5, 5, 5, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 6, 5, 6, 5, 6, 5, rep(12, 11), 5, 6, 6, 6, 5, 6, rep(9, 14), 6, 5, 7, 7, 6, 7, 7, 7, 6, 6, 6, 5, 6, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5) Lnames = c(\"spt_sleep\", \"spt_wake_IN\", \"spt_wake_LIG\", \"spt_wake_MOD\", \"spt_wake_VIG\", \"day_IN_unbt\", \"day_LIG_unbt\", \"day_MOD_unbt\", \"day_VIG_unbt\", \"day_MVPA_bts_10\", \"day_IN_bts_30\", \"day_IN_bts_10_30\", \"day_LIG_bts_10\") out = g.fragmentation(frag.metrics = \"all\", LEVELS = x, Lnames=Lnames)} # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":null,"dir":"Reference","previous_headings":"","what":"function to calculate bouts from vector of binary classes — g.getbout","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"detect bouts behaviour time series. function used g.analyse","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"","code":"g.getbout(x, boutduration, boutcriter = 0.8, ws3 = 5)"},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"x vector zeros /ones screened bouts ones boutduration duration bout epochs boutcriter Minimum percentage boutduration epoch values expected meet threshold criterium ws3 epoch length seconds, needed bout.metric =3, needs measure many epochs equal 1 minute breaks","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"Vector binary numbers indicator bouts detected","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"Vincent T van Hees Jairo Hidalgo Migueles","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getbout.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"function to calculate bouts from vector of binary classes — g.getbout","text":"","code":"y = g.getbout(x=round(runif(1000, 0.4, 1)), boutduration = 120, boutcriter=0.9, ws3 = 5)"},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract M5 and L5 from time series — g.getM5L5","title":"Extract M5 and L5 from time series — g.getM5L5","text":"Extract M5 L5 time series, function used g.analyse intended direct use package user. Please see g.analyse clarification functionalities","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract M5 and L5 from time series — g.getM5L5","text":"","code":"g.getM5L5(varnum,ws3,t0_LFMF,t1_LFMF,M5L5res,winhr,qM5L5=c(), iglevels=c(), MX.ig.min.dur=10)"},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract M5 and L5 from time series — g.getM5L5","text":"varnum Numeric vector epoch values ws3 Small epoch size seconds t0_LFMF Start hour day M5L5 analyses, e.g. 0 midnight t1_LFMF End hour day M5L5 analyses, e.g. 24 midnight M5L5res Resolution hte M5L5 analyses minutes winhr windowsize M5L5 analyses, e.g. 5 hours qM5L5 Percentiles (quantiles) calculated L5 M5 window. iglevels See g.analyse. provided intensity gradient calculated MX windows larger equal argument MX.ig.min.dur MX.ig.min.dur Minimum MX duration needed order intensity gradient calculated","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract M5 and L5 from time series — g.getM5L5","text":"DAYL5HOUR = Starting time hours L5 DAYL5VALUE = average acceleration L5 DAYM5HOUR = Starting time hours M5 DAYM5VALUE = average acceleration M5 V5NIGHT = average acceleration 1am 6am","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract M5 and L5 from time series — g.getM5L5","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getM5L5.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract M5 and L5 from time series — g.getM5L5","text":"","code":"if (FALSE) { # \\dontrun{ data(data.getmeta) g.getM5L5(varnum=data.getmeta,ws3=5,t0_LFMF=0,t1_LFMF=24,M5L5res=10,winhr=5) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"Reads accelerometer file blocks, extracts various features stores average feature value per short long epoch. Acceleration angle metrics stored short epoch length. non-wear indication score, clipping score, temperature (available), light (available), Euclidean norm stored long epoch length. function designed thoroughly tested accelerometer files GENEA GENEActiv bin files. , function able cope ActiGraph gt3x csv files, Axivity cwa csv files, Movisens bin files, ad-hoc csv files read read.myacc.csv function.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"","code":"g.getmeta(datafile, params_metrics = c(), params_rawdata = c(), params_general = c(), params_cleaning = c(), daylimit = FALSE, offset = c(0, 0, 0), scale = c(1, 1, 1), tempoffset = c(0, 0, 0), meantempcal = c(), myfun = c(), inspectfileobject = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"datafile name accelerometer file params_metrics See details GGIR. params_rawdata See details GGIR. params_general See details GGIR. params_cleaning See details GGIR. daylimit number days limit (roughly), set FALSE daylimit applied offset offset correction value per axis, usage: value = scale(value,center = -offset, scale = 1/scale) scale scaling correction value per axis, usage: value = scale(value,center = -offset, scale = 1/scale) tempoffset temperature offset correction value per axis, usage: value = scale(value,center = -offset, scale = 1/scale) + scale(temperature, center = rep(averagetemperate,3), scale = 1/tempoffset) meantempcal mean temperature corresponding data used autocalibration. autocalibration done temperature available leave blank (default) myfun External function object applied raw data. See details applyExtFunction. inspectfileobject Output function g.inspectfile. verbose Boolean (default = TRUE). indicate whether console message printed. Note warnings error always printed can suppressed suppressWarning() suppressMessages(). ... argument used previous version g.getmeta, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"metalong dataframe long epoch meta-data: EN, non-wear score, clipping score, temperature metashort dataframe short epoch meta-data: timestamp metric tooshort indicator whether file short processing (TRUE FALSE) corrupt indicator whether file considered corrupt (TRUE FALSE)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"van Hees VT, Gorzelniak L, Dean Leon EC, Eder M, Pias M, et al. (2013) Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. PLoS ONE 8(4): e61691. doi:10.1371/journal.pone.0061691 Aittasalo M, Vaha-Ypya H, Vasankari T, Husu P, Jussila , Sievanen H. Mean amplitude deviation calculated raw acceleration data: novel method classifying intensity adolescents physical activity irrespective accelerometer brand. BMC Sports Science, Medicine Rehabilitation (2015).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getmeta.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to extract meta-data (features) from data in accelerometer file — g.getmeta","text":"","code":"if (FALSE) { # \\dontrun{ datafile = \"C:/myfolder/testfile.bin\" #Extract meta-data: M = g.getmeta(datafile) #Inspect first couple of rows of long epoch length meta data: print(M$metalong[1:5,]) #Inspect first couple of rows of short epoch length meta data: print(M$metalong[1:5,]) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.getstarttime.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract start time of a measurement — g.getstarttime","title":"Extract start time of a measurement — g.getstarttime","text":"Extract start time measurement. GGIR calculates timestamps using first timestamp sample frequency. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getstarttime.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract start time of a measurement — g.getstarttime","text":"","code":"g.getstarttime(datafile, data, mon, dformat, desiredtz, configtz = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/g.getstarttime.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract start time of a measurement — g.getstarttime","text":"datafile Full path data file data Data part g.readaccfile output mon g.dotorcomma dformat g.dotorcomma desiredtz g.dotorcomma configtz g.dotorcomma","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getstarttime.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract start time of a measurement — g.getstarttime","text":"starttime","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.getstarttime.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract start time of a measurement — g.getstarttime","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":null,"dir":"Reference","previous_headings":"","what":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"Functions takes output g.getmeta information study protocol label impute invalid time segments data.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"","code":"g.impute(M, I, params_cleaning = c(), desiredtz=\"\", dayborder= 0, TimeSegments2Zero =c(), acc.metric = \"ENMO\", ID, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"M output g.getmeta output g.inspectfile params_cleaning See g.part1 desiredtz See g.part1 dayborder See g.part1 TimeSegments2Zero Optional data.frame specify time segments need ignored imputation, acceleration metrics imputed zeros. data.frame expected contain two columns named windowstart windowend, start- end time time segment POSIXlt class. acc.metric See GGIR ID ID extracted g.part2. ... argument used previous version g.impute, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"metashort imputed short epoch variables rout matrix clarify data imputed long epoch time window reason imputation. Value = 1 indicates imputation. Columns 1 = monitor non wear, column 2 = clipping, column 3 = additional nonwear, column 4 = protocol based exclusion column5 = sum column 1,2,3 4. averageday matrix n columns n metrics values m rows m short epoch time windows average 24 hours period","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.impute.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement — g.impute","text":"","code":"if (FALSE) { # \\dontrun{ #inspect file: I = g.inspectfile(datafile) #autocalibration: C = g.calibrate(datafile) #get meta-data: M = g.getmeta(datafile) } # } data(data.getmeta) data(data.inspectfile) #impute meta-data: IMP = g.impute(M=data.getmeta, I=data.inspectfile)"},{"path":"https://wadpac.github.io/GGIR/reference/g.imputeTimegaps.html","id":null,"dir":"Reference","previous_headings":"","what":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","title":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","text":"Removes sample zero three axes, (default) imputes time gaps last recorded value per axis normalised 1 _g_","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.imputeTimegaps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","text":"","code":"g.imputeTimegaps(x, sf, k = 0.25, impute = TRUE, PreviousLastValue = c(0,0,1), PreviousLastTime = NULL, epochsize = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/g.imputeTimegaps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","text":"x Data.frame raw accelerometer data, timestamp column millisecond resolution. sf Sample frequency Hertz k Minimum time gap length imputed impute Boolean indicate whether time gaps identified imputed PreviousLastValue Automatically identified last value previous chunk data read. PreviousLastTime Automatically identified last timestamp previous chunk data read. epochsize Numeric vector length two, short long epoch sizes.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.imputeTimegaps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","text":"List including: - x, data.frame based input x timegaps imputed (default) recordings 0 values three axes removed (impute = FALSE) - QClog, data.frame information number time gaps found total time imputed minutes","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.imputeTimegaps.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Impute gaps in three axis raw accelerometer data — g.imputeTimegaps","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.inspectfile.html","id":null,"dir":"Reference","previous_headings":"","what":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","title":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","text":"Inspects accelerometer file key information, including: monitor brand, sample frequency file header","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.inspectfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","text":"","code":"g.inspectfile(datafile, desiredtz = \"\", params_rawdata = c(), configtz = c(), ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.inspectfile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","text":"datafile name data file desiredtz Desired timezone, see documentation g.getmeta params_rawdata See g.part1 configtz ... ... argument used previous version g.getmeta, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.inspectfile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","text":"header fileheader monn monitor name (genea, geneactive) monc monitor brand code (0 - ad-hoc file format, 1 = genea (non-commercial), 2 = GENEActive, 3 = actigraph, 4 = Axivity (AX3, AX6), 5 = Movisense, 6 = Verisense) dformn data format name, e.g bin, csv, cwa, gt3x dformc data format code (1 = .bin, 2 = .csv, 3 = .wav, 4 = .cwa, 5 = ad-hoc .csv, 6 = .gt3x) sf samplefrequency Hertz filename filename","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.inspectfile.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to inspect accelerometer file for brand, sample frequency and header — g.inspectfile","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":null,"dir":"Reference","previous_headings":"","what":"Intensity gradient calculation — g.intensitygradient","title":"Intensity gradient calculation — g.intensitygradient","text":"Calculates intensity gradient based Rowlands et al. 2018. function assumes user already calculated value distribution.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Intensity gradient calculation — g.intensitygradient","text":"","code":"g.intensitygradient(x,y)"},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Intensity gradient calculation — g.intensitygradient","text":"x Numeric vector mid-points bins (mg) y Numeric vector time spent bins (minutes)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Intensity gradient calculation — g.intensitygradient","text":"y_intercept y-intercept linear regression line log-log space gradient Beta coefficient linear regression line log-log space rsquared R squared x y values log-log space","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Intensity gradient calculation — g.intensitygradient","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.intensitygradient.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Intensity gradient calculation — g.intensitygradient","text":"Rowlands , Edwardson CL, et al. (2018) Beyond Cut Points: Accelerometer Metrics Capture Physical Activity Profile. MSSE 50(6):1. doi:10.1249/MSS.0000000000001561","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculates IV and IS — g.IVIS","title":"Calculates IV and IS — g.IVIS","text":"extract interdaily stability interdaily variability originally proposed van Someren.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculates IV and IS — g.IVIS","text":"","code":"g.IVIS(Xi, epochsizesecondsXi = 5, IVIS_epochsize_seconds = c(), IVIS_windowsize_minutes = 60, IVIS.activity.metric = 1, IVIS_acc_threshold = 20, IVIS_per_daypair = FALSE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculates IV and IS — g.IVIS","text":"Xi Vector acceleration values, e.g. ENMO metric. epochsizesecondsXi Epoch size values Xi expressed seconds. IVIS_epochsize_seconds argument depricated. IVIS_windowsize_minutes Window size Intradaily Variability (IV) Interdaily Stability () metrics minutes, needs able add 24 hours. IVIS.activity.metric Metric used activity calculation. Value = 1, uses continuous scaled acceleration. Value = 2, tries collapse acceleration binary score rest versus active try simulate original approach. IVIS_acc_threshold Acceleration threshold distinguish inactive active IVIS_per_daypair Boolean indicate whether IVIS calculated per day pair aggregated across day pairs weighted day completeness (default FALSE).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculates IV and IS — g.IVIS","text":"InterdailyStability IntradailyVariability","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Calculates IV and IS — g.IVIS","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Calculates IV and IS — g.IVIS","text":"Eus J. W. Van Someren, Dick F. Swaab, Christopher C. Colenda, Wayne Cohen, W. Vaughn McCall & Peter B. Rosenquist. Bright Light Therapy: Improved Sensitivity Effects Rest-Activity Rhythms Alzheimer Patients Application Nonparametric Methods Chronobiology International. 1999. Volume 16, issue 4.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.IVIS.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Calculates IV and IS — g.IVIS","text":"","code":"Xi = abs(rnorm(n = 10000,mean = 0.2)) IVISvariables = g.IVIS(Xi=Xi)"},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":null,"dir":"Reference","previous_headings":"","what":"Load and clean sleeplog information — g.loadlog","title":"Load and clean sleeplog information — g.loadlog","text":"Loads sleeplog csv input file applies sanity checks storing output dataframe","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load and clean sleeplog information — g.loadlog","text":"","code":"g.loadlog(loglocation=c(),coln1=c(),colid=c(), sleeplogsep=\",\", meta.sleep.folder = c(), desiredtz=\"\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load and clean sleeplog information — g.loadlog","text":"loglocation Location spreadsheet (csv) sleep log information. See package vignette explanation expected format coln1 Column number sleep log spreadsheet onset first night starts colid Column number sleep log spreadsheet participant ID code stored (default = 1) sleeplogsep Value used sep argument reading sleeplog csv file, usually \",\" \";\". argument deprecated. meta.sleep.folder Path part3 milestone data, specify sleeplog advanced format. desiredtz See g.part4","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load and clean sleeplog information — g.loadlog","text":"Data frame sleeplog, can either basic format advanced format. See GGIR package vignette discussion two formats.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Load and clean sleeplog information — g.loadlog","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.loadlog.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load and clean sleeplog information — g.loadlog","text":"","code":"if (FALSE) { # \\dontrun{ sleeplog = g.loadlog(loglocation=\"C:/mysleeplog.csv\",coln1=2, colid=1) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":null,"dir":"Reference","previous_headings":"","what":"function to load and pre-process acceleration files — g.part1","title":"function to load and pre-process acceleration files — g.part1","text":"Calls function g.getmeta g.calibrate, converts output .RData-format input g.part2. , function generates folder structure keep track various output files. reason g.part1 g.part2 merged one generic shell function g.part1 takes much longer involves minor decisions interest movement scientist. Function g.part2 hand relatively fast comes decisions directly impact variables interest movement scientist. Therefore, user may want run g.part1 overnight computing cluster, g.part2 can main playing ground movement scientist. Function GGIR provides main shell allows operating g.part1 g.part2.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to load and pre-process acceleration files — g.part1","text":"","code":"g.part1(datadir = c(), metadatadir = c(), f0 = 1, f1 = c(), myfun = c(), params_metrics = c(), params_rawdata = c(), params_cleaning = c(), params_general = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to load and pre-process acceleration files — g.part1","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory output needs stored. Note function attempt create folders directory uses folder keep output. f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) myfun External function object applied raw data. See details applyExtFunction. params_metrics See details GGIR. params_rawdata See details GGIR. params_cleaning See details GGIR. params_general See details GGIR. verbose See details GGIR. ... working non-standard csv formatted files, g.part1 also takes input arguments needed function read.myacc.csv argument rmc.noise get_nw_clip_block_params. First test argument function read.myacc.csv directly. ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"function to load and pre-process acceleration files — g.part1","text":"GGIR comes many processing parameters, thematically grouped parameter objects (R list). running print(load_params()) can see default values parameter objects. g.part 1 used via GGIR option specifiy configuration file, overrule default parameter values. , user can set parameter values input argument g.part1 GGIR. Directly specified argument overrule configuration file default values. See GGIR package vignette details section GGIR elaborate overview parameter objects usage across GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to load and pre-process acceleration files — g.part1","text":"function provides values, ensures output functions stored .RData(one file per accelerometer file) folder structure","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to load and pre-process acceleration files — g.part1","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"function to load and pre-process acceleration files — g.part1","text":"van Hees VT, Gorzelniak L, Dean Leon EC, Eder M, Pias M, et al. (2013) Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. PLoS ONE 8(4): e61691. doi:10.1371/journal.pone.0061691 van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Auto-calibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Aug 7 Aittasalo M, Vaha-Ypya H, Vasankari T, Husu P, Jussila , Sievanen H. Mean amplitude deviation calculated raw acceleration data: novel method classifying intensity adolescents physical activity irrespective accelerometer brand. BMC Sports Science, Medicine Rehabilitation (2015).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part1.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"function to load and pre-process acceleration files — g.part1","text":"","code":"if (FALSE) { # \\dontrun{ datafile = \"C:/myfolder/mydata\" outputdir = \"C:/myresults\" g.part1(datadir,outputdir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":null,"dir":"Reference","previous_headings":"","what":"function to analyse and summarize pre-processed output from g.part1 — g.part2","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"Loads output g.part1 applies g.impute g.analyse, output converted .RData-format used GGIR generate reports. variables reports variables described g.analyse.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"","code":"g.part2(datadir = c(), metadatadir = c(), f0 = c(), f1 = c(), myfun = c(), params_cleaning = c(), params_247 = c(), params_phyact = c(), params_output = c(), params_general = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) myfun External function object applied raw data. See details applyExtFunction. params_cleaning See details GGIR. params_247 See details GGIR. params_phyact See details GGIR. params_output See details GGIR. params_general See details GGIR. verbose See details GGIR. ... ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"function provides values, ensures functions called output stored folder structure created g.part1.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"GGIR comes many processing parameters, thematically grouped parameter objects (R list). running print(load_params()) can see default values parameter objects. g.part 2 used via GGIR option specifiy configuration file, overrule default parameter values. , user can set parameter values input argument g.part2 GGIR. Directly specified argument overrule configuration file default values. See GGIR package vignette details section GGIR elaborate overview parameter objects usage across GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"van Hees VT, Gorzelniak L, Dean Leon EC, Eder M, Pias M, et al. (2013) Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. PLoS ONE 8(4): e61691. doi:10.1371/journal.pone.0061691 van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Auto-calibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Aug 7","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"function to analyse and summarize pre-processed output from g.part1 — g.part2","text":"","code":"if (FALSE) { # \\dontrun{ metadatadir = \"C:/myresults/output_mystudy\" g.part2(metadatadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":null,"dir":"Reference","previous_headings":"","what":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"Function called function GGIR. estimates sustained inactivity periods day, used input g.part4 labels nocturnal sleep day time sustained inactivity periods. Typical users work function GGIR .","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"","code":"g.part3(metadatadir = c(), f0, f1, myfun = c(), params_sleep = c(), params_metrics = c(), params_output = c(), params_general = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) myfun External function object applied raw data. See details applyExtFunction. params_sleep See details GGIR. params_metrics See details GGIR. params_output See details GGIR. params_general See details GGIR. verbose See details GGIR. ... ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"GGIR comes many processing parameters, thematically grouped parameter objects (R list). running print(load_params()) can see default values parameter objects. g.part 3 used via GGIR option specifiy configuration file, overrule default parameter values. , user can set parameter values input argument g.part3 GGIR. Directly specified argument overrule configuration file default values. See GGIR package vignette details section GGIR elaborate overview parameter objects usage across GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"function provides values, ensures functions called output stored .RData files. night nightnumber definition definition sustained inactivity. example, T10A5 refers 10 minute window 5 degree angle (see paper explaination). start.time.day timestamp day started nsib.periods number sustained inactivity bouts tot.sib.dur.hrs total duration sustained inactivity bouts fraction.night.invalid fraction night accelerometer data invalid, e.g. monitor worn sib.period number sustained inactivity period sib.onset.time onset time sustained inactivity period sib.end.time end time sustained inactivity period","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"van Hees VT, Sabia S, et al. (2015) novel, open access method assess sleep duration using wrist-worn accelerometer, PLoS ONE, November 2015 van Hees VT, Sabia S, et al. (2018) Estimating sleep parameters using accelerometer without sleep diary. Scientific Reports.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Detection of sustained inactivity periods as needed for sleep detection in g.part4. — g.part3","text":"","code":"if (FALSE) { # \\dontrun{ metadatadir = \"C:/myfolder/meta\" # assumes that there is a subfolder in # metadatadir named 'basic' containing the output from g.part1 g.part3(metadatadir=metadatadir, anglethreshold=5, timethreshold=5, overwrite=FALSE) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":null,"dir":"Reference","previous_headings":"","what":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"Combines output g.part3 guider information estimate sleep variables. See vignette paragraph \"Sleep full day time-use analysis GGIR\" elaborate descript sleep detection.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"","code":"g.part4(datadir = c(), metadatadir = c(), f0 = f0, f1 = f1, params_sleep = c(), params_metrics = c(), params_cleaning = c(), params_output = c(), params_general = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) params_sleep List parameters used sleep analysis (GGIR part 3, 4, 5): see documentation g.part3. params_metrics List parameters used metrics extraction (GGIR part 1): see documentation g.part1. params_cleaning See details GGIR. params_output See details GGIR. params_general See details GGIR. verbose See details GGIR. ... ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"function produce values generates RData file milestone subfolder ms4.incudes dataframe named nightsummary. dataframe used g.report.part4 create two reports one per night one per person. See package vignette paragraph \"Output part 4\" description variables.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"van Hees VT, Sabia S, et al. (2018) AEstimating sleep parameters using accelerometer without sleep diary, Scientific Reports. van Hees VT, Sabia S, et al. (2015) novel, open access method assess sleep duration using wrist-worn accelerometer, PLoS ONE.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Labels detected sustained inactivity periods by g.part3 as either part of the Sleep Period Time window or not — g.part4","text":"","code":"if (FALSE) { # \\dontrun{ metadatadir = \"C:/myfolder/meta\" # assumes that there is a subfolder in # metadatadir named 'ms3.out' containing the output from g.part3 g.part4(metadatadir=metadatadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part4_extradctid.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","title":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","text":"Extracts ID filename finds matching rows sleeplog. Function designed direct use GGIR users.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4_extradctid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","text":"","code":"g.part4_extractid(idloc, fname, dolog, sleeplog, accid = c())"},{"path":"https://wadpac.github.io/GGIR/reference/g.part4_extradctid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","text":"idloc See g.part4 fname Full patth filename dolog Boolean indicate whether rely sleeplog sleeplog Sleeplog data.frame passed g.part4 accid ID extracted acceleration file GGIR part3. available leave blank.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4_extradctid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","text":"List accid ID matching_indices_sleeplog vector matching row indices sleeplog","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part4_extradctid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extracts ID from filename and finds matching rows in sleeplog — g.part4_extractid","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addfirstwake.html","id":null,"dir":"Reference","previous_headings":"","what":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","title":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","text":"intended direct use GGIR users. Adds first wake missing part 4 output part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addfirstwake.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","text":"","code":"g.part5.addfirstwake(ts, summarysleep, nightsi, sleeplog, ID, Nepochsinhour, SPTE_end)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addfirstwake.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","text":"ts Data.frame object passed g.part5 summarysleep Data.frame object passed g.part5 sleep summary information g.part4. nightsi Vector indices nights sleeplog Data.frame sleeplog information ID Participant ID Nepochsinhour Number epochs hour SPTE_end Sleep period time end index","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addfirstwake.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","text":"Data.frame ts updated first wakeup time","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addfirstwake.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Adds first wake if it is missing in part 4 output. — g.part5.addfirstwake","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addsib.html","id":null,"dir":"Reference","previous_headings":"","what":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","title":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","text":"intended direct use GGIR users. Adds sustained inactivity bout ts series part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addsib.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","text":"","code":"g.part5.addsib(ts, epochSize, part3_output, desiredtz, sibDefinition, nightsi)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addsib.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","text":"ts Data.frame object passed g.part5 epochSize Short epoch size seconds part3_output Segment part 3 output relevant current sleep definition desiredtz see GGIR sibDefinition Character indicate definition sib (sustained inactivity bout) nightsi Vector indices midnights","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addsib.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","text":"Data.frame ts","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.addsib.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Adds the sustained inactivity bout to the ts series. — g.part5.addsib","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.analyseRest.html","id":null,"dir":"Reference","previous_headings":"","what":"Analyse rest (internal function) — g.part5.analyseRest","title":"Analyse rest (internal function) — g.part5.analyseRest","text":"Analyses overlap self-reported napping, non-wear sib. Internal function intended direct use GGIR end-user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.analyseRest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Analyse rest (internal function) — g.part5.analyseRest","text":"","code":"g.part5.analyseRest(sibreport = NULL, dsummary = NULL, ds_names = NULL, fi = NULL, di = NULL, time = NULL, tz = NULL, possible_nap_dur = 0, possible_nap_edge_acc = Inf)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.analyseRest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Analyse rest (internal function) — g.part5.analyseRest","text":"sibreport sibreport data.frame produced g.sibreport dsummary matrix created internally g.part5 ds_names character vector variable names corresponding dsummary created internally g.part5 fi Numeric scalar indicate variable index, created internally g.part5 di Numeric scalar indicate recording index, created internally g.part5 time Daytime section time column ts object, created internally g.part5, tz Timezone database name possible_nap_dur Minimum sib duration considered. self-reported naps/nonwear minimum duration 1 epoch. possible_nap_edge_acc Maximum acceleration SIB considered.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.analyseRest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Analyse rest (internal function) — g.part5.analyseRest","text":"List updated objects dsummary, ds_names, fi, di","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.analyseRest.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Analyse rest (internal function) — g.part5.analyseRest","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.classifyNaps.html","id":null,"dir":"Reference","previous_headings":"","what":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","title":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","text":"Classify Naps identified sustained inactivty bouts, based model originally trained hip-worn accelerometer data 3-3.5 year olds. Assume metric ENMO used HASIB.algo set vanHees2015.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.classifyNaps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","text":"","code":"g.part5.classifyNaps(sibreport = c(), desiredtz = \"\", possible_nap_window = c(9, 18), possible_nap_dur = c(15, 240), nap_model = \"hip3yr\", HASIB.algo = \"vanHees2015\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.classifyNaps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","text":"sibreport Object generated g.sibreport desiredtz See g.getmeta. possible_nap_window Numeric vector length two range clock hours naps assumed take place. possible_nap_dur Numeric vector length two range duration (minutes) nap. nap_model Character specify classification model. Currently option \"hip3yr\", corresponds model trained hip data 3-3.5 olds trained parent diary data. HASIB.algo See g.part3.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.classifyNaps.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","text":"Data.frame classified naps newly detected non-wear periods.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.classifyNaps.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Classify Naps from identified sustained inactivty bouts — g.part5.classifyNaps","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.definedays.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix missing night in part 4 output — g.part5.definedays","title":"Fix missing night in part 4 output — g.part5.definedays","text":"intended direct use GGIR users. Defines day windows start end part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.definedays.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix missing night in part 4 output — g.part5.definedays","text":"","code":"g.part5.definedays(nightsi, wi, indjump, nightsi_bu, epochSize, qqq_backup = c(), ts, timewindowi, Nwindows, qwindow, ID = NULL, dayborder = 0)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.definedays.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fix missing night in part 4 output — g.part5.definedays","text":"nightsi Vector indices midnights wi Numeric indicate window number indjump Number indices jump nightsi_bu See argument nightsi backup object epochSize Numeric epoch size seconds qqq_backup Backup qqq object, holds start end indices window ts Data.frame time series timewindowi Timewindow definition either \"MM\" \"WW\" Nwindows Number windows data qwindow qwindow argument ID ID participant dayborder dayborder argument","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.definedays.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fix missing night in part 4 output — g.part5.definedays","text":"List qqq qqq_backup","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.definedays.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fix missing night in part 4 output — g.part5.definedays","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.fixmissingnight.html","id":null,"dir":"Reference","previous_headings":"","what":"Fix missing night in part 4 output — g.part5.fixmissingnight","title":"Fix missing night in part 4 output — g.part5.fixmissingnight","text":"intended direct use GGIR users. night missing part4 output function tries fix part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.fixmissingnight.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fix missing night in part 4 output — g.part5.fixmissingnight","text":"","code":"g.part5.fixmissingnight(summarysleep, sleeplog = c(), ID)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.fixmissingnight.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fix missing night in part 4 output — g.part5.fixmissingnight","text":"summarysleep Object produced g.part4 sleeplog Sleeplog object passed g.part5 ID ID participant","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.fixmissingnight.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fix missing night in part 4 output — g.part5.fixmissingnight","text":"Corrected summarysleep_tmp2 object.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.fixmissingnight.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fix missing night in part 4 output — g.part5.fixmissingnight","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.handle_lux_extremes.html","id":null,"dir":"Reference","previous_headings":"","what":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","title":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","text":"Extreme values imputed mean neightbours occur isolated sequence two, removed occure sequence 3 longer.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.handle_lux_extremes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","text":"","code":"g.part5.handle_lux_extremes(lux)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.handle_lux_extremes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","text":"lux Vector lux values","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.handle_lux_extremes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","text":"List imputed lux values vector matching length named correction_log indicating timestamps imputed (value=1), replaced NA (value=2) untouched (value=0).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.handle_lux_extremes.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Check lux values for extremes and imputes or removes them — g.part5.handle_lux_extremes","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":null,"dir":"Reference","previous_headings":"","what":"Merge output from physical activity and sleep analysis into one report — g.part5","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"Function merge output g.part2 g.part4 one report enhanced profiling sleep physical activity stratified across intensity levels based bouted periods well non-bouted periods.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"","code":"g.part5(datadir = c(), metadatadir = c(), f0 = c(), f1 = c(), params_sleep = c(), params_metrics = c(), params_247 = c(), params_phyact = c(), params_cleaning = c(), params_output = c(), params_general = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) params_sleep See details GGIR. params_metrics See details GGIR. params_247 See details GGIR. params_phyact See details GGIR. params_cleaning See details GGIR. params_output See details GGIR. params_general See details GGIR. verbose See details GGIR. ... ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"function produce values generates RData file milestone subfolder ms5.incudes dataframe named output. dataframe used g.report.part5 create two reports one per day one per person. See package vignette paragraph \"Output part 5\" description variables.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Merge output from physical activity and sleep analysis into one report — g.part5","text":"","code":"if (FALSE) { # \\dontrun{ metadatadir = \"C:/myfolder/meta\" g.part5(metadatadir=metadatadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.lux_persegment.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","title":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","text":"Extracts per segment day: mean lux, time 1000 lux, time awake, time LUX imputed. Function intended direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.lux_persegment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","text":"","code":"g.part5.lux_persegment(ts, sse, LUX_day_segments, epochSize, desiredtz = \"\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.lux_persegment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","text":"ts Data.frame time series sse Indices corresponding current time window (e.g. MM WW) LUX_day_segments See GGIR epochSize Numeric epoch size seconds desiredtz See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.lux_persegment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","text":"List values (vector) derived variables corresponding names (vector).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.lux_persegment.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract key lux variables per segment of the data. — g.part5.lux_persegment","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.ontsetwaketiming.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","title":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","text":"intended direct use GGIR users. Labels timing wakeing sleep onset part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.ontsetwaketiming.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","text":"","code":"g.part5.onsetwaketiming(qqq, ts, min, sec, hour, timewindowi)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.ontsetwaketiming.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","text":"qqq Start end index window analyses ts Data.frame time series created g.part5 min Numeric vector minute values sec Numeric vector second values hour Numeric vector hour values timewindowi Character indicate timewindow definition used either \"MM\" \"WW\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.ontsetwaketiming.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","text":"list objects: wake, onset, wakei, onseti, skiponset, skipwake.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.ontsetwaketiming.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Identify wake and sleepperiod window timing — g.part5.onsetwaketiming","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.savetimeseries.html","id":null,"dir":"Reference","previous_headings":"","what":"Saves part 5 time series to csv files — g.part5.savetimeseries","title":"Saves part 5 time series to csv files — g.part5.savetimeseries","text":"intended direct use GGIR users. Saves part 5 time series csv files part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.savetimeseries.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Saves part 5 time series to csv files — g.part5.savetimeseries","text":"","code":"g.part5.savetimeseries(ts, LEVELS, desiredtz, rawlevels_fname, DaCleanFile = NULL, includedaycrit.part5 = 2/3, ID = NULL, params_output, params_247 = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.savetimeseries.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Saves part 5 time series to csv files — g.part5.savetimeseries","text":"ts Data.frame time series LEVELS produced one objects output identify_levels desiredtz See GGIR. rawlevels_fname Path file output stored DaCleanFile Content data_cleaning_file documented g.report.part5. used function save_ms5rawlevels TRUE, affects time series files stored. includedaycrit.part5 See g.report.part5. used function save_ms5rawlevels TRUE, affects time series files stored. ID data_cleaning_file used argument specifies participant ID data correspond . params_output Parameters object, see GGIR params_247 See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.savetimeseries.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Saves part 5 time series to csv files — g.part5.savetimeseries","text":"Function provide output, prepare data saving saves file. documention columns see main vignette.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.savetimeseries.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Saves part 5 time series to csv files — g.part5.savetimeseries","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.wakesleepwindows.html","id":null,"dir":"Reference","previous_headings":"","what":"Label wake and sleepperiod window — g.part5.wakesleepwindows","title":"Label wake and sleepperiod window — g.part5.wakesleepwindows","text":"intended direct use GGIR users. Label wake sleepperiod window part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.wakesleepwindows.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Label wake and sleepperiod window — g.part5.wakesleepwindows","text":"","code":"g.part5.wakesleepwindows(ts, part4_output, desiredtz, nightsi, sleeplog, epochSize,ID, Nepochsinhour)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.wakesleepwindows.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Label wake and sleepperiod window — g.part5.wakesleepwindows","text":"ts data.frame time series part4_output cleaned output part 4 desiredtz GGIR nightsi vector indices midnights sleeplog Data.frame sleeplog information loaded g.loadlog epochSize Short epochsize seconds ID ID participant Nepochsinhour Number epochs hour","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.wakesleepwindows.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Label wake and sleepperiod window — g.part5.wakesleepwindows","text":"Object ts","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5.wakesleepwindows.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Label wake and sleepperiod window — g.part5.wakesleepwindows","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_analyseSegment.html","id":null,"dir":"Reference","previous_headings":"","what":"Analyses the time series per time segment for part 5 — g.part5_analyseSegment","title":"Analyses the time series per time segment for part 5 — g.part5_analyseSegment","text":"intended direct use GGIR users, part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_analyseSegment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Analyses the time series per time segment for part 5 — g.part5_analyseSegment","text":"","code":"g.part5_analyseSegment(indexlog, timeList, levelList, segments, segments_names, dsummary, ds_names, params_general, params_output, params_sleep, params_247, params_phyact, sumSleep, sibDef, fullFilename, add_one_day_to_next_date, lightpeak_available, tail_expansion_log, foldernamei, sibreport = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_analyseSegment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Analyses the time series per time segment for part 5 — g.part5_analyseSegment","text":"indexlog List objects related indices window, file, segment passed g.part5 aid selecting time segments keeping track file code . timeList List objects related time series passed g.part5. levelList List objects related intensity levels passed g.part5. segments List produced g.part5 segments_names Vector produced g.part5 dsummary Matrix hold daysummary (segment summary) ds_names Character vector column names dsummary matrix. code collects separately vector assigns end. params_general See GGIR params_output See GGIR params_sleep See GGIR params_247 See GGIR params_phyact See GGIR sumSleep Section data.frame produced g.part4 passed g.part5. sibDef Character identify sib definition. fullFilename Character full filename processed add_one_day_to_next_date Boolean indicate whether one day added next date lightpeak_available Boolean indicate whether light peak available tail_expansion_log Object generated g.part1 passed g.part5 argument recordingEndSleepHour used. foldernamei Character folder name data file stored. sibreport Sibreport object passed g.part5","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_analyseSegment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Analyses the time series per time segment for part 5 — g.part5_analyseSegment","text":"List objects: indexlog, timeList, matrix prelimenary results column names (dsummary ds_names, see input arguments )","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_initialise_ts.html","id":null,"dir":"Reference","previous_headings":"","what":"Initialise time series data from for part 5 — g.part5_initialise_ts","title":"Initialise time series data from for part 5 — g.part5_initialise_ts","text":"Initialise time series dataframe ts, part g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_initialise_ts.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Initialise time series data from for part 5 — g.part5_initialise_ts","text":"","code":"g.part5_initialise_ts(IMP, M, params_247, params_general, longitudinal_axis = c())"},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_initialise_ts.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Initialise time series data from for part 5 — g.part5_initialise_ts","text":"IMP Object derived g.part2 M Object derived g.part1. params_247 See GGIR params_general See GGIR longitudinal_axis passed g.part5, specified user estimated hip data part 2.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part5_initialise_ts.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Initialise time series data from for part 5 — g.part5_initialise_ts","text":"Data.frame ts","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":null,"dir":"Reference","previous_headings":"","what":"Perform temporal pattern analyses — g.part6","title":"Perform temporal pattern analyses — g.part6","text":"function aims facilitate time-pattern analysis building labelled time series derived GGIR part 5","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Perform temporal pattern analyses — g.part6","text":"","code":"g.part6(datadir = c(), metadatadir = c(), f0 = c(), f1 = c(), params_general = c(), params_phyact = c(), params_247 = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Perform temporal pattern analyses — g.part6","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) params_general See details GGIR. params_phyact See details GGIR. params_247 See details GGIR. verbose See details GGIR. ... ensure compatibility R scripts written older GGIR versions, user can also provide parameters listed params_ objects direct argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Perform temporal pattern analyses — g.part6","text":"function produce values generates RData file milestone subfolder ms6.incudes ... (COMPLETED). dataframe used g.report.part6 create reports. See package vignette paragraph (COMPLETED) description variables.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Perform temporal pattern analyses — g.part6","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.part6.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Perform temporal pattern analyses — g.part6","text":"","code":"if (FALSE) { # \\dontrun{ metadatadir = \"C:/myfolder/meta\" g.part6(metadatadir=metadatadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":null,"dir":"Reference","previous_headings":"","what":"function to generate a plot for quality check purposes — g.plot","title":"function to generate a plot for quality check purposes — g.plot","text":"Function takes meta-data generated g.getmeta g.impute create visual representation imputed time periods","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"function to generate a plot for quality check purposes — g.plot","text":"","code":"g.plot(IMP, M, I, durplot)"},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"function to generate a plot for quality check purposes — g.plot","text":"IMP output g.impute M output g.getmeta output g.inspectfile durplot number days plot","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"function to generate a plot for quality check purposes — g.plot","text":"function produces plot, values","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"function to generate a plot for quality check purposes — g.plot","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"function to generate a plot for quality check purposes — g.plot","text":"","code":"if (FALSE) { # \\dontrun{ #inspect file: I = g.inspectfile(datafile) #autocalibration: C = g.calibrate(datafile) #get meta-data: M = g.getmeta(datafile) } # } data(data.getmeta) data(data.inspectfile) #impute meta-data: IMP = g.impute(M = data.getmeta, I = data.inspectfile, strategy = 1, hrs.del.start = 0, hrs.del.end = 0, maxdur = 0) #plot data g.plot(IMP, M = data.getmeta, I = data.inspectfile, durplot=4)"},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"Function called GGIR generate report. intended direct use user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"","code":"g.plot5(metadatadir = c(), dofirstpage = FALSE, viewingwindow = 1, f0 = c(), f1 = c(), overwrite = FALSE, metric=\"ENMO\",desiredtz = \"\", threshold.lig = 30, threshold.mod = 100, threshold.vig = 400, visualreport_without_invalid = TRUE, includedaycrit = 0.66, includenightcrit = 0.66, verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . dofirstpage Boolean indicate whether first page historgrams summarizing whole measurement added viewingwindow See GGIR f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) overwrite See GGIR metric one metrics want consider describe behaviour. metric interest need calculated M (see g.part1) desiredtz See GGIR threshold.lig See GGIR threshold.mod See GGIR threshold.vig See GGIR visualreport_without_invalid See GGIR includenightcrit See GGIR includedaycrit See GGIR verbose See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"values, function generates plot","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"Vincent T van Hees Matthew R Patterson ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.plot5.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate user-friendly visual report. The first part of the report summarizes important daily metrics in bar plot format. The second part of the report shows the raw data and annotations in 24-hr periods. Angle-z is shown with sleep annotations during the SPT (sleep period time) window. ENMO is shown with daytime inactivity and PA (physical activity) annotations in the lower section of each 24-hr plot. The PA annotations are based on a 10 minute bout metric and 80 of a 10 minute bout of MVPA. Vigorous PA is a short window of time above threshold.vig that is part of a bout of MVPA. Light PA is a short window of time above threshold.lig that is part of a bout of light PA. — g.plot5","text":"","code":"if (FALSE) { # \\dontrun{ # generate plots for the first 10 files: g.plot5(metadatadir=\"C:/output_mystudy/meta/basic\",dofirstpage=TRUE, viewingwindow = 1,f0=1,f1=10,overwrite=FALSE,desiredtz = \"Europe/London\", threshold.lig,threshold.mod,threshold.vig) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":null,"dir":"Reference","previous_headings":"","what":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"function used g.getmeta g.calibrate read large blocks accelerometer file, processed deleted memory. needed memory management.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"","code":"g.readaccfile(filename, blocksize, blocknumber, filequality, ws, PreviousEndPage = 1, inspectfileobject = c(), PreviousLastValue = c(0,0,1), PreviousLastTime = NULL, params_rawdata = c(), params_general = c(), header = NULL, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"filename filename blocksize Size blocks (file pages) read blocknumber Block number relative start file, starting 1. filequality Single row dataframe columns: filetooshort, filecorrupt, filedoesnotholdday. value TRUE FALSE ws Larger windowsize non-detection, see documentation g.part2 PreviousEndPage Page number previous block ended (automatically assigned within g.getmeta g.calibrate). inspectfileobject Output function g.inspectfile. PreviousLastValue Automatically identified last value previous chunk data read. PreviousLastTime Automatically identified last timestamp previous chunk data read. params_rawdata See g.part1 params_general See g.part1 header Header information extracted previous time file read, re-used instead extracted . ... input arguments needed function read.myacc.csv working non-standard csv formatted files. Furter, argument used previous version g.readaccfile, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"P Block object extracted file format specific accelerometer brand filequality function arguments isLastBlock Boolean indicating whether last block read endpage Page number blocked ends, used input argument PreviousEndPage reading next block.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readaccfile.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generic functiont to read large blocks of accelerometer data — g.readaccfile","text":"","code":"if (FALSE) { # \\dontrun{ filequality = data.frame(filetooshort = FALSE, filecorrupt = FALSE, filedoesnotholdday = FALSE) output = g.readaccfile(filename = \"C:/myfile.bin\", blocksize = 20000, blocknumber = 1, selectdaysfile = c(), filequality = filequality, dayborder = 0, PreviousEndPage = c()) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.readtemp_movisens.html","id":null,"dir":"Reference","previous_headings":"","what":"Reads the temperature from movisens files. — g.readtemp_movisens","title":"Reads the temperature from movisens files. — g.readtemp_movisens","text":"Reads temperature movisens files, resamples adds matrix accelerations stored","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readtemp_movisens.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reads the temperature from movisens files. — g.readtemp_movisens","text":"","code":"g.readtemp_movisens(datafile, from = c(), to = c(), acc_sf, acc_length, interpolationType=1)"},{"path":"https://wadpac.github.io/GGIR/reference/g.readtemp_movisens.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reads the temperature from movisens files. — g.readtemp_movisens","text":"datafile Full path folder movisens bin files stored. Note movisens store set bin file one folder per recording. GGIR read pertinent bin file access temperature data. Origin point derive temperature movisens files (automatically calculated GGIR) End point derive temperature movisens files (automatically calculated GGIR) acc_sf Sample frequency acceleration data acc_length number acceleration data samples interpolationType Integer indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readtemp_movisens.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reads the temperature from movisens files. — g.readtemp_movisens","text":"Data matrix temperature values resampled 64 Hz.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.readtemp_movisens.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reads the temperature from movisens files. — g.readtemp_movisens","text":"","code":"if (FALSE) { # \\dontrun{ P = g.readtemp_movisens(datafile, from = c(), to = c(), acc_sf = 64, acc_length = 3000) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part2.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate report from milestone data produced by g.part2 — g.report.part2","title":"Generate report from milestone data produced by g.part2 — g.report.part2","text":"Creates report milestone data produced g.part2. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate report from milestone data produced by g.part2 — g.report.part2","text":"","code":"g.report.part2(metadatadir = c(), f0 = c(), f1 = c(), maxdur = 0, store.long = FALSE, params_output, verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate report from milestone data produced by g.part2 — g.report.part2","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) maxdur see g.part2 store.long Booelean indicate whether output stored long format addition default wide format. Automatically turned TRUE using day segmentation qwindow. params_output Parameters object, see GGIR verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate report from milestone data produced by g.part2 — g.report.part2","text":"Function produce data, writes reports csv format visual reports pdf format","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part2.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate report from milestone data produced by g.part2 — g.report.part2","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part4.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate report from milestone data produced by g.part4 — g.report.part4","title":"Generate report from milestone data produced by g.part4 — g.report.part4","text":"Creates report milestone data produced g.part4. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part4.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate report from milestone data produced by g.part4 — g.report.part4","text":"","code":"g.report.part4(datadir = c(), metadatadir = c(), loglocation = c(), f0 = c(), f1 = c(), data_cleaning_file = c(), sleepwindowType = \"SPT\", params_output, verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part4.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate report from milestone data produced by g.part4 — g.report.part4","text":"datadir Directory accelerometer files stored, e.g. \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . loglocation see g.part4 f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) data_cleaning_file see GGIR sleepwindowType see GGIR params_output Parameters object, see GGIR verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part4.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate report from milestone data produced by g.part4 — g.report.part4","text":"Function produce data, writes reports csv format visual report pdf. following files stored root results folder: part4_nightsummary_sleep_cleaned.csv part4_summary_sleep_cleaned.csv following files stored folder results/QC: part4_nightsummary_sleep_full.csv part4_summary_sleep_full.csv sleeplog used *_full.csv stored QC folder includes estimates nights data, *_cleaned.csv results folder includes estimates nights data excluding nights sleeplog entry valid accelerometer data. sleep log used * _cleaned.csv includes nights *_full.csv excluding nights insufficient data. study sleeplog available subset participants, want include individuals analysis, use *_full.csv output clean night level data excluding rows cleaningcode > 1 cases invalid accelerometer data present. means studies missing sleeplog entries individuals nights using *_full.csv output excluding rows (nights) cleaningcode > 1 lead * _cleaned.csv plus sleep estimates nights missing sleeplog, providing enough accelerometer data nights. words, *_cleaned.csv perfect want rely nights sleeplog use sleeplog . scenarios advise using *_full.csv report clean . See package vignette sections \"Sleep analysis\" \"Output part 4\" elaborative description sleep analysis reporting.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part4.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate report from milestone data produced by g.part4 — g.report.part4","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate report from milestone data produced by g.part5 — g.report.part5","title":"Generate report from milestone data produced by g.part5 — g.report.part5","text":"Creates report milestone data produced g.part5. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate report from milestone data produced by g.part5 — g.report.part5","text":"","code":"g.report.part5(metadatadir = c(), f0 = c(), f1 = c(), loglocation = c(), params_cleaning = NULL, LUX_day_segments = c(), params_output, verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate report from milestone data produced by g.part5 — g.report.part5","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) loglocation see g.part4 params_cleaning See details GGIR. LUX_day_segments see g.part5 params_output Parameters object, see GGIR verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate report from milestone data produced by g.part5 — g.report.part5","text":"Function produce data, writes reports csv format following files stored root results folder: part5_daysummary_* part5_personsummary_* following files stored folder results/QC: part5_daysummary_full_* See package vignette paragraph \"Waking-waking 24 hour time-use analysis\" \"Output part 5\" elaborative description full day time-use analysis reporting.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate report from milestone data produced by g.part5 — g.report.part5","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5_dictionary.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","title":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","text":"Creates data dictionary definitions outcomes exported reports milestone data produced g.part5. intended direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5_dictionary.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","text":"","code":"g.report.part5_dictionary(metadatadir, params_output)"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5_dictionary.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . params_output Parameters object, see GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5_dictionary.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","text":"Function produce data, writes data dictionaries reports csv format following files stored root results folder: part5_dictionary_daysummary_* part5_dictionary_personsummary_*","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part5_dictionary.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate data dictionary for reports from milestone data produced by g.part5 — g.report.part5_dictionary","text":"Vincent T van Hees Jairo Hidalgo Migueles ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part6.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate report from milestone data produced by g.part6 — g.report.part6","title":"Generate report from milestone data produced by g.part6 — g.report.part6","text":"Creates report milestone data produced g.part6. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part6.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate report from milestone data produced by g.part6 — g.report.part6","text":"","code":"g.report.part6(metadatadir = c(), f0 = c(), f1 = c(), params_cleaning = NULL, params_output, verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part6.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate report from milestone data produced by g.part6 — g.report.part6","text":"metadatadir Directory holds folder 'meta' inside folder 'basic' contains milestone data produced g.part1. folderstructure normally created g.part1 GGIR recognise value metadatadir . f0 File index start (default = 1). Index refers filenames sorted alphabetical order f1 File index finish (defaults number files available, .e., f1 = 0) params_cleaning See details GGIR. params_output Parameters object, see GGIR verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part6.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate report from milestone data produced by g.part6 — g.report.part6","text":"Function produce data, writes reports csv format following files stored root results folder: part6_summary.csv See package vignette \"HouseHoldCoanalysis\".","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.report.part6.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate report from milestone data produced by g.part6 — g.report.part6","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.shell.GGIR.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper function around function GGIR — g.shell.GGIR","title":"Wrapper function around function GGIR — g.shell.GGIR","text":"function used central function package, renamed GGIR. can still use function call g.shell.GGIR arguments passed function GGIR. done preserve consistency older use cases GGIR package. documentation can now found GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.shell.GGIR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper function around function GGIR — g.shell.GGIR","text":"","code":"g.shell.GGIR(...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.shell.GGIR.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper function around function GGIR — g.shell.GGIR","text":"... parameters used GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.shell.GGIR.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper function around function GGIR — g.shell.GGIR","text":"function provides values, ensures functions called output stored. See GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.shell.GGIR.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Wrapper function around function GGIR — g.shell.GGIR","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.det.html","id":null,"dir":"Reference","previous_headings":"","what":"sustiained inactivty bouts detection — g.sib.det","title":"sustiained inactivty bouts detection — g.sib.det","text":"Detects sustiained inactivty bouts. Function intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.det.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"sustiained inactivty bouts detection — g.sib.det","text":"","code":"g.sib.det(M, IMP, I, twd = c(-12, 12), acc.metric = \"ENMO\", desiredtz = \"\", myfun=c(), sensor.location = \"wrist\", params_sleep = c(), zc.scale = 1, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.det.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"sustiained inactivty bouts detection — g.sib.det","text":"M Object produced g.getmeta IMP Object produced g.impute Object produced g.inspectfile twd Vector length 2, indicating time window consider hours relative midnight. acc.metric one metrics want consider analyze L5. metric interest need calculated M (see g.part1) desiredtz See g.part3 myfun External function object applied raw data. See details applyExtFunction. sensor.location Character indicate sensor location, default wrist. hip HDCZA algorithm also requires longitudinal axis sensor -45 +45 degrees. params_sleep See g.part3 zc.scale Used zero-crossing counts . Scaling factor applied counts calculated (GGIR part 3). See GGIR. ... argument used previous version g.sib.det, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.det.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"sustiained inactivty bouts detection — g.sib.det","text":"output = Dataframe every epoch classification detection.failed = Boolean whether detection failed L5list = L5 every day (defined noon noon)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.det.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"sustiained inactivty bouts detection — g.sib.det","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Create plot of sustained inactivity bouts — g.sib.plot","title":"Create plot of sustained inactivity bouts — g.sib.plot","text":"Function create plot sustained inactivity bouts quality check purposes part g.part3. intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create plot of sustained inactivity bouts — g.sib.plot","text":"","code":"g.sib.plot(SLE, M, I, plottitle, nightsperpage=7, desiredtz=\"\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create plot of sustained inactivity bouts — g.sib.plot","text":"SLE Output g.sib.det M Output g.getmeta Output g.inspectfile plottitle Title used plot nightsperpage Number nights show per page desiredtz See g.part3","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.plot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create plot of sustained inactivity bouts — g.sib.plot","text":"Function output plot","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.plot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create plot of sustained inactivity bouts — g.sib.plot","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.sum.html","id":null,"dir":"Reference","previous_headings":"","what":"sustiained inactivty bouts detection — g.sib.sum","title":"sustiained inactivty bouts detection — g.sib.sum","text":"Detects sustiained inactivty bouts. Function intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.sum.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"sustiained inactivty bouts detection — g.sib.sum","text":"","code":"g.sib.sum(SLE,M,ignorenonwear=TRUE,desiredtz=\"\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.sum.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"sustiained inactivty bouts detection — g.sib.sum","text":"SLE Output g.sib.det M Object produced g.getmeta ignorenonwear TRUE ignore detected monitor non-wear periods avoid confusion monitor non-wear time sustained inactivity (default = TRUE) desiredtz See g.part3","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.sum.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"sustiained inactivty bouts detection — g.sib.sum","text":"Dataframe per night per definition sustained inactivity bouts start end time sustained inactivity bout","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sib.sum.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"sustiained inactivty bouts detection — g.sib.sum","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sibreport.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate sustiained inactivty bouts report — g.sibreport","title":"Generate sustiained inactivty bouts report — g.sibreport","text":"Generate sustained inactivity bout report. Function intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sibreport.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate sustiained inactivty bouts report — g.sibreport","text":"","code":"g.sibreport(ts, ID, epochlength, logs_diaries=c(), desiredtz=\"\")"},{"path":"https://wadpac.github.io/GGIR/reference/g.sibreport.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate sustiained inactivty bouts report — g.sibreport","text":"ts Data frame time series created inside function g.part5 ID Recording identifier (character numeric) epochlength Numeric indicate epoch length seconds ts object logs_diaries Object produced g.loadlog function desiredtz See g.getmeta","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sibreport.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate sustiained inactivty bouts report — g.sibreport","text":"Dataframe one row per sustained inactivity bout corresponding properties stored data.frame columns.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.sibreport.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate sustiained inactivty bouts report — g.sibreport","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":null,"dir":"Reference","previous_headings":"","what":"Detects whether accelerometer is worn — g.weardec","title":"Detects whether accelerometer is worn — g.weardec","text":"Uses object produced g.part1 assess whether accelerometer worn","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detects whether accelerometer is worn — g.weardec","text":"","code":"g.weardec(M, wearthreshold, ws2, nonWearEdgeCorrection = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detects whether accelerometer is worn — g.weardec","text":"M Object produced g.getmeta wearthreshold Number axis least need meet non-wear criteria ws2 Large windowsize used seconds apply non-wear detection Small window size needed, inherent object M nonWearEdgeCorrection Boolean indicated whether EdgeCorrection described 2013 applied (default = TRUE, consistent code )","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detects whether accelerometer is worn — g.weardec","text":"r1 Participant id extracted file r2 Night number r3 Detected onset sleep expressed hours since previous midnight LC fraction 15 minute windows 5 percent clipping LC2 fraction 15 minute windows 80 percent clipping","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detects whether accelerometer is worn — g.weardec","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/g.weardec.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Detects whether accelerometer is worn — g.weardec","text":"","code":"data(data.getmeta) output = g.weardec(M = data.getmeta, wearthreshold = 2, ws2 = 900)"},{"path":"https://wadpac.github.io/GGIR/reference/getfolderstructure.html","id":null,"dir":"Reference","previous_headings":"","what":"Extracts folderstructure based on data directory. — getfolderstructure","title":"Extracts folderstructure based on data directory. — getfolderstructure","text":"Extracts folderstructure based data directory. used accelerometer files stored hierarchical folder structure user likes reference exact position folder tree, rather just filename. Function intended direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/getfolderstructure.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extracts folderstructure based on data directory. — getfolderstructure","text":"","code":"getfolderstructure(datadir=c(),referencefnames=c())"},{"path":"https://wadpac.github.io/GGIR/reference/getfolderstructure.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extracts folderstructure based on data directory. — getfolderstructure","text":"datadir Argument datadir used various functions GGIR referencefnames vector filename filter ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/getfolderstructure.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extracts folderstructure based on data directory. — getfolderstructure","text":"List items: fullfilenames: vector full paths folders including name file foldername: vector names folder file stroed (distal folder folder tree).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/getfolderstructure.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extracts folderstructure based on data directory. — getfolderstructure","text":"","code":"if (FALSE) { # \\dontrun{ folderstructure = getfolderstructure(datadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/get_nw_clip_block_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Set monitor brand specific parameters — get_nw_clip_block_params","title":"Set monitor brand specific parameters — get_nw_clip_block_params","text":"Set monitor brand specific thresholds non-wear detection, clipping etection, blocksizes loaded. designed direct use user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/get_nw_clip_block_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set monitor brand specific parameters — get_nw_clip_block_params","text":"","code":"get_nw_clip_block_params(monc, dformat, deviceSerialNumber = \"\", sf, params_rawdata)"},{"path":"https://wadpac.github.io/GGIR/reference/get_nw_clip_block_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set monitor brand specific parameters — get_nw_clip_block_params","text":"monc See g.inspectfile dformat See g.dotorcomma deviceSerialNumber produced g.extractheadervars sf Numeric, sample frequency Hertz params_rawdata See GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/get_nw_clip_block_params.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Set monitor brand specific parameters — get_nw_clip_block_params","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/get_starttime_weekday_truncdata.html","id":null,"dir":"Reference","previous_headings":"","what":"Get starttime (adjusted), weekday, and adjust data accordingly. — get_starttime_weekday_truncdata ","title":"Get starttime (adjusted), weekday, and adjust data accordingly. — get_starttime_weekday_truncdata ","text":"Function intended direct use user. Used inside g.getmeta intermediate step loading raw data calibrating . step includes extracting starttime adjusting nearest integer number long epoch window lengths hour, truncating data accordingly, extracting corresponding weekday.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/get_starttime_weekday_truncdata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get starttime (adjusted), weekday, and adjust data accordingly. — get_starttime_weekday_truncdata ","text":"","code":"get_starttime_weekday_truncdata(monc, dformat, data, header, desiredtz, sf, datafile, ws2, configtz = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/get_starttime_weekday_truncdata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get starttime (adjusted), weekday, and adjust data accordingly. — get_starttime_weekday_truncdata ","text":"monc See g.inspectfile dformat See g.dotorcomma data Data part g.readaccfile output header Header part g.readaccfile output desiredtz See g.getmeta sf Numeric, sample frequency Hertz datafile See g.getmeta ws2 Long epoch length configtz See g.getmeta","code":""},{"path":"https://wadpac.github.io/GGIR/reference/get_starttime_weekday_truncdata.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get starttime (adjusted), weekday, and adjust data accordingly. — get_starttime_weekday_truncdata ","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"A package to process multi-day raw accelerometer data — GGIR-package","title":"A package to process multi-day raw accelerometer data — GGIR-package","text":"Disclaimer: new GGIR user please see GGIR github-pages narrative overview GGIR. document primarily aimed documenting functions input arguments. Please note google discussion group package (link ). can thank us sharing code package developing generic purpose tool citing package name citing supporting publications (e.g. Migueles et al. 2019) publications.","code":""},{"path":[]},{"path":"https://wadpac.github.io/GGIR/reference/GGIR-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"A package to process multi-day raw accelerometer data — GGIR-package","text":"Vincent T van Hees main creator developer Zhou Fang developed calibration algorithm used function g.calibrate Joe Heywood helped develop functionality process specific recording days Severine Sabia, Mathilde Chen, Manasa Yerramalla extensively tested provided feedback various functions Joan Capdevila Pujol helped improve various functions Jairo H Migueles helped improve various functions Matthew R Patterson helped enhancing visual report. Lena Kushleyeva helped fix bug sleep detection. Taren Sanders helped tidy parallel processing functionality","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"A package to process multi-day raw accelerometer data — GGIR-package","text":"Migueles JH, Rowlands AV, et al. GGIR: Research Community-Driven Open Source R Package Generating Physical Activity Sleep Outcomes Multi-Day Raw Accelerometer Data. Journal Measurement Physical Behaviour. 2(3) 2019. doi:10.1123/jmpb.2018-0063. van Hees VT, Gorzelniak L, Dean Leon EC, Eder M, Pias M, et al. (2013) Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. PLoS ONE 8(4): e61691. doi:10.1371/journal.pone.0061691 van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Auto-calibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Aug 7 van Hees VT, Sabia S, et al. (2015) novel, open access method assess sleep duration using wrist-worn accelerometer, PLoS ONE, November 2015","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR-package.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"A package to process multi-day raw accelerometer data — GGIR-package","text":"","code":"if (FALSE) { # \\dontrun{ #inspect file: I = g.inspectfile(datafile) #autocalibration: C = g.calibrate(datafile) #get meta-data: M = g.getmeta(datafile) } # } data(data.getmeta) data(data.inspectfile) data(data.calibrate) #impute meta-data: IMP = g.impute(M = data.getmeta, I = data.inspectfile) #analyse and produce summary: A = g.analyse(I = data.inspectfile, C = data.calibrate, M = data.getmeta, IMP, ID = \"01wk0\") #plot data g.plot(IMP, M = data.getmeta, I = data.inspectfile, durplot=4)"},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":null,"dir":"Reference","previous_headings":"","what":"Shell function for analysing an accelerometer dataset. — GGIR","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"function designed help users operate steps analysis. helps generate structure milestone data, produces user-friendly reports. function acts shell calls g.part1, g.part2, g.part3, g.part4 g.part5.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"","code":"GGIR(mode = 1:5, datadir = c(), outputdir = c(), studyname = c(), f0 = 1, f1 = 0, do.report = c(2, 4, 5, 6), configfile = c(), myfun = c(), verbose = TRUE, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"mode Numeric (default = 1:5). Specify five parts need run, e.g., mode = 1 makes g.part1 run; mode = 1:5 makes whole GGIR pipeline run, g.part1 g.part5. Optionally mode can also include number 6 tell GGIR run g.part6 currently development. datadir Character (default = c()). Directory accelerometer files stored, e.g., \"C:/mydata\", list accelerometer filenames directories, e.g. c(\"C:/mydata/myfile1.bin\", \"C:/mydata/myfile2.bin\"). outputdir Character (default = c()). Directory output needs stored. Note function attempt create folders directory uses folder keep output. studyname Character (default = c()). datadir folder, study given name data directory. datadir list filenames studyname specified input argument used name study. f0 Numeric (default = 1). File index start (default = 1). Index refers filenames sorted alphabetical order. f1 Numeric (default = 0). File index finish (defaults number files available). .report Numeric (default = c(2, 4, 5, 6)). parts generate summary spreadsheet: 2, 4, 5, /6. Default c(2, 4, 5, 6). report generated based available milestone data. creating milestone data multiple machines advisable turn report generation generating milestone data, value = c(), merge milestone data turn report generation back setting overwrite FALSE. configfile Character (default = c()). Configuration file previously generated function GGIR. See details. myfun List (default = c()). External function object applied raw data. See package vignette detailed tutorial examples use function embedding: https://cran.r-project.org/package=GGIR/vignettes/ExternalFunction.html verbose Boolean (default = TRUE). indicate whether console message printed. Note warnings error always printed can suppressed suppressWarning() suppressMessages(). ... parameters used GGIR. Given large number parameters used GGIR grouped objects start \"params_\". documented details section. provide objects argument function GGIR, can provide parameters inside input function GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"function provides values, ensures functions called output stored. , configuration file stored containing argument values used facilitate reproducibility.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"used function GGIR output directory (outputdir) filled milestone data results. Function GGIR stores explicitely entered argument values default values argument explicitely provided csv-file named config.csv stored root output folder. config.csv file accepted input GGIR argument configfile replace specification arguments, except datadir outputdir. practical value eases replication analysis, instead share R script, sharing config.csv file sufficient. , config.csv file contribute reproducibility data analysis. Note: combining configuration file explicitely provided argument values, explicitely provided argument values overrule argument values configuration file. parameter neither provided via configuration file input GGIR uses default paramter values can inspected command print(load_params()), specifically interested certain subgroup parameters, e.g., physical activity, can print(load_params()$params_phyact). defaults part GGIR code changed user. parameters can used GGIR :","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-general","dir":"Reference","previous_headings":"","what":"params_general","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used across GGIR parts fall categories. overwrite Boolean (default = FALSE). want overwrite analysis milestone data exists? overwrite = FALSE, milestone data previous analysis used available visual reports created . dayborder Numeric (default = 0). Hour days start end (dayborder = 4 mean 4 ). .parallel Boolean (default = TRUE). Whether use multi-core processing (works least 4 CPU cores available). maxNcores Numeric (default = NULL). Maximum number cores use argument .parallel set true. GGIR default uses either maximum number available cores number files process (whichever lower), argument allows set lower maximum. acc.metric Character (default = \"ENMO\"). one acceleration metrics want use acceleration magnitude analyses GGIR part 5 visual report? example: \"ENMO\", \"LFENMO\", \"MAD\", \"NeishabouriCount_y\", \"NeishabouriCount_vm\". one acceleration metric can specified selected metric needs calculated part 1 (see g.part1) via arguments .enmo = TRUE .mad = TRUE. part5_agg2_60seconds Boolean (default = FALSE). Whether use aggregate epochs 60 seconds part GGIR g.part5 analysis. Aggregation doen averaging. Note working count metrics Neishabouri counts means threshold can stay part 2, threshold expressed relative original epoch size, even averaged per minute. example want use cut-point 100 count per minute specify mvpathreshold = 100 * (5/60) well `threshold.mod = 100 * (5/60) regardless whether set part5_agg2_60seconds TRUE FALSE. print.filename Boolean (default = FALSE). Whether print filename analysing (case .parallel = FALSE). Printing filename can useful investigate problems (e.g., verify file read). desiredtz Character (default = \"\", .e., system timezone). Timezone device configured experiments took place. experiments took place different timezone, use argument timezone experiments took place argument configtz specify device configured. Use \"TZ identifier\" specified https://en.wikipedia.org/wiki/Zone.tab set desiredtz, e.g., \"Europe/London\". configtz Character (default = \"\", .e., system timezone). moment functional GENEActiv .bin, AX3 cwa, ActiGraph .gt3x, ad-hoc csv file format. Timezone accelerometer configured. use argument timezone configuration timezone recording took place different. Use \"TZ identifier\" specified https://en.wikipedia.org/wiki/Zone.tab set configtz, e.g., \"Europe/London\". sensor.location Character (default = \"wrist\"). indicate sensor location, default wrist. hip, HDCZA algorithm sleep detection also requires longitudinal axis sensor -45 +45 degrees. windowsizes Numeric vector, three values (default = c(5, 900, 3600)). indicate lengths windows c(window1, window2, window3): window1 short epoch length seconds, default 5, time window acceleration angle metrics calculated; window2 long epoch length seconds non-wear signal clipping defined, default 900 (expected multitude 60 seconds); window3 window length data used non-wear detection default 3600 seconds. , window3 larger window2 use overlapping windows, window2 equals window3 non-wear periods assessed non-overlapping windows. idloc Numeric (default = 1). idloc = 1 code assumes ID number stored obvious header field. Note ActiGraph data ID never stored file header. value set 2, 5, 6, 7, GGIR looks filename extracts character string preceding first occurance \"_\" (idloc = 2), \" \" (space, idloc = 5), \".\" (dot, idloc = 6), \"-\" (idloc = 7), respectively. may noticed idloc 3 4 skipped, used one study 2012, actively maintained anymore, legacy code omitted. expand_tail_max_hours Numeric (default = NULL). parameter replaced recordingEndSleepHour. recordingEndSleepHour Numeric (default = NULL). Time (hours) recording end (later) expand g.part1 output synthetic data trigger sleep detection last night. Using argument recordingEndSleepHour implies assumption participant fell asleep end recording recording ended recordingEndSleepHour hour last day. assumption may always hold true used caution. synthetic data metashort entails: timestamps continuing regularly, zeros acceleration metrics EN, one EN. Angle columns created way triggers sleep detection using equation: round(sin((1:length_expansion) / (900/epochsize))) * 15. keep track tail expansion g.part1 stores length expansion RData files, passed via g.part2, g.part3, g.part4 g.part5. g.part5 tail expansion size included additional variable csv-reports. g.part4 csv-report last night omitted, know sleep estimates last night trustworthy. Similarly, g.part5 output columns related sleep assessment omitted last window avoid biasing averages. , synthetic data also ignored visualizations time series output avoid biased output. dataFormat Character (default = \"raw\"). indicate format data datadir. Alternatives: ukbiobank_csv, actiwatch_csv, actiwatch_awd, actigraph_csv, sensewear_xls, correspond epoch level data files , respecitively, UK Biobank csv format, Actiwatch csv format, Actiwatch awd format, ActiGraph csv format, Sensewear xls format (also works xlsx). , assumed epoch size UK Biobank csvdata 5 seconds. epoch size non-raw data formats flexible, make sure set first value argument windowsizes accordingly. Also working non-raw data formats specify argument extEpochData_timeformat documented . ukbiobank_csv nonwear column data , actiwatch_csv, actiwatch_awd, actigraph_csv, sensewear_xls non-wear detected 60 minute rolling zeros. length window can modified third value argument windowsizes expressed seconds. maxRecordingInterval Numeric (default = NULL). indicate maximum gap hours repeated measurements ID recordings appended. , assumption ID can matched, make sure argument idloc set correctly. argument maxRecordingInterval set NULL (default) recordings appended. recordings overlap GGIR use data latest recording. recordings separated timegap recordings filled data points resemble monitor worn. maximum value maxFile gap 504 (21 days). recordings accelerometer brand appended. part 2 csv report show number appended recordings, sampling rate , time overlap gap names filenames respective recording. extEpochData_timeformat Character (default = \"%d-%m-%Y %H:%M:%S\"). specify time format used external epoch level data argument dataFormat set \"actiwatch_csv\", \"actiwatch_awd\", \"actigraph_csv\" \"sensewear_xls\". example \"%Y-%m-%d %:%M:%S %p\" \"2023-07-11 01:24:01 PM\" \"%m/%d/%Y %H:%M:%S\" \"2023-07-11 13:24:01\"","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-rawdata","dir":"Reference","previous_headings":"","what":"params_rawdata","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used related reading pre-processing raw data, excluding parameters related metrics params_metrics object. backup.cal.coef Character (default = \"retrieve\"). Option use backed-calibration coefficient instead deriving calibration coefficients analysing file twice. Argument backup.cal.coef two usecase. Use case 1: auto-calibration fails user option provide back- calibration coefficients via argument. value argument needs name directory csv-spreadsheet following column names subsequent values: \"filename\" names accelerometer files calibration coefficients need applied case auto-calibration fails; \"scale.x\", \"scale.y\", \"scale.z\" scaling coefficients; \"offset.x\", \"offset.y\", \"offset.z\" offset coefficients, ; \"temperature.offset.x\", \"temperature.offset.y\", \"temperature.offset.z\" temperature offset coefficients. can useful analysing short lasting laboratory experiments insufficient sphere data perform auto-calibration, calibration coefficients can derived alternative way. users responsibility compile csv-spreadsheet. Instead building file user can also Use case 2: user wants avoid performing auto-calibration repeatedly file. backup.cal.coef value set \"retrieve\" (default) GGIR look \"data_quality_report.csv\" file outputfolder QC, holds previously generated calibration coefficients. want happen, deleted data_quality_report.csv QC folder set value \"redo\". minimumFileSizeMB Numeric (default = 2). Minimum File size MB required enter processing. argument can help avoid short uninformative files enter analyses. Given typical accelerometer collects several MBs per hour, default setting skip tiny files. .cal Boolean (default = TRUE). Whether apply auto-calibration g.calibrate. Recommended setting TRUE. imputeTimegaps Boolean (default = TRUE). indicate whether timegaps larger 1 sample imputed. Currently used .gt3x data ActiGraph .csv format, timegaps can expected result Actigraph's idle sleep.mode configuration. spherecrit Numeric (default = 0.3). minimum required acceleration value (g) sides 0 g axis. Used judge whether sphere sufficiently populated minloadcrit Numeric (default = 168). minimum number hours code needs read autocalibration procedure effective (sensitive multitudes 12 hrs, values ceiled). loading hours extra data loaded calibration error reduced 0.01 g. printsummary Boolean (default = FALSE). TRUE print summary calibration procedure console done. chunksize Numeric (default = 1). Value specify size chunks loaded fraction approximately 12 hour period auto-calibration procedure fraction 24 hour period metric calculation, e.g., 0.5 equals 6 12 hour chunks, respectively. machines less 4Gb RAM memory < 2GB memory per process using .parallel = TRUE value 1 recommended. value constrained GGIR lower 0.05. Please note setting 0.05 produce output 3rd value parameter windowsizes 3600. dynrange Numeric (default = NULL). Provide dynamic range 8 gravity. interpolationType Integer (default = 1). indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour. rmc.file Character (default = NULL). Filename file read working directory, full path file otherwise. rmc.nrow Numeric (default = NULL). Number rows read, nrow argument read.csv nrows fread. whole file read default (.e., rmc.nrow = Inf). rmc.skip Numeric (default = 0). Number rows skip, skip argument read.csv fread. rmc.dec Character (default = \".\"). Decimal used numbers, dec argument read.csv fread. rmc.firstrow.acc Numeric (default = NULL). First row (number) acceleration data. rmc.firstrow.header Numeric (default = NULL). First row (number) header. Leave blank file header. rmc.header.length Numeric (default = NULL). file header, specify header length (number rows). rmc.col.acc Numeric, three values (default = c(1, 2, 3)). Vector three column (numbers) acceleration signals stored. rmc.col.temp Numeric (default = NULL). Scalar column (number) temperature stored. Leave default setting temperature available. temperature used g.calibrate. rmc.col.time Numeric (default = NULL). Scalar column (number) timestamps stored. Leave default setting timestamps stored. rmc.unit.acc Character (default = \"g\"). Character unit acceleration values: \"g\", \"mg\", \"bit\". rmc.unit.temp Character (default = \"C\"). Character unit temperature values: (K)elvin, (C)elsius, (F)ahrenheit. rmc.unit.time Character (default = \"POSIX\"). Character unit timestamps: \"POSIX\", \"UNIXsec\" (seconds since origin, see argument rmc.origin), \"character\", \"ActivPAL\" (exotic timestamp format used ActivPAL activity monitor). rmc.format.time Character (default = \" Character giving date-time format used strptime. used rmc.unit.time: character POSIX. rmc.bitrate Numeric (default = NULL). unit acceleration bit provide bit rate, e.g., 12 bit. rmc.dynamic_range Numeric character (default = NULL). unit acceleration bit provide dynamic range deviation g zero, e.g., +/-6g mean argument needs 6. give argument character value code search file header elements name equal character value use corresponding numeric value next dynamic range. rmc.unsignedbit Boolean (default = TRUE). unsignedbit = TRUE means bits positive numbers. unsignedbit = FALSE bits positive negative. rmc.origin Character (default = \"1970-01-01\"). Origin time unit time UNIXsec, e.g., 1970-1-1. rmc.desiredtz Character (default = NULL). Timezone experiments took place. argument scheduled deprecated now used overwrite desiredtz provided. rmc.configtz Character (default = NULL). Timezone device configured. argument scheduled deprecated now used overwrite configtz provided. rmc.sf Numeric (default = NULL). Sample rate Hertz, stored file header used instead (see argument rmc.headername.sf). rmc.headername.sf Character (default = NULL). file header: Row name sample frequency can found. rmc.headername.sn Character (default = NULL). file header: Row name serial number can found. rmc.headername.recordingid Character (default = NULL). file header: Row name recording ID can found. rmc.header.structure Character (default = NULL). Used split header name header value, e.g., \":\" \" \". rmc.check4timegaps Boolean (default = FALSE). indicate whether gaps time imputed zeros. sensing equipment provides accelerometer gaps time. rest GGIR designed , setting argument TRUE gaps time filled zeros. rmc.col.wear Numeric (default = NULL). external wear detection outcome stored part data can used GGIR. argument specifies column wear detection (Boolean) stored. rmc.doresample Boolean (default = FALSE). indicate whether resample data based available timestamps extracted sample rate file header. rmc.noise Numeric (default = 13). Noise level acceleration signal mg-units, used working ad-hoc .csv data formats using read.myacc.csv. read.myacc.csv take rmc.noise argument, interacting GGIR g.part1 rmc.noise used. rmc.scalefactor.acc Numeric value (default 1) scale acceleration signals via multiplication. example, data provided m/s2 setting 1/9.81 derive gravitational units. frequency_tol Number (default = 0.1) passed readAxivity GGIRread package. Represents frequency tolerance fraction 0 1. relative bias per data block larger fraction data block imputed lack movement gravitational oriationed guessed recent valid data block. applicable Axivity .cwa data. nonwear_range_threshold Numeric (default 150) used define maximum value range per axis non-wear detection, used combination brand specific standard deviation per axis.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-metrics","dir":"Reference","previous_headings":"","what":"params_metrics","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used specify signal metrics need extract GGIR g.part1. .anglex Boolean (default = FALSE). TRUE, calculates angle X axis relative horizontal: $$angleX = (\\tan{^{-1}\\frac{acc_{rollmedian(x)}}{(acc_{rollmedian(y)})^2 + (acc_{rollmedian(z)})^2}}) * 180/\\pi$$ .angley Boolean (default = FALSE). TRUE, calculates angle Y axis relative horizontal: $$angleY = (\\tan{^{-1}\\frac{acc_{rollmedian(y)}}{(acc_{rollmedian(x)})^2 + (acc_{rollmedian(z)})^2}}) * 180/\\pi$$ .anglez Boolean (default = TRUE). TRUE, calculates angle Z axis relative horizontal: $$angleZ = (\\tan{^{-1}\\frac{acc_{rollmedian(z)}}{(acc_{rollmedian(x)})^2 + (acc_{rollmedian(y)})^2}}) * 180/\\pi$$ .zcx Boolean (default = FALSE). TRUE, calculates metric zero-crossing count x-axis. computation specifics see source code function g.applymetrics .zcy Boolean (default = FALSE). TRUE, calculates metric zero-crossing count y-axis. computation specifics see source code function g.applymetrics .zcz Boolean (default = FALSE). TRUE, calculates metric zero-crossing count z-axis. computation specifics see source code function g.applymetrics .enmo Boolean (default = TRUE). TRUE, calculates metric: $$ENMO = \\sqrt{acc_x^2 + acc_y^2 + acc_z^2} - 1$$ (ENMO < 0, ENMO = 0). .lfenmo Boolean (default = FALSE). TRUE, calculates metric ENMO low-pass filtered accelerations (computation specifics see source code function g.applymetrics). filter bound defined parameter hb. .en Boolean (default = FALSE). TRUE, calculates Euclidean Norm raw accelerations: $$EN = \\sqrt{acc_x^2 + acc_y^2 + acc_z^2}$$ .mad Boolean (default = FALSE). TRUE, calculates Mean Amplitude Deviation: $$MAD = \\frac{1}{n}\\Sigma|r_i - \\overline{r}|$$ .enmoa Boolean (default = FALSE). TRUE, calculates metric: $$ENMOa = \\sqrt{acc_x^2 + acc_y^2 + acc_z^2} - 1$$ (ENMOa < 0, ENMOa = |ENMOa|). .roll_med_acc_x Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .roll_med_acc_y Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .roll_med_acc_z Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .dev_roll_med_acc_x Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .dev_roll_med_acc_y Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .dev_roll_med_acc_z Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .bfen Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .hfen Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .hfenplus Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .lfen Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .lfx Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .lfy Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .lfz Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .hfx Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .hfy Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .hfz Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .bfx Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .bfy Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .bfz Boolean (default = FALSE). TRUE, calculates metric. computation specifics see source code function g.applymetrics. .brondcounts Boolean (default = FALSE). option deprecated (October 2022) due issues activityCounts package used dependency. TRUE, calculated metric via R package activityCounts. called BrondCounts large number activity counts physical activity sleep research field. calling _brondcounts_ clarify counts proposed Jan Brønd implemented R Ruben Brondeel. _brondcounts_ intended imitation counts produced one closed source ActiLife software ActiGraph. .neishabouricounts Boolean (default = FALSE). TRUE, calculates metric via R package actilifecounts, implementation algorithm used closed-source software ActiLife ActiGraph (methods published doi: 10.1038/s41598-022-16003-x). use name first author (instead ActiLifeCounts) paper call NeishabouriCount uncertainty ActiLife implement algorithm time. use Neishabouri counts physical activity intensity classification part 5 (.e., metric threshold.lig, threshold.mod, threshold.vig applied), acc.metric argument needs set one following: \"NeishabouriCount_x\", \"NeishabouriCount_y\", \"NeishabouriCount_z\", \"NeishabouriCount_vm\" use counts x-, y-, z-axis vector magnitude, respectively. lb Numeric (default = 0.2). Lower boundary frequency filter (Hertz) used filter-based metrics. hb Numeric (default = 15). Higher boundary frequency filter (Hertz) used filter-based metrics. n Numeric (default = n). Order frequency filter used filter-based metrics. zc.lb Numeric (default = 0.25). Used zero-crossing counts . Lower boundary cut-frequency filter. zc.hb Numeric (default = 3). Used zero-crossing counts . Higher boundary cut-frequencies filter. zc.sb Numeric (default = 0.01). Stop band used calculation zero crossing counts. Value acceleration threshold g units acceleration rounded zero. zc.order Numeric (default = 2). Used zero-crossing counts . Order frequency filter. zc.scale Numeric (default = 1) Used zero-crossing counts . Scaling factor applied counts calculated (GGIR part 3). actilife_LFE Boolean (default = FALSE). TRUE, calculates NeishabouriCount metric low-frequency extension filter proposed closed source ActiLife software ActiGraph. applicable metric NeishabouriCount.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-cleaning","dir":"Reference","previous_headings":"","what":"params_cleaning","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used across GGIR parts releated masking imputing data, abbreviated \"cleaning\". .imp Boolean (default = TRUE). Whether impute missing values (e.g., suspected monitor non-wear clippling) g.impute GGIR g.part2. Recommended setting TRUE. TimeSegments2ZeroFile Character (default = NULL). Takes path csv file columns \"windowstart\" \"windowend\" refer start end time time windows format \"2024-10-12 20:00:00\", \"filename\" GGIR milestone data file without \"meta_\" segment name. GGIR part 2 uses set acceleration values zero non-wear classification zero (meaning sensor worn). Motivation: accelerometer worn night GGIR automatically labels invalid, user may like treat zero movement. Disclaimer: functionality developed 2019. hindsight generic enough need revision. Please contact GGIR maintainers like us invest time improving functionality. data_cleaning_file Character (default = NULL). Optional path csv file create holds four columns: ID, day_part5, relyonguider_part4, night_part4. ID hold participant ID. Columns day_part5 night_part4 allow specify day(s) night(s) need excluded g.part5 g.part4, respectively. including multiple day(s)/night(s) create new line day/night. , done regardless whether rest GGIR thinks day(s)/night(s) valid. Column relyonguider_part4 allows specify nights g.part4 fully rely guider. See also package vignette. excludefirstlast.part5 Boolean (default = FALSE). TRUE first last window (waking-waking, midnight-midnight, sleep onset-onset) ignored g.part5. excludefirstlast Boolean (default = FALSE). TRUE first last night measurement ignored sleep assessment g.part4. excludefirst.part4 Boolean (default = FALSE). TRUE first night measurement ignored sleep assessment g.part4. excludelast.part4 Boolean (default = FALSE). TRUE last night measurement ignored sleep assessment g.part4. includenightcrit Numeric (default = 16). Minimum number valid hours per night (24 hour window noon noon), used sleep assessment g.part4. minimum_MM_length.part5 Numeric (default = 23). Minimum length hours MM day included cleaned g.part5 results. study_dates_file Character (default = c()). Full path csv file containing first last date expected wear period every study participant (dates provided per individual). Expected format activity diary : First column headers followed one row per recording. three columns: first column recording ID, needs match ID GGIR extracts accelerometer file; second column contain first date study; third column last date study. Date columns default format \"23-04-2017\", date format specified argument study_dates_dateformat (). specified (default), GGIR use first last day recording beginning end study. Note dates used top data_masking_strategy selected. study_dates_dateformat Character (default = \" specify date format used study_dates_file used strptime. strategy Deprecated replaced data_masking_strategy. strategy specified value passed used data_masking_strategy. data_masking_strategy Numeric (default = 1). deal knowledge study protocol. data_masking_strategy = 1 means select data based hrs.del.start hrs.del.end. data_masking_strategy = 2 makes data first midnight last midnight used. data_masking_strategy = 3 selects active X days file X specified argument ndayswindow, days series 24-h blocks starting time day (X hours beginning end period can deleted arguments hrs.del.start hrs.del.end) data_masking_strategy = 4 use data first midnight. data_masking_strategy = 5 similar data_masking_strategy = 3, selects X complete calendar days X specified argument ndayswindow (X hours beginning end period can deleted arguments hrs.del.start hrs.del.end). hrs.del.start Numeric (default = 0). many HOURS start experiment wearing monitor start? Used GGIR g.part2 data_masking_strategy = 1. hrs.del.end Numeric (default = 0). many HOURS end experiment wearing monitor definitely end? Used GGIR g.part2 data_masking_strategy = 1. maxdur Numeric (default = 0). many DAYS start experiment experiment definitely stop? (set zero unknown). ndayswindow Numeric (default = 7). data_masking_strategy set 3 5, size window number days. data_masking_strategy 3 value can fractional, e.g. 7.5, data_masking_strategy 5 needs integer. includedaycrit.part5 Numeric (default = 2/3). Inclusion criteria used part 5 number valid hours waking hours day, value smaller equal 1 used fraction waking hours, value 1 used absolute number valid hours required. confuse argument argument includedaycrit used GGIR part 2 applies entire day. segmentWEARcrit.part5 Numeric (default = 0.5). Fraction qwindow segment expected valid part 5, 0.3 indicates least 30 percent time valid. segmentDAYSPTcrit.part5 Numeric vector length 2 (default = c(0.9, 0)). Inclusion criteria proportion segment classified day (awake) spt (sleep period time) considered valid. interested comparing time spent behaviour better set one two numbers 0, defines proportion segment classified day spt, respectively. default setting focus waking hour segments includes segments overlap least 90 percent waking hours. order shift focus SPT use c(0, 0.9) ensures segments overlap least 90 percent SPT included. Setting zero problematic comparing time spent behaviours days individuals: complete segment averaged incomplete segments (someone going bed waking middle segment) longer clear whether person less active sleeps segment. Similarly clear whether person wakefulness SPT segment woke went bed segment. includedaycrit Numeric (default = 16). Minimum required number valid hours calendar day specific analysis part 2. specify two values c(16, 16) first value used part 2 second value used part 5 applied criterion full part 5 window. Note applied addition parameter includedaycrit.part5 looks valid data waking hours. max_calendar_days Numeric (default = 0). maximum number calendar days include (set zero unknown). nonWearEdgeCorrection Boolean (default = TRUE). TRUE non-wear detection around edges recording (first last 3 hours) corrected following description vanHees2013 default since . functionality advisable working sleep clinic exercise lab data typically lasting less day. nonwear_approach Character (default = \"2023\"). Whether use traditional version non-wear detection algorithm (nonwear_approach = \"2013\") new version (nonwear_approach = \"2023\"). 2013 version use longsize window (windowsizes[3], one hour default) check conditions nonwear identification flag nonwear mediumsize window (windowsizes[2], 15 min default) middle. 2023 version differs flag nonwear full longsize window. 2013 method longsize window centered centre mediumsize window, 2023 method longsizewindow aligned left edge left edge mediumsize window.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-phyact","dir":"Reference","previous_headings":"","what":"params_phyact","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters releated physical activity used GGIR g.part2 GGIR g.part5. mvpathreshold Numeric (default = 100). Acceleration threshold MVPA estimation GGIR g.part2. can single number vector numbers, e.g., mvpathreshold = c(100, 120). latter case code estimate MVPA separately threshold. variable left blank, e.g., mvpathreshold = c(), MVPA estimated. mvpadur Numeric (default = 10). bout duration(s) MVPA calculated. used GGIR g.part2. boutcriter Numeric (default = 0.8). number 0 1, defines fraction bout needs mvpathreshold, used GGIR g.part2. threshold.lig Numeric (default = 40). g.part5: Threshold light physical activity separate inactivity light. Value can one number vector multiple numbers, e.g., threshold.lig =c(30,40). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO. threshold.mod Numeric (default = 100). g.part5: Threshold moderate physical activity separate light moderate. Value can one number vector multiple numbers, e.g., threshold.mod = c(100, 120). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO. threshold.vig Numeric (default = 400). g.part5: Threshold vigorous physical activity separate moderate vigorous. Value can one number vector multiple numbers, e.g., threshold.vig =c(400,500). multiple numbers entered analysis repeated combination threshold values. Threshold applied first metric milestone data, specified .enmo = TRUE applied ENMO. boutdur.mvpa Numeric (default = c(1, 5, 10)). Duration(s) MVPA bouts minutes extracted. start identification longest shortest duration. default setting, start 10 minute bouts, followed 5 minute bouts rest data, followed 1 minute bouts rest data. boutdur.Numeric (default = c(10, 20, 30)). Duration(s) inactivity bouts minutes extracted. Inactivity bouts detected segments data labelled sleep MVPA bouts. start identification longest shortest duration. default setting, start identification 30 minute bouts, followed 20 minute bouts rest data, followed 10 minute bouts rest data. Note use term inactivity instead sedentary behaviour lowest intensity level behaviour. reason GGIR attempt classifying activity type sitting moment, feel using term sedentary behaviour fail communicate . boutdur.lig Numeric (default = c(1, 5, 10)). Duration(s) light activity bouts minutes extracted. Light activity bouts detected segments data labelled sleep, MVPA, inactivity bouts. start identification longest shortest duration. default setting, start identification 10 minute bouts, followed 5 minute bouts rest data, followed 1 minute bouts rest data. boutcriter.mvpa Numeric (default = 0.8). number 0 1, defines fraction bout needs threshold.mod. boutcriter.Numeric (default = 0.9). number 0 1, defines fraction bout needs threshold.lig. boutcriter.lig Numeric (default = 0.8). number 0 1, defines fraction bout needs threshold.lig threshold.mod. frag.metrics Character (default = NULL). Fragmentation metric extract. Can \"mean\", \"TP\", \"Gini\", \"power\", \"CoV\", \"NFragPM\", metrics \"\". See package vignette description fragmentation metrics. part6_threshold_combi Character (default = \"40_100_120\") indicate threshold combination derived part 5 used part 6","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-sleep","dir":"Reference","previous_headings":"","what":"params_sleep","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used configure sleep analysis performend GGIR g.part3 g.part4. relyonguider Boolean (default = FALSE). Sustained inactivity bouts (sib) overlap guider labelled sleep. relyonguider = FALSE sib overlaps partially guider sib defines edge SPT window guider. relyonguider = TRUE sib overlaps partially guider guider defines edge SPT window sib. participants instructed wear accelerometer waking hours ignorenonware=FALSE set relyonguider=TRUE, scenarios set FALSE. relyonsleeplog Boolean (default = FALSE). use, now replaced argument relyonguider. Values provided argument relyonsleeplog passed argument relyonguider preserve functionality old R scripts. def.noc.sleep Numeric (default = 1). time window sustained inactivity assumed represent sleep, e.g., def.noc.sleep = c(21, 9). used sleep log entry available. left blank def.noc.sleep = c() 12 hour window centred least active 5 hours 24 hour period used instead. , L5 hardcoded change changing argument winhr function g.part2. def.noc.sleep filled single integer, e.g., def.noc.sleep=c(1) window detected based built algorithms. See argument HASPT.algo HASPT specifying algorithms use. sleepwindowType Character (default = \"SPT\"). indicate type information sleeplog, \"SPT\" sleep period time. Set \"TimeInBed\" sleep log recorded time bed enable calculation sleep latency sleep efficiency. nnights Numeric (default = NULL). argument deprecated. loglocation Character (default = NULL). Path csv file sleep log information. See package vignette format file. colid Numeric (default = 1). Column number sleep log spreadsheet participant ID code stored. coln1 Numeric (default = 2). Column number sleep log spreadsheet onset first night starts. ignorenonwear Boolean (default = TRUE). TRUE ignore detected monitor non-wear periods avoid confusion monitor non-wear time sustained inactivity. constrain2range Deprecated, used Boolean (default = TRUE) Whether constrain range threshold used diary free sleep period time window detection. HASPT.algo Character (default = \"HDCZA\"). indicate algorithm used sleep period time detection. Default \"HDCZA\" Heuristic algorithm looking Distribution Change Z-Angle described van Hees et al. 2018. options included: \"HorAngle\", based HDCZA replaces non-movement detection HDCZA algorithm looking time segments angle longitudinal sensor axis angle relative horizontal plane -45 +45 degrees. \"NotWorn\" also HDCZA looks time segments rolling average acceleration magnitude 5 per cent standard deviation, see Cookbook vignette Annexes https://wadpac.github.io/GGIR/ detailed guidance use \"NotWorn\". HDCZA_threshold Numeric (default = c()) HASPT.algo set \"HDCZA\" HDCZA_threshold NULL, (e.g., HDCZA_threshold = 0.2), value used threshold 6th step diagram Figure 1 van Hees et al. 2018 Scientific Report (doi: 10.1038/s41598-018-31266-z). However, supported research yet intended facilitate methodological research, advise sticking default line publication. , HDCZA_threshold set numeric vector length 2, e.g. c(10, 15), used percentile multiplier mentioned 6th step. HASPT.ignore.invalid Boolean (default = FALSE). indicate whether invalid time segments ignored heuristic guiders. FALSE (default), imputed angle activity metric invalid time segments used. TRUE, invalid time segments ignored (.e., contribute guider). NA, invalid time segments considered movement segments can contribute guider. HASPT.algo \"NotWorn\", HASPT.ignore.invalid automatically set NA. HASIB.algo Character (default = \"vanHees2015\"). indicate algorithm used define sustained inactivity bouts (.e., likely sleep). Options: \"vanHees2015\", \"Sadeh1994\", \"Galland2012\". Sadeh_axis Character (default = \"Y\"). indicate axis use Sadeh1994 algorithm, algortihms relied count-based Actigraphy Galland2012. sleeplogsep Character (default = NULL). argument deprecated. nap_model Character (default = NULL). specify classification model. Currently option \"hip3yr\", corresponds model trained hip data 3-3.5 olds trained parent diary data. longitudinal_axis Integer (default = NULL). indicate axis longitudinal axis. provided, function estimate longitudinal axis axis highest 24 hour lagged autocorrelation. used sensor.location = \"hip\" HASPT.algo = \"HorAngle\". anglethreshold Numeric (default = 5). Angle threshold (degrees) sustained inactivity periods detection. algorithm look periods time (timethreshold) angle variability lower anglethreshold. can specified multiple thresholds, implemented, e.g., anglethreshold = c(5,10). timethreshold Numeric (default = 5). Time threshold (minutes) sustained inactivity periods detection. algorithm look periods time (timethreshold) angle variability lower anglethreshold. can specified multiple thresholds, implemented, e.g., timethreshold = c(5,10). possible_nap_window Numeric (default = c(9, 18)). Numeric vector length two range clock hours naps assumed take place, e.g., possible_nap_window = c(9, 18). Currently used context explorative nap classification algortihm trained 3.5 year olds. possible_nap_dur Numeric (default = c(15, 240)). Numeric vector length two range duration (minutes) nap, e.g., possible_nap_dur = c(15, 240). Currently used context explorative nap classification algortihm trained 3.5 year olds. sleepefficiency.metric Numeric (default = 1). 1 (default), sleep efficiency calculated detected sleep time SPT window divided log-derived time bed. 2, sleep efficiency calculated detected sleep time SPT window divided detected duration sleep period time plus sleep latency (sleep latency refers difference time bed sleep onset). sleepefficiency.metric considered argument sleepwindowType = \"TimeInBed\" possible_nap_edge_acc Numeric (default = Inf). Maximum acceleration SIB nap considered. default allow possible naps.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-","dir":"Reference","previous_headings":"","what":"params_247","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters releated description 24/7 behaviours fall conventional physical activity sleep outcomes, parameters used GGIR g.part2 GGIR g.part5: qwindow Numeric character (default = c(0, 24)). specify windows variables calculated, e.g., acceleration distribution, number valid hours, LXMX analysis, MVPA. numeric, qwindow length two, e.g., qwindow = c(0, 24), variables calculated full 24 hours day. qwindow = c(8, 24) variables calculated window 0-8, 8-24 0-24. days recording segmented based values. want use day specific segmentation day can set qwindow full path activity diary file (character). Expected format activity diary : First column headers followed one row per recording, first column recording ID, needs match ID GGIR extracts accelerometer file. Followed date column format \"23-04-2017\", date format specified argument qwindow_dateformat (). Use character combination date, Date DATE column name. followed one multiple columns start times activity types day format hours:minutes:seconds. header column used label activity type. Insert new date column continuing activity types next day. Leave missing values empty. activity log used individuals appear activity log still processed value qwindow = c(0, 24). Dates activity log data can skipped, need column date followed column next date. times activity diary multiple short window size (epoch length), next epoch considered (e.g., epoch 5 seconds, 8:00:02 redefined 8:00:05 activity log). using qwindow functionality combination GGIR part 5 make sure check arguments segmentWEARcrit.part5 segmentDAYSPTcrit.part5 specified research needs. qwindow_dateformat Character (default = \" specify date format used activity log used strptime. M5L5res Numeric (default = 10). Resolution L5 M5 analysis minutes. winhr Numeric (default = 5). Vector window size(s) (unit: hours) LX MX analysis, look least active consecutive number X hours. qlevels Numeric (default = NULL). Vector percentiles value needs extracted. need expressed fraction 1, e.g., c(0.1, 0.5, 0.75). limit number percentiles. left empty percentiles extracted. Distribution derived short epoch metric data. Argument qlevels can example used MX-metrics (e.g. Rowlands et al) discussed main package vignette ilevels Numeric (default = NULL). Levels acceleration value frequency distribution mg, e.g., ilevels = c(0,100,200). limit number levels. left empty intensity levels extracted. Distribution derived short epoch metric data. iglevels Numeric (default = NULL). Levels acceleration value frequency distribution mg used intensity gradient calculation (according method Rowlands 2018). default argument empty intensity gradient calculation done. user can either provide single value () make intensity gradient use bins iglevels = c(seq(0,4000,=25), 8000) user specify distribution. constriction number levels. IVIS_windowsize_minutes Numeric (default = 60). Window size Intradaily Variability (IV) Interdaily Stability () metrics minutes, needs able add 24 hours. IVIS_epochsize_seconds Numeric (default = NULL). argument deprecated. IVIS.activity.metric Numeric (default = 2). Metric used activity calculation. Value = 1, uses continuous scaled acceleration. Value = 2, tries collapse acceleration binary score rest versus active try simulate original approach. IVIS_acc_threshold Numeric (default = 20). Acceleration threshold distinguish inactive active. qM5L5 Numeric (default = NULL). Percentiles (quantiles) calculated L5 M5 window. MX.ig.min.dur Numeric (default = 10). Minimum MX duration needed order intensity gradient calculated. LUXthresholds Numeric (default = c(0, 100, 500, 1000, 3000, 5000, 10000)). Vector numeric sequence corresponding thresholds used calculate time spent LUX ranges. LUX_cal_constant Numeric (default = NULL). LUX_cal_constant LUX_cal_exponent provided LUX values converted based formula y = constant * exp(x * exponent) LUX_cal_exponent Numeric (default = NULL). LUX_cal_constant LUX_cal_exponent provided LUX LUX values converted based formula y = constant * exp(x * exponent) LUX_day_segments Numeric (default = NULL). Vector hours day segmented LUX analysis. L5M5window Argument deprecated version 1.5-24. argument used define start end time, 24 hour clock hours, L5M5 needs calculated. Now done argument qwindow. cosinor Boolean (default = FALSE). Whether apply cosinor analysis ActCR package. part6CR Boolean (default = FALSE) indicate whether circadian rhythm analysis run part 6. part6HCA Boolean (default = FALSE) indicate whether Household Co Analysis run part 6. part6Window Character vector length two (default = c(\"start\", \"end\")) indicate start end time series used circadian rhythm analysis part 6. words, parameters used Household co-analysis. Alternative values : \"Wx\", \"Ox\", \"Hx\", \"x\" number indicat xth wakeup, onset hour recording. Negative values \"x\" also possible count relative end recording. example, c(\"W1\", \"W-1\") goes first till last wakeup, c(\"H5\", \"H-5\") ignores first last 5 hours, c(\"O2\", \"W10\") goes second onset till 10th wakeup time.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"params-output","dir":"Reference","previous_headings":"","what":"params_output","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"list parameters used specify whether GGIR stores output various stages process. storefolderstructure Boolean (default = FALSE). Store folder structure accelerometer data. .part2.pdf Boolean (default = TRUE). g.part2: Whether generate pdf g.part2. .part3.pdf Boolean (default = TRUE). g.part3: Whether generate pdf g.part3. timewindow Character (default = c(\"MM\", \"WW\")). g.part5: Timewindow summary statistics derived. Value can \"MM\" (midnight midnight), \"WW\" (waking time waking time), \"OO\" (sleep onset sleep onset), combination . save_ms5rawlevels Boolean (default = FALSE). g.part5: Whether save time series classification (levels) csv RData files (defined save_ms5raw_format). Note time stamps stored column timenum UTC format (.e., seconds 1970-01-01). convert timenum time stamp format, need specify desired time zone, e.g., .POSIXct(mdat$timenum, tz = \"Europe/London\"). save_ms5raw_format Character (default = \"csv\"). g.part5: specify data stored: either \"csv\" \"RData\". used save_ms5rawlevels = TRUE. save_ms5raw_without_invalid Boolean (default = TRUE). g.part5: indicate whether remove invalid days time series output files. used save_ms5rawlevels = TRUE. epochvalues2csv Boolean (default = FALSE). g.part2: TRUE epoch values exported csv file. , non-wear time imputed possible. .sibreport Boolean (default = FALSE). g.part4: indicate whether generate report sustained inactivity bouts (SIB). set TRUE advanced sleep diary available part 4 part 5 use generate summary statistics overlap self-reported nonwear napping SIB. , SIB can filter based argument possible_nap_edge_acc first value possible_nap_dur .visual Boolean (default = TRUE). g.part4: TRUE, function generate pdf visual representation overlap sleeplog entries accelerometer detections. can used visually verify sleeplog entries come obvious mistakes. outliers.Boolean (default = FALSE). g.part4: used .visual = TRUE. FALSE, available nights included visual representation data sleeplog. TRUE, nights difference onset waking time larger variable argument criterror included. criterror Numeric (default = 3). g.part4: used .visual = TRUE outliers.= TRUE. criterror specifies number minimum number hours difference sleep log accelerometer estimate night included visualisation. visualreport Boolean (default = TRUE). TRUE, generate visual report based combined output g.part2 g.part4. Please note visual report initially developed provide something show study participants data quality checking purposes. time improved visual report also useful QC-ing data. However, scorings shown visual report created visual report may reflect scorings main GGIR analyses reported quantitative csv-reports. effort past 10 years gone making sure csv-report correct, visualreport mostly side project. unfortunate hope find funding future design new report specifically purpose QC-ing analyses done GGIR. viewingwindow Numeric (default = 1). Centre day displayed around noon (viewingwindow = 1) around midnight (viewingwindow = 2) visual report generated visualreport = TRUE. week_weekend_aggregate.part5 Boolean (default = FALSE). g.part5: indicate whether week weekend-days aggregates stored. turned default generates large number extra columns output report. dofirstpage Boolean (default = TRUE). indicate whether first page histograms summarizing whole measurement added file summary reports generated visualreport = TRUE. sep_reports Character (default = \",\"). Value used sep argument fwrite writing csv reports. dec_reports Character (default = \".\"). Value used dec argument fwrite writing csv reports. sep_config Character (default = \",\"). Value used sep argument fwrite writing csv config file. dec_config Character (default = \".\"). Value used dec argument fwrite writing csv config file. visualreport_without_invalid Boolean (default = TRUE). TRUE, reports generated visualreport = TRUE show windows sufficiently valid data according includedaycrit viewingwindow = 1 includenightcrit viewingwindow = 2","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"van Hees VT, Gorzelniak L, Dean Leon EC, Eder M, Pias M, et al. (2013) Separating Movement Gravity Components Acceleration Signal Implications Assessment Human Daily Physical Activity. PLoS ONE 8(4): e61691. doi:10.1371/journal.pone.0061691 van Hees VT, Fang Z, Langford J, Assah F, Mohammad , da Silva IC, Trenell MI, White T, Wareham NJ, Brage S. Auto-calibration accelerometer data free-living physical activity assessment using local gravity temperature: evaluation four continents. J Appl Physiol (1985). 2014 Aug 7 van Hees VT, Sabia S, et al. (2015) novel, open access method assess sleep duration using wrist-worn accelerometer, PLoS ONE, November 2015","code":""},{"path":"https://wadpac.github.io/GGIR/reference/GGIR.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shell function for analysing an accelerometer dataset. — GGIR","text":"","code":"if (FALSE) { # \\dontrun{ mode = c(1,2,3,4,5) datadir = \"C:/myfolder/mydata\" outputdir = \"C:/myresults\" studyname =\"test\" f0 = 1 f1 = 2 GGIR(#------------------------------- # General parameters #------------------------------- mode = mode, datadir = datadir, outputdir = outputdir, studyname = studyname, f0 = f0, f1 = f1, overwrite = FALSE, do.imp = TRUE, idloc = 1, print.filename = FALSE, storefolderstructure = FALSE, #------------------------------- # Part 1 parameters: #------------------------------- windowsizes = c(5,900,3600), do.cal = TRUE, do.enmo = TRUE, do.anglez = TRUE, chunksize = 1, printsummary = TRUE, #------------------------------- # Part 2 parameters: #------------------------------- data_masking_strategy = 1, ndayswindow = 7, hrs.del.start = 1, hrs.del.end = 1, maxdur = 9, includedaycrit = 16, L5M5window = c(0,24), M5L5res = 10, winhr = c(5,10), qlevels = c(c(1380/1440),c(1410/1440)), qwindow = c(0,24), ilevels = c(seq(0,400,by=50),8000), mvpathreshold = c(100,120), #------------------------------- # Part 3 parameters: #------------------------------- timethreshold = c(5,10), anglethreshold = 5, ignorenonwear = TRUE, #------------------------------- # Part 4 parameters: #------------------------------- excludefirstlast = FALSE, includenightcrit = 16, def.noc.sleep = 1, loglocation = \"D:/sleeplog.csv\", outliers.only = FALSE, criterror = 4, relyonguider = FALSE, colid = 1, coln1 = 2, do.visual = TRUE, #------------------------------- # Part 5 parameters: #------------------------------- # Key functions: Merging physical activity with sleep analyses threshold.lig = c(30,40,50), threshold.mod = c(100,120), threshold.vig = c(400,500), excludefirstlast = FALSE, boutcriter = 0.8, boutcriter.in = 0.9, boutcriter.lig = 0.8, boutcriter.mvpa = 0.8, boutdur.in = c(10,20,30), boutdur.lig = c(1,5,10), boutdur.mvpa = c(1,5,10), timewindow = c(\"WW\"), #----------------------------------- # Report generation #------------------------------- do.report = c(2,4,5)) # For externally derived Actiwatch data in .AWD format: GGIR(datadir = \"/media/actiwatch_awd\", # folder with epoch level .AWD file outputdir = \"/media/myoutput\", dataFormat = \"actiwatch_awd\", extEpochData_timeformat = \"%m/%d/%Y %H:%M:%S\", mode = 1:5, do.report = c(2, 4, 5), windowsizes = c(60, 900, 3600), # 60 is the expected epoch length visualreport = FALSE, outliers.only = FALSE, overwrite = TRUE, HASIB.algo = \"Sadeh1994\", def.noc.sleep = c()) # <= because we cannot use HDCZA for ZCY # For externally derived Actiwatch data in .CSV format: GGIR(datadir = \"/media/actiwatch_csv\", # folder with epoch level .AWD file outputdir = \"/media/myoutput\", dataFormat = \"actiwatch_csv\", extEpochData_timeformat = \"%m/%d/%Y %H:%M:%S\", mode = 1:5, do.report = c(2, 4, 5), windowsizes = c(15, 900, 3600), # 15 is the expected epoch length visualreport = FALSE, outliers.only = FALSE, HASIB.algo = \"Sadeh1994\", def.noc.sleep = c()) # <= because we cannot use HDCZA for ZCY # For externally derived UK Biobank data in .CSV format: GGIR(datadir = \"/media/ukbiobank\", outputdir = \"/media/myoutput\", dataFormat = \"ukbiobank_csv\", extEpochData_timeformat = \"%m/%d/%Y %H:%M:%S\", mode = c(1:2), do.report = c(2), windowsizes = c(5, 900, 3600), # We know that data was stored in 5 second epoch desiredtz = \"Europe/London\", # We know that data was collected in the UK visualreport = FALSE, overwrite = TRUE) # For externally derived ActiGraph count data in .CSV format assuming # a study protocol where sensor was not worn during the night: GGIR(datadir = \"/examplefiles\", outputdir = \"\", dataFormat = \"actigraph_csv\", mode = 1:5, do.report = c(2, 4, 5), windowsizes = c(5, 900, 3600), threshold.in = round(100 * (5/60), digits = 2), threshold.mod = round(2500 * (5/60), digits = 2), threshold.vig = round(10000 * (5/60), digits = 2), extEpochData_timeformat = \"%m/%d/%Y %H:%M:%S\", do.neishabouricounts = TRUE, acc.metric = \"NeishabouriCount_x\", HASPT.algo = \"NotWorn\", HASIB.algo = \"NotWorn\", do.visual = TRUE, includedaycrit = 10, includenightcrit = 10, visualreport = FALSE, outliers.only = FALSE, save_ms5rawlevels = TRUE, ignorenonwear = FALSE, HASPT.ignore.invalid = FALSE, save_ms5raw_without_invalid = FALSE) # For externally derived Sensear data in .xls format: GGIR(datadir = \"C:/yoursenseweardatafolder\", outputdir = \"D:/youroutputfolder\", mode = 1:5, windowsizes = c(60, 900, 3600), threshold.in = 1.5, threshold.mod = 3, threshold.vig = 6, dataFormat = \"sensewear_xls\", extEpochData_timeformat = \"%d-%b-%Y %H:%M:%S\", HASPT.algo = \"NotWorn\", desiredtz = \"America/New_York\", overwrite = TRUE, do.report = c(2, 4, 5), visualreport = FALSE) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/HASIB.html","id":null,"dir":"Reference","previous_headings":"","what":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","title":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","text":"Apply heuristic algorithms sustiained inactivty bouts detection. Function intended direct use package user","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASIB.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","text":"","code":"HASIB(HASIB.algo = \"vanHees2015\", timethreshold = c(), anglethreshold = c(), time = c(), anglez = c(), ws3 = c(), zeroCrossingCount = c(), BrondCount = c(), NeishabouriCount = c(), activity = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/HASIB.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","text":"HASIB.algo Character indicator sib algorithm used. Default value: \"vanHees2015\". options: \"Sadeh1994\", \"Galland2012\", \"ColeKripke1992\" anglethreshold See g.sib.det timethreshold See g.sib.det time Vector time per short epoch anglez Vector z-angle per short epoch ws3 See g.getmeta zeroCrossingCount Vector zero crossing counts per epoch required count-based algorithms BrondCount Vector Brond counts per epoch used count-based algorithms NeishabouriCount Vector Neishabouri counts per epoch used count-based algorithms activity Magnitude acceleration, used HASIB.algo set NotWorn. Acceleration metric used specified argument acc.metric elsewhere GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASIB.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","text":"Vector binary indicator sustained inactivity bout, 1 yes, 0 .","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASIB.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Heuristic algorithms for sustiained inactivty bouts detection — HASIB","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASPT.html","id":null,"dir":"Reference","previous_headings":"","what":"Heuristic Algorithms estimating SPT window. — HASPT","title":"Heuristic Algorithms estimating SPT window. — HASPT","text":"used function g.sib.det. Function intended direct use GGIR user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASPT.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Heuristic Algorithms estimating SPT window. — HASPT","text":"","code":"HASPT(angle, sptblocksize = 30, spt_max_gap = 60, ws3 = 5, HASPT.algo=\"HDCZA\", HDCZA_threshold = c(), invalid, HASPT.ignore.invalid = FALSE, activity = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/HASPT.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Heuristic Algorithms estimating SPT window. — HASPT","text":"angle Vector epoch level estimates angle sptblocksize Number indicate minimum SPT block size (minutes) spt_max_gap Number indicate maximum gap (minutes) SPT window blocks. ws3 Number representing epoch length seconds HASPT.algo See GGIR HDCZA_threshold See GGIR invalid Integer vector per epoch indicator valid(=0) invalid(=1) epoch. HASPT.ignore.invalid Boolean indicate whether invalid time segments ignored activity Magnitude acceleration, used HASPT.algo set NotWorn. Acceleration metric used specified argument acc.metric elsewhere GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASPT.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Heuristic Algorithms estimating SPT window. — HASPT","text":"List start end times SPT window threshold used.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/HASPT.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Heuristic Algorithms estimating SPT window. — HASPT","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":null,"dir":"Reference","previous_headings":"","what":"Identifies levels of behaviour for g.part5 function. — identify_levels","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"Identifies levels behaviour acceleratioon sustained inactivity sibdetection (using angles). Function intended direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"","code":"identify_levels(ts, TRLi,TRMi,TRVi, ws3, params_phyact, ...)"},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"ts Data.frame time series genrated .gpart5 TRLi Numeric acceleration threshold light TRMi Numeric acceleration threshold moderate TRVi Numeric acceleration threshold vigorous ws3 Numeric size epoch seconds params_phyact See g.part2 ... argument used previous version identify_level, now used overrule arguments specified parameter objects.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"List items: LEVELS OLEVELS Lnames bc.mvpa bc.lig bc.ts","code":""},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/identify_levels.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identifies levels of behaviour for g.part5 function. — identify_levels","text":"","code":"if (FALSE) { # \\dontrun{ levels = identify_levels(TRLi,TRMi,TRVi, boutdur.mvpa,boutcriter.mvpa, boutdur.lig,boutcriter.lig, boutdur.in,boutcriter.in, ws3,bout.metric) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/is.ISO8601.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether character timestamp is in iso8601 format. — is.ISO8601","title":"Check whether character timestamp is in iso8601 format. — is.ISO8601","text":"Checks whether timestamp stored character format ISO8601 format ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/is.ISO8601.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether character timestamp is in iso8601 format. — is.ISO8601","text":"","code":"is.ISO8601(x)"},{"path":"https://wadpac.github.io/GGIR/reference/is.ISO8601.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether character timestamp is in iso8601 format. — is.ISO8601","text":"x Timestamps character format either ISO8601 \"yyyy-mm-dd hh:mm:ss\".","code":""},{"path":"https://wadpac.github.io/GGIR/reference/is.ISO8601.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check whether character timestamp is in iso8601 format. — is.ISO8601","text":"","code":"x =\"1980-1-1 18:00:00\" is.ISO8601(x) #> [1] FALSE"},{"path":"https://wadpac.github.io/GGIR/reference/isfilelist.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether datadir is a directory or a vector with filenames — isfilelist","title":"Checks whether datadir is a directory or a vector with filenames — isfilelist","text":"Checks whether argument datadir used various functions GGIR name directory includes data files whether vector full paths one data files","code":""},{"path":"https://wadpac.github.io/GGIR/reference/isfilelist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether datadir is a directory or a vector with filenames — isfilelist","text":"","code":"isfilelist(datadir)"},{"path":"https://wadpac.github.io/GGIR/reference/isfilelist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether datadir is a directory or a vector with filenames — isfilelist","text":"datadir Argument datadir used various functions GGIR","code":""},{"path":"https://wadpac.github.io/GGIR/reference/isfilelist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks whether datadir is a directory or a vector with filenames — isfilelist","text":"Boolean whether list files (TRUE) (FALSE)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/isfilelist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks whether datadir is a directory or a vector with filenames — isfilelist","text":"","code":"if (FALSE) { # \\dontrun{ isitafilelist = isfilelist(datadir) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/ismovisens.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","title":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","text":"Checks whether files datadir folder files collected movisens accelerometers. Note movisens data stored one folder per recording includes multiple bin-files (instead one file per recording usual accelerometer brands). Therefore, datadir indicates directory recording folders stored, , GGIR reads pertinent bin files every folder.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ismovisens.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","text":"","code":"ismovisens(data)"},{"path":"https://wadpac.github.io/GGIR/reference/ismovisens.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","text":"data Full path recording folder (bin files inside) datadir (recording folders stored).","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ismovisens.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","text":"Boolean whether movisens file (TRUE) (FALSE)","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ismovisens.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Checks whether the files to process are collected with movisens accelerometers. — ismovisens","text":"","code":"if (FALSE) { # \\dontrun{ is.mv = ismovisens(data) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/iso8601chartime2POSIX.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert iso8601 timestamps to POSIX timestamp — iso8601chartime2POSIX","title":"Convert iso8601 timestamps to POSIX timestamp — iso8601chartime2POSIX","text":"avoid ambiguities sharing comparing timestamps. timestamps expressed iso8601 format: https://en.wikipedia.org/wiki/ISO_8601 However, generate plots R need convert back POSIX","code":""},{"path":"https://wadpac.github.io/GGIR/reference/iso8601chartime2POSIX.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert iso8601 timestamps to POSIX timestamp — iso8601chartime2POSIX","text":"","code":"iso8601chartime2POSIX(x,tz)"},{"path":"https://wadpac.github.io/GGIR/reference/iso8601chartime2POSIX.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert iso8601 timestamps to POSIX timestamp — iso8601chartime2POSIX","text":"x Vector timestamps iso8601 character format tz Timezone data collection, e.g. \"Europe/London\". See List_of_tz_database_time_zones Wikipedia full list.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/iso8601chartime2POSIX.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert iso8601 timestamps to POSIX timestamp — iso8601chartime2POSIX","text":"","code":"x =\"2017-05-07T13:00:00+0200\" tz = \"Europe/Amsterdam\" x_converted = iso8601chartime2POSIX(x,tz)"},{"path":"https://wadpac.github.io/GGIR/reference/is_this_a_dst_night.html","id":null,"dir":"Reference","previous_headings":"","what":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","title":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","text":"Tests whether night follows input calendar date night day saving time (DST) hour time moved.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/is_this_a_dst_night.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","text":"","code":"is_this_a_dst_night(calendar_date=c(),tz=\"Europe/London\")"},{"path":"https://wadpac.github.io/GGIR/reference/is_this_a_dst_night.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","text":"calendar_date Character format dd/mm/yyyy tz Time zone \"Europe/London\" format.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/is_this_a_dst_night.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","text":"dst_night_or_not value=0 DST, value=1 time moved forward, value=-1 time moved forward dsthour Either double hour hour skipped, differs countries","code":""},{"path":"https://wadpac.github.io/GGIR/reference/is_this_a_dst_night.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check whether the night starting on a calendar date has DST. — is_this_a_dst_night","text":"","code":"test4dst = is_this_a_dst_night(\"23/03/2014\",tz=\"Europe/London\")"},{"path":"https://wadpac.github.io/GGIR/reference/load_params.html","id":null,"dir":"Reference","previous_headings":"","what":"Load default parameters — load_params","title":"Load default parameters — load_params","text":"Loads default paramter values intended direct use GGIR users.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/load_params.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load default parameters — load_params","text":"","code":"load_params(topic = c(\"sleep\", \"metrics\", \"rawdata\", \"247\", \"phyact\", \"cleaning\", \"output\", \"general\"))"},{"path":"https://wadpac.github.io/GGIR/reference/load_params.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load default parameters — load_params","text":"topic Character vector parameter groups loaded.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/load_params.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Load default parameters — load_params","text":"Lists parameter objects","code":""},{"path":"https://wadpac.github.io/GGIR/reference/load_params.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Load default parameters — load_params","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/parametersVignette.html","id":null,"dir":"Reference","previous_headings":"","what":"Builds Section for Parameters Vignette — parametersVignette","title":"Builds Section for Parameters Vignette — parametersVignette","text":"Function extracts documentation given GGIR argument provided GGIR documentation builds structure Parameters Vignette. Function designed direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/parametersVignette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Builds Section for Parameters Vignette — parametersVignette","text":"","code":"parametersVignette(params = \"sleep\")"},{"path":"https://wadpac.github.io/GGIR/reference/parametersVignette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Builds Section for Parameters Vignette — parametersVignette","text":"params Character (default = \"sleep\"). Name parameters object build corresponding section Parameters vignette.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/parametersVignette.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Builds Section for Parameters Vignette — parametersVignette","text":"Structure vignette subsection.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/parametersVignette.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Builds Section for Parameters Vignette — parametersVignette","text":"Jairo Hidalgo Migueles ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6AlignIndividuals.html","id":null,"dir":"Reference","previous_headings":"","what":"part6AlignIndividuals — part6AlignIndividuals","title":"part6AlignIndividuals — part6AlignIndividuals","text":"Align individual time series per household households identified character number string first second '-' filename.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6AlignIndividuals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"part6AlignIndividuals — part6AlignIndividuals","text":"","code":"part6AlignIndividuals(GGIR_ts_dir = NULL, outputdir = NULL, path_ggirms = NULL, desiredtz = \"\", verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/part6AlignIndividuals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"part6AlignIndividuals — part6AlignIndividuals","text":"GGIR_ts_dir Character, path time series directory GGIR output outputdir Directory like store output path_ggirms path GGIR created folder named meta, milestone data files desiredtz Character, specifying timezone database name timezone data collected . verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6AlignIndividuals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"part6AlignIndividuals — part6AlignIndividuals","text":"object returned, files created output directory","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6PairwiseAggregation.html","id":null,"dir":"Reference","previous_headings":"","what":"part6PairwiseAggregation — part6PairwiseAggregation","title":"part6PairwiseAggregation — part6PairwiseAggregation","text":"Pairwise aggregation time series group.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6PairwiseAggregation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"part6PairwiseAggregation — part6PairwiseAggregation","text":"","code":"part6PairwiseAggregation(outputdir = NULL, desiredtz = \"\", verbose = TRUE)"},{"path":"https://wadpac.github.io/GGIR/reference/part6PairwiseAggregation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"part6PairwiseAggregation — part6PairwiseAggregation","text":"outputdir Directory like store results desiredtz Character, specifying timezone database name timezone data collected verbose See details GGIR.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/part6PairwiseAggregation.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"part6PairwiseAggregation — part6PairwiseAggregation","text":"object returned, files created output directory","code":""},{"path":"https://wadpac.github.io/GGIR/reference/POSIXtime2iso8601.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","title":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","text":"avoid ambiguities sharing comparing timestamps. timestamps expressed iso8601 format: https://en.wikipedia.org/wiki/ISO_8601","code":""},{"path":"https://wadpac.github.io/GGIR/reference/POSIXtime2iso8601.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","text":"","code":"POSIXtime2iso8601(x,tz)"},{"path":"https://wadpac.github.io/GGIR/reference/POSIXtime2iso8601.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","text":"x Vector timestamps POSIX format tz Timezone data collection, e.g. \"Europe/London\". See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones full list","code":""},{"path":"https://wadpac.github.io/GGIR/reference/POSIXtime2iso8601.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/POSIXtime2iso8601.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert POSIX to iso8601 timestamp — POSIXtime2iso8601","text":"","code":"if (FALSE) { # \\dontrun{ x =\"2017-05-07 13:15:17 CEST\" tz = \"Europe/Amsterdam\" x_converted = POSIXtime2iso8601(x,tz) } # }"},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":null,"dir":"Reference","previous_headings":"","what":"Read custom csv files with accelerometer data — read.myacc.csv","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"Loads csv files accelerometer data standardises output format (incl. unit measurement, timestamp format, header format, column locations) make data compatible GGIR functions.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"","code":"read.myacc.csv(rmc.file=c(), rmc.nrow=Inf, rmc.skip = c(), rmc.dec=\".\", rmc.firstrow.acc = c(), rmc.firstrow.header=c(), rmc.header.length = c(), rmc.col.acc = 1:3, rmc.col.temp = c(), rmc.col.time=c(), rmc.unit.acc = \"g\", rmc.unit.temp = \"C\", rmc.unit.time = \"POSIX\", rmc.format.time = \"%Y-%m-%d %H:%M:%OS\", rmc.bitrate = c(), rmc.dynamic_range = c(), rmc.unsignedbit = TRUE, rmc.origin = \"1970-01-01\", rmc.desiredtz = NULL, rmc.configtz = NULL, rmc.sf = c(), rmc.headername.sf = c(), rmc.headername.sn = c(), rmc.headername.recordingid = c(), rmc.header.structure = c(), rmc.check4timegaps = FALSE, rmc.col.wear = c(), rmc.doresample = FALSE, rmc.scalefactor.acc = 1, interpolationType=1, PreviousLastValue = c(0, 0, 1), PreviousLastTime = NULL, desiredtz = NULL, configtz = NULL, header = NULL)"},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"rmc.file Filename file read working directory, full path file otherwise. rmc.nrow Number rows read, nrow argument read.csv nrows fread. whole file read default (.e., rmc.nrow = Inf). rmc.skip Number rows skip, skip argument read.csv fread. rmc.dec Decimal used numbers, skip argument read.csv fread. rmc.firstrow.acc First row (number) acceleration data. rmc.firstrow.header First row (number) header. Leave blank file header. rmc.header.length file header, specify header length (numeric). rmc.col.acc Vector three column (numbers) acceleration signals stored rmc.col.temp Scalar column (number) temperature stored. Leave default setting temperature avaible. temperature used g.calibrate. rmc.col.time Scalar column (number) timestamps stored. Leave default setting timestamps stored. rmc.unit.acc Character unit acceleration values: \"g\", \"mg\", \"bit\" rmc.unit.temp Character unit temperature values: (K)elvin, (C)elsius, (F)ahrenheit rmc.unit.time Character unit timestamps: \"POSIX\", \"UNIXsec\" (seconds since origin, see argument rmc.origin), \"character\", \"ActivPAL\" (exotic timestamp format used ActivPAL activity monitor). rmc.format.time Character string giving date-time format used strptime. used rmc.unit.time: character POSIX. rmc.bitrate Numeric: unit acceleration bit provide bit rate, e.g. 12 bit. rmc.dynamic_range Numeric, unit acceleration bit provide dynamic range deviation g zero, e.g. +/-6g mean argument needs 6. give argument character value code search file header elements name equal character value use corresponding numeric value next dynamic range. rmc.unsignedbit Boolean, unsignedbit = TRUE means bits positive numbers. unsignedbit = FALSE bits positive negative. rmc.origin Origin time unit time UNIXsec, e.g. 1970-1-1 rmc.desiredtz Deprecated, please see desiredtz. rmc.configtz Deprecated, please see configtz. rmc.sf Sample rate Hertz, stored file header used instead. rmc.headername.sf file header: Row name (character) sample frequency can found. rmc.headername.sn file header: Row name (character) serial number can found. rmc.headername.recordingid file header: Row name (character) recording ID can found. rmc.header.structure Character used split header name header value, e.g. \":\" \" \" rmc.check4timegaps Boolean indicate whether gaps time imputed zeros. sensing equipment provides accelerometer gaps time. rest GGIR designed , setting argument TRUE gaps time filled zeros. rmc.col.wear external wear detection outcome stored part data can used GGIR. argument specifies column wear detection (Boolean) stored. rmc.doresample Boolean indicate whether resample data based available timestamps extracted sample rate file header rmc.scalefactor.acc Numeric value (default 1) scale acceleration signals via multiplication. example, data provided m/s2 setting 1/9.81 derive gravitational units. interpolationType Integer indicate type interpolation used resampling time series (mainly relevant Axivity sensors), 1=linear, 2=nearest neighbour. PreviousLastValue Automatically identified last value previous chunk data read. PreviousLastTime Automatically identified last timestamp previous chunk data read. desiredtz Timezone device worn. configtz Timezone device configured. equal desiredtz can leave default value. header Header information extracted previous time file read, re-used instead extracted .","code":""},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"use function context GGIR use arguments function, except rmc.file, rmc.nrow, rmc.skip input function GGIR g.part1 also specify argument rmc.noise, part function needed tell GGIR noise level expect data. rmc.noise taken params_rawdata object explicitly specified user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"List objects data holding time series acceleration, header available orignal file.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"Vincent T van Hees ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/read.myacc.csv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read custom csv files with accelerometer data — read.myacc.csv","text":"","code":"# create test files: No header, with temperature, with time N = 30 sf = 30 x = Sys.time()+((0:(N-1))/sf) timestamps = as.POSIXlt(x, origin=\"1970-1-1\", tz = \"Europe/London\") mydata = data.frame(x = rnorm(N), time = timestamps, y = rnorm(N), z = rnorm(N), temp = rnorm(N) + 20) testfile = \"testcsv1.csv\" write.csv(mydata, file= testfile, row.names = FALSE) loadedData = read.myacc.csv(rmc.file=testfile, rmc.nrow=20, rmc.dec=\".\", rmc.firstrow.acc = 1, rmc.firstrow.header=c(), desiredtz = \"\", rmc.col.acc = c(1,3,4), rmc.col.temp = 5, rmc.col.time=2, rmc.unit.acc = \"g\", rmc.unit.temp = \"C\", rmc.origin = \"1970-01-01\") if (file.exists(testfile)) file.remove(testfile) #> [1] TRUE"},{"path":"https://wadpac.github.io/GGIR/reference/ShellDoc2Vignette.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Definition from Shell Documentation — ShellDoc2Vignette","title":"Extract Definition from Shell Documentation — ShellDoc2Vignette","text":"Function extracts documentation given GGIR argument provided GGIR documentation. Function designed direct use package user.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ShellDoc2Vignette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Definition from Shell Documentation — ShellDoc2Vignette","text":"","code":"ShellDoc2Vignette(argument = \"mode\")"},{"path":"https://wadpac.github.io/GGIR/reference/ShellDoc2Vignette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Definition from Shell Documentation — ShellDoc2Vignette","text":"argument Character (default = \"mode\"). Name argument extract definition.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ShellDoc2Vignette.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Definition from Shell Documentation — ShellDoc2Vignette","text":"Character object definition argument.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/ShellDoc2Vignette.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Definition from Shell Documentation — ShellDoc2Vignette","text":"Jairo Hidalgo Migueles ","code":""},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":null,"dir":"Reference","previous_headings":"","what":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"Identifies columns can coerced numeric data frame, transforms columns numeric round specified digits. also replaces NA NaNs values blank.","code":""},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"","code":"tidyup_df(df = c(), digits = 3)"},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"df Data frame digits Integer indicating number decimal places (round) significant digits (signif) used","code":""},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"Data frame possible columns numeric rounded specified number digits","code":""},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"Jairo H Migueles","code":""},{"path":"https://wadpac.github.io/GGIR/reference/tidyup_df.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Round numeric columns and replace NA/NaN values by blank — tidyup_df","text":"","code":"# Test data frame df = data.frame(a = c(\"a\", \"b\"), b = as.character(c(1.543218, 8.216856483))) tidyup_df(df = df, digits = 3) #> a b #> 1 a 1.543 #> 2 b 8.217"},{"path":"https://wadpac.github.io/GGIR/reference/updateBlocksize.html","id":null,"dir":"Reference","previous_headings":"","what":"Update blocksize of data to be read depending on available memory. — updateBlocksize","title":"Update blocksize of data to be read depending on available memory. — updateBlocksize","text":"Function queries available memory either lower increase blocksize used function g.readaccfile","code":""},{"path":"https://wadpac.github.io/GGIR/reference/updateBlocksize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Update blocksize of data to be read depending on available memory. — updateBlocksize","text":"","code":"updateBlocksize(blocksize, bsc_qc)"},{"path":"https://wadpac.github.io/GGIR/reference/updateBlocksize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Update blocksize of data to be read depending on available memory. — updateBlocksize","text":"blocksize Number filepages (binary data) rows (dataformats). bsc_qc Data.frame columns time (timestamp Sys.time) size (memory size). used housekeeping g.calibrate g.getmeta","code":""},{"path":"https://wadpac.github.io/GGIR/reference/updateBlocksize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Update blocksize of data to be read depending on available memory. — updateBlocksize","text":"List blocksize bsc_qc, format input, although bsc_qc one new row.","code":""},{"path":"https://wadpac.github.io/GGIR/RELEASE_CYCLE.html","id":null,"dir":"","previous_headings":"","what":"Version numbering","title":"Version numbering","text":"use version encoding .B-C: increases major changes affect backward compatibility previous releases like changes function names, function arguments file format. B increases every CRAN release. aim avoid four CRAN releases per year. C increases every GitHub release. aim avoid one GitHub release per month.","code":""},{"path":"https://wadpac.github.io/GGIR/RELEASE_CYCLE.html","id":"github-releases","dir":"","previous_headings":"","what":"GitHub releases","title":"Version numbering","text":"releasing, please make sure check following: Create GitHub issue least 1 weeks intended release announce release indicate release. Make sure change log inst/NEWS.Rd date says “GitHub--release date” rather “release date” Make sure third (last) digit version number incremented one relative master branch date present date. applies files DESCRIPTION, GGIR-package.Rd NEWS.Rd file. Use function prepareNewRelease.R root GGIR double check version number date consistent files. Update package contributor list new people contributed. Run R CMD check ---cran make sure tests checks pass. Note GitHub releases require release name. typically choose random name city town South America. Whatever choose easy read remember word.","code":""},{"path":"https://wadpac.github.io/GGIR/RELEASE_CYCLE.html","id":"cran-releases","dir":"","previous_headings":"","what":"CRAN releases","title":"Version numbering","text":"CRAN release, follow following steps: Create GitHub issue least 4 weeks intended CRAN release announcing release indicating release list. CRAN release come major changes covered GitHub-releases. change log now say “release date” rather “GitHub--release date”. Second digit version number incremented 1 relative current CRAN version. Check whether new R version released coming make sure GGIR also tested version. Run RStudio devtools::check( manual = TRUE, remote = TRUE, incoming = TRUE) help check urls Ask Vincent (GitHub tag: vincentvanhees) submit release CRAN needs come e-mail address.","code":""}] diff --git a/vignettes/chapter2_Pipeline.Rmd b/vignettes/chapter2_Pipeline.Rmd index 04c5e1725..cc10693ad 100644 --- a/vignettes/chapter2_Pipeline.Rmd +++ b/vignettes/chapter2_Pipeline.Rmd @@ -46,14 +46,14 @@ Each part, when run, stores its output in an R-data file that has `.RData` as it The milestone files are read by the next GGIR part. The advantage of this design is that it offers internal modularity. For example, we can run part 1 now and continue with part 2 another time without having to repeat part 1 again. So, this design eases re-processing and is also helpful for us when developing and testing the GGIR code. -The milestone files are stored in sub-folders of the output folder as show below. Note that the output folder is named `output_mystudy` as example but exact name may differ for you. - -- Part 1 milestone data are stored in `output_mystudy/meta/basic`. -- Part 2 milestone data are stored in `output_mystudy/meta/ms2.out`. -- Part 3 milestone data are stored in `output_mystudy/meta/ms3.out`. -- Part 4 milestone data are stored in `output_mystudy/meta/ms4.out`. -- Part 5 milestone data are stored in `output_mystudy/meta/ms5.out`. -- Part 6 milestone data are stored in `output_mystudy/meta/ms6.out`. +The milestone data files are stored in sub-folders of the output folder as show below. Note that the output folder is named `output_mystudy` as example but exact name may differ for you. + +- For part 1: `output_mystudy/meta/basic`. +- For part 2: `output_mystudy/meta/ms2.out`. +- For part 3: `output_mystudy/meta/ms3.out`. +- For part 4: `output_mystudy/meta/ms4.out`. +- For part 5: `output_mystudy/meta/ms5.out`. +- For part 6: `output_mystudy/meta/ms6.out`. The milestone files are potentially useful for you for the following reasons: diff --git a/vignettes/chapter3_QualityAssessment.Rmd b/vignettes/chapter3_QualityAssessment.Rmd index 57bc29ed2..612b1c185 100644 --- a/vignettes/chapter3_QualityAssessment.Rmd +++ b/vignettes/chapter3_QualityAssessment.Rmd @@ -18,7 +18,7 @@ Data quality assurance is an important part of GGIR. GGIR undertakes several key ## Time gaps identification and imputation -Accelerometer data stored in binary format (e.g. .bin or .cwa) where it is typically structured in data blocks. Each data block has a header at the top and a constant number of data points often represent a few seconds of data. For the Axivity accelerometer with data stored in '.cwa' file format those blocks can, on rare occasions, be corrupted and unreadable, therefore creating a gap in the information recorded. +Accelerometer data stored in binary format (e.g. .bin or .cwa) is typically structured in data blocks. Each data block has a header at the top and a constant number of data points per block, usually the equivalent of a few seconds of data. For the Axivity accelerometer with data stored in '.cwa' file format those blocks can, on rare occasions, be corrupted and unreadable, therefore creating a gap in the information recorded. For the ActiGraph accelerometer, but also some other sensor brands that export data in ‘csv’ file format, it is possible that the recording stops at certain time and starts recording after some time, therefore creating a time gap.