ci.lc.mean.bs {statpsych}R Documentation

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

Description

Computes a test statistic and confidence interval for a linear contrast of means. This function computes both unequal variance and equal variance confidence intervals and test statistics. A Satterthwaite adjustment to the degrees of freedom is used with the unequal variance method.

Usage

ci.lc.mean.bs(alpha, m, sd, n, v)

Arguments

alpha

alpha level for 1-alpha confidence

m

vector of estimated group means

sd

vector of estimated group standard deviations

n

vector of sample sizes

v

vector of betwen-subjects contrast coefficients

Value

Returns a 2-row matrix. The columns are:

References

Snedecor GW, Cochran WG (1989). Statistical Methods, 8th edition. ISU University Pres, Ames, Iowa.

Examples

m <- c(33.5, 37.9, 38.0, 44.1)
sd <- c(3.84, 3.84, 3.65, 4.98)
n <- c(10,10,10,10)
v <- c(.5, .5, -.5, -.5)
ci.lc.mean.bs(.05, m, sd, n, v)

# Should return:
#                              Estimate       SE         t       df 
# Equal Variances Assumed:        -5.35 1.300136 -4.114955 36.00000 
# Equal Variances Not Assumed:    -5.35 1.300136 -4.114955 33.52169 
#                                         p         LL        UL
# Equal Variances Assumed:     0.0002152581  -7.986797 -2.713203
# Equal Variances Not Assumed: 0.0002372436  -7.993583 -2.706417



[Package statpsych version 1.5.0 Index]