Description Usage Arguments Value Author(s) See Also Examples
The smoothSC
function provides procedures to smooth single-case data
(i.e., to eliminate noise). A moving average function (mean- or
median-based) replaces each data point by the average of the surrounding
data points step-by-step. With a local regression function, each data point
is regressed by its surrounding data points.
1 |
data |
A single-case data frame. See |
dvar |
Character string with the name of the dependent variable. Defaults to the attributes in the scdf file. |
mvar |
Character string with the name of the measurement time variable. Defaults to the attributes in the scdf file. |
FUN |
Function determining the smoothed scores. Default |
intensity |
For |
Returns a data frame (for each single-case) with smoothed data
points. See scdf
to learn about the format of these data
frames.
Juergen Wilbert
Other data manipulation functions:
fillmissingSC()
,
longSCDF()
,
outlierSC()
,
rankSC()
,
scaleSC()
,
shiftSC()
,
truncateSC()
1 2 3 4 5 6 7 8 | ## Use the three different smoothing functions and compare the results
study <- c(
"Original" = Huber2014$Berta,
"Moving Median" = smoothSC(Huber2014$Berta, FUN = "movingMedian"),
"Moving Mean" = smoothSC(Huber2014$Berta, FUN = "movingMean"),
"Local Regression" = smoothSC(Huber2014$Berta, FUN = "localRegression")
)
plot(study)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.