ci.lc.stdmean.ws {statpsych}R Documentation

Confidence interval for a standardized linear contrast of means in a within-subjects design

Description

Computes confidence intervals for two types of population standardized linear contrast of means (unweighted standardizer and level 1 standardizer) in a within-subjects design. Equality of variances is not assumed, but the correlations among the repeated measures are assumed to be approximately equal.

Usage

ci.lc.stdmean.ws(alpha, m, sd, cor, n, q)

Arguments

alpha

alpha level for 1-alpha confidence

m

vector of within-subjects estimated means

sd

vector of within-subjects estimated standard deviations

cor

average estimated correlation of all measurement pairs

n

sample size

q

vector of within-subjects contrast coefficients

Value

Returns a 2-row matrix. The columns are:

References

Bonett DG (2008). “Confidence intervals for standardized linear contrasts of means.” Psychological Methods, 13(2), 99–109. ISSN 1939-1463, doi:10.1037/1082-989X.13.2.99.

Examples

m <- c(33.5, 37.9, 38.0, 44.1)
sd <- c(3.84, 3.84, 3.65, 4.98)
q <- c(.5, .5, -.5, -.5)
ci.lc.stdmean.ws(.05, m, sd, .672, 20, q)

# Should return:
#                           Estimate  adj Estimate        SE        LL         UL
# Unweighted standardizer: -1.301263     -1.266557 0.3147937 -1.918248 -0.6842788
# Level 1 standardizer:    -1.393229     -1.337500 0.3661824 -2.110934 -0.6755248



[Package statpsych version 1.5.0 Index]