ci.ratio.mean.ps: Confidence interval for a paired-samples mean ratio

View source: R/statpsych1.R

ci.ratio.mean.psR Documentation

Confidence interval for a paired-samples mean ratio

Description

Compute a confidence interval for a ratio of population means of ratio-scale measurements in a paired-samples design. Equality of variances is not assumed.

Usage

ci.ratio.mean.ps(alpha, y1, y2)

Arguments

alpha

alpha level for 1-alpha confidence

y1

vector of measurement 1 scores

y2

vector of measurement 2 scores (paired with y1)

Value

Returns a 1-row matrix. The columns are:

  • Mean1 - estimated measurement 1 mean

  • Mean2 - estimated measurement 2 mean

  • Mean1/Mean2 - estimate of mean ratio

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

\insertRef

Bonett2020bstatpsych

Examples

y1 <- c(3.3, 3.6, 3.0, 3.1, 3.9, 4.2, 3.5, 3.3)
y2 <- c(3.0, 3.1, 2.7, 2.6, 3.2, 3.8, 3.2, 3.0)
ci.ratio.mean.ps(.05, y1, y2)

# Should return:
#  Mean1 Mean2 Mean1/Mean2      LL       UL
# 3.4875 3.075    1.134146 1.09417 1.175583



statpsych documentation built on Sept. 11, 2024, 7:42 p.m.