| ci.mean.gen | R Documentation |
Computes confidence intervals for three population generalized means (square-root, geometric, and harmonic) using a vector of response scores as input. The square-root mean requires non-negative scores. The geometric and harmonic means require positive scores. The standard errors are recovered from the confidence intervals.
ci.mean.gen(alpha, y)
alpha |
alpha level for 1-alpha confidence |
y |
vector of scores |
Returns a 1-row matrix. The columns are:
Estimate - estimated mean
SE - recovered standard error
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
y <- c(32, 47, 28, 15, 20, 41, 87)
ci.mean.gen(.05, y)
# Should return:
# Estimate SE LL UL
# Square-root 35.79395 8.141122 18.64498 58.48619
# Geometric 33.26410 7.633328 19.47124 56.82741
# Harmonic 29.07073 7.978149 19.35236 58.39602
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.