ci.ratio.cod2: Confidence interval for a ratio of dispersion coefficients in...

View source: R/statpsych1.R

ci.ratio.cod2R Documentation

Confidence interval for a ratio of dispersion coefficients in a 2-group design

Description

Computes a confidence interval for a ratio of population dispersion coefficients (mean absolute deviation from median divided by median) in a 2-group design. Ratio-scale scores are assumed.

Usage

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

Arguments

alpha

alpha level for 1-alpha confidence

y1

vector of scores in group 1

y2

vector of scores in group 2

Value

Returns a 1-row matrix. The columns are:

  • COD1 - estimated coefficient of dispersion in group 1

  • COD2 - estimated coefficient of dispersion in group 2

  • COD1/COD2 - estimated ratio of dispersion coefficients

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

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.cod2(.05, y1, y2)

# Should return:
#      COD1      COD2 COD1/COD2       LL       UL
# 0.1333333 0.1232558  1.081761 0.494964 2.282254



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