library(DGB)
Computes confidence interval for a population linear contrast of means in a within-subjects design (assumes equal variances and correlations).
Arguments: - alpha: alpha level for 1-alpha confidence - m: vector of sample means - var: average of sample variances - cor: average of sample correlations - n: sample size - h: vector of contrast coefficients Values: - estimate, SE, df, lower limit, upper limit
alpha = .05 m = c(33.5, 37.9, 38.0) var = 7.8 cor = .82 n = 20 h = c(-.5, -.5, 1) ci.lc.mean.ws(alpha, m, var, cor, n, h)
Computes sample size required to estimate a linear contrast of population means with desired precision in a within-subjects design.
Arguments:
- alpha: alpha level for 1-alpha confidence
- var: planning value of largest DV variance
- cor: planning value of smallest correlation
- w: desired confidence interval width
- h: vector of contrast coefficients
Values: - required sample size
alpha = .05 var = 265 cor = .8 w = 10 h = c(.5, .5, -.5, -.5) size.ci.lc.mean.ws(alpha, var, cor, w, h)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.