ci.lc.mean.bs | R Documentation |
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.
ci.lc.mean.bs(alpha, m, sd, n, v)
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 between-subjects contrast coefficients |
Returns a 2-row matrix. The columns are:
Estimate - estimated linear contrast
SE - standard error
t - t test statistic
df - degrees of freedom
p - two-sided p-value
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
Snedecor1980statpsych
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.