accel_artifacts: Accelerometer Artifact Correction

Description Usage Arguments Value Note Author(s) References See Also Examples

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

1
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.

Note

An integer vector is returned despite the average calculation often producing a decimal. This follows the convention used by the NCI's SAS programs [1].

Some additional information on the package accelerometry and its functions can be found on the author's website, https://sites.google.com/site/danevandomelen/

Author(s)

Dane R. Van Domelen

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

1
2
3
4
5
6
7
8
# 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)

Example output



accelerometry documentation built on May 2, 2019, 5:23 p.m.