measuresWithMissingData: Measures with missing data

measuresWithMissingDataR Documentation

Measures with missing data

Description

The following three functions can be used with missing data. They return the mean, the standard error of the mean and the confidence interval of the mean.Note that we hesitated to provide these functions: you should deal with missing data prior to making your plot. Removing NAs from the mean in a univariate setting is equivalent to performing mean imputation. See @enwiki:1243866876 for more. Also note that for repeated-measure design, only CA adjustment is available.

Usage

meanNArm(x)

SE.meanNArm(x)

CI.meanNArm(x, gamma)

Arguments

x

a vector of numbers, the sample data (mandatory);

gamma

a confidence level for CI (default 0.95).

Value

the means, a measure of precision (SE) or an interval of precision (CI) in the presence of missing data.

References

\insertAllCited

Examples

# the confidence interval of the mean for default 95% and 90% confidence level
meanNArm( c(1,2,3, NA) )
SE.meanNArm( c(1,2,3, NA) )
CI.meanNArm( c(1,2,3, NA) )
CI.meanNArm( c(1,2,3, NA), gamma = 0.90)


dcousin3/superb documentation built on Dec. 23, 2024, 8:58 p.m.