First of all, I would like to express my sincere gratitude to Dr. Vincent van Hees, Dr. Jairo Hidalgo Migueles, and the GGIR community for their invaluable responses on the GGIR Google Group.
I am analyzing a dataset corresponding to the scenario "For externally derived ActiGraph count data in .CSV format assuming a study protocol where the sensor was not worn during the night," as illustrated in one of the examples in the manual. The protocol involved preschoolers wearing accelerometers on their hip/waist for 7 days during waking hours (15-second epoch, normal filter).
Additionally, our dataset already has non-wear time and nap time removed. Therefore, there are gaps in the 15-second intervals where non-wear time and nap time are present.
As a result, I intend to skip parts 3 and 4 and analyze only parts 1, 2, and 5.
I have tried several approaches based on the manual and the GGIR Google Group, but I keep encountering the following error message:
Part 2
1 Error in Math.data.frame(list(NeishabouriCount_y = c("0", "62.5", "2.5", :
non-numeric-alike variable(s) in data frame: NeishabouriCount_y, NeishabouriCount_x, NeishabouriCount_z, NeishabouriCount_x.1
Could you provide me with some valuable advice on what I might be missing? Below are the code and CSV file I have prepared based on the manual.
#-------------------------------
# General parameters
#-------------------------------
mode = c(1,2,5),
datadir = "C:/Users/Epidemiology/Desktop/data",
outputdir = "C:/Users/Epidemiology/Desktop/output",
f0 = 1, f1 = 0,
overwrite = FALSE,
do.imp = FALSE,
idloc=2, #id is located in the filename
print.filename = TRUE,
storefolderstructure = FALSE,
#=====================
# Part 1 parameters:
#=====================
windowsizes = c(15,900,3600),
# 15s epoch
dataFormat = "actigraph_csv",
extEpochData_timeformat = "%m/%d/%Y %H:%M:%S",
desiredtz = "America/Denver",
configtz = "America/Denver",
minimumFileSizeMB = 0.05,
# Set minimum file size (50KB)
printsummary=TRUE,
#-------------------------------
# Part 2 parameters:
#-------------------------------
data_masking_strategy = 2,
ndayswindow = 7,
includedaycrit = 1,
# intended to include all data
qwindow = c(6, 22),
mvpathreshold = 240,
#-------------------------------
# Part 3, 4 parameters:
#-------------------------------
ignorenonwear = TRUE,
do.visual = FALSE,
#-------------------------------
# Part 5 parameters:
#-------------------------------
do.enmo=FALSE,
do.neishabouricounts = TRUE,
acc.metric = "NeishabouriCount_y",
# The cut-off for distinguishing SED, LPA and MVPA is based on Axis 1 (vertical axis).
HASPT.algo = "NotWorn",
HASIB.algo = "NotWorn",
threshold.lig = c(26),
# LPA cut-point
threshold.mod = c(420),
# MVPA cut-point
threshold.vig = NULL,
# aim to calculate MVPA without distinguishing between MPA and VPA
excludefirstlast = FALSE,
boutcriter = NULL,
# Bout duration is not applied.
boutcriter.in = NULL,
boutcriter.lig = NULL,
boutcriter.mvpa = NULL,
boutdur.in = NULL,
# Bout duration is not applied.
boutdur.lig = NULL,
# Bout duration is not applied.
boutdur.mvpa = NULL,
# Bout duration is not applied.
#-------------------------------
# Report generation
#-------------------------------
visualreport = FALSE,
save_ms5rawlevels = TRUE,
save_ms5raw_without_invalid = FALSE,
do.report = c(2, 5),
)