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.
Value
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
Examples
y <- c(32, 47, 28, 15, 20, 41, 87)
ci.mean.gen(.05, y)
#> 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
# 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