Learn R Programming

accelerometry (version 2.2.5)

accel.artifacts: Accelerometer Artifact Correction

Description

This function corrects abnormally high count values in minute-to-minute accelerometer data by replacing such values with the average of the neighboring count values.

Usage

accel.artifacts(counts, thresh = 32767, skipchecks = FALSE)

Arguments

counts

Time series accelerometer counts vector.

thresh

Minimum count value that is considered an artifact.

skipchecks

If TRUE, function skips error checking code and runs slightly faster.

Value

An integer vector identical to the input vector counts but with artifacts corrected.

References

1. National Cancer Institute. Risk factor monitoring and methods: SAS programs for analyzing NHANES 2003-2004 accelerometer data. Available at: http://riskfactor.cancer.gov/tools/nhanes_pam. Accessed July 31, 2014.

Acknowledgment: This material is based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No. DGE-0940903.

See Also

accel.process.uni, accel.process.tri

Examples

Run this code
# NOT RUN {
# Load in sample data frame
data(unidata)

# Get data from ID number 21007
counts.part3 <- unidata[unidata[, "seqn"] == 21007, "paxinten"]

# Replace artifacts (defined as 10000+ counts) with average of neighboring values
counts.part3.corrected <- accel.artifacts(counts = counts.part3, thresh = 10000)
# }

Run the code above in your browser using DataLab