print.sc_outlier | R Documentation |
Identifies and drops outliers within a single-case data frame (scdf).
## S3 method for class 'sc_outlier'
print(x, digits = "auto", ...)
## S3 method for class 'sc_outlier'
export(object, caption = NA, footnote = NA, filename = NA, ...)
outlier(
data,
dvar,
pvar,
mvar,
method = c("MAD", "Cook", "SD", "CI"),
criteria = 3.5
)
x |
An object returned by |
digits |
The minimum number of significant digits to be use. If set to "auto" (default), values are predefined. |
... |
Further parameters passed to the print function |
object |
An scdf or an object exported from a scan function. |
caption |
Character string with table caption. If left NA (default) a caption will be created based on the exported object. |
footnote |
Character string with table footnote. If left NA (default) a footnote will be created based on the exported object. |
filename |
String containing the file name. If a filename is given the output will be written to that file. |
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. |
pvar |
Character string with the name of the phase 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. |
method |
Specifies the method for outlier identification. Set |
criteria |
Specifies the criteria for outlier identification. Based on
the |
For method = "SD"
, criteria = 2
would refer t0 two standard
deviations. For method = "MAD"
, criteria = 3.5
would refer to 3.5 times
the mean average deviation. For method = "CI"
, criteria = 0.99
would
refer to a 99 percent confidence interval. For method = "cook"
, criteria = "4/n"
would refer to a Cook's Distance greater than 4/n.
data | A single-case data frame with substituted outliers. |
dropped.n | A list with the number of dropped data points for each single-case. |
dropped.mt | A list with the measurement-times of dropped data points for each single-case (values are based on the mt variable of each single-case data frame). |
sd.matrix | A list with a matrix for each case with values for the upper and lower boundaries based on the standard deviation. |
ci.matrix | A list with a matrix for each single-case with values for the upper and lower boundaries based on the confidence interval. |
cook | A list of Cook's Distances for each measurement of each single-case. |
criteria | Criteria used for outlier analysis. |
N | Number of single-cases. |
case.names | Case identifier. |
print(sc_outlier)
: Print results
export(sc_outlier)
: Export html results
Juergen Wilbert
Other data manipulation functions:
add_l2()
,
as.data.frame.scdf()
,
as_scdf()
,
fill_missing()
,
moving_median()
,
ranks()
,
rescale()
,
scdf()
,
select_cases()
,
set_vars()
,
shift()
,
smooth_cases()
,
standardize()
,
truncate_phase()
## Identify outliers using 1.5 standard deviations as criterion
susanne <- random_scdf(level = 1.0)
res_outlier <- outlier(susanne, method = "SD", criteria = 1.5)
res_outlier
## Identify outliers in the original data from Grosche (2011)
## using Cook's Distance greater than 4/n as criterion
res_outlier <- outlier(Grosche2011, method = "Cook", criteria = "4/n")
res_outlier
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.