ci.ratio.mad2: Confidence interval for a 2-group ratio of mean absolute...

View source: R/statpsych1.R

ci.ratio.mad2R Documentation

Confidence interval for a 2-group ratio of mean absolute deviations

Description

Computes a confidence interval for a ratio of population MADs (mean absolute deviation from median) in a 2-group design.

Usage

ci.ratio.mad2(alpha, y1, y2)

Arguments

alpha

alpha level for 1-alpha confidence

y1

vector of scores for group 1

y2

vector of scores for group 2

Value

Returns a 1-row matrix. The columns are:

  • MAD1 - estimated MAD from group 1

  • MAD2 - estimated MAD from group 2

  • MAD1/MAD2 - estimate of MAD ratio

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

\insertRef

Bonett2003bstatpsych

Examples

y1 <- c(32, 39, 26, 35, 43, 27, 40, 37, 34, 29)
y2 <- c(36, 44, 47, 42, 49, 39, 46, 31, 33, 48)
ci.ratio.mad2(.05, y1, y2)

# Should return:
#     MAD1     MAD2  MAD1/MAD2        LL       UL
# 5.111111 5.888889  0.8679245 0.4520879 1.666253



statpsych documentation built on June 22, 2024, 6:51 p.m.