ci.2x2.median.mixed {statpsych}R Documentation

Computes confidence intervals in a 2x2 mixed design for medians

Description

Computes distribution-free confidence intervals based on medians for the AB interaction effect, main effect of A, main efect of B, simple main effects of A, and simple main effects of B in a 2x2 mixed design where Factor A is the within-subjects factor and Factor B is the between subbjects factor. Tied scores are assumed to be rare.

Usage

ci.2x2.median.mixed(alpha, y11, y12, y21, y22)

Arguments

alpha

alpha level for 1-alpha confidence

y11

vector of scores at level 1 of A in group 1

y12

vector of scores at level 2 of A in group 1

y21

vector of scores at level 1 of A in group 2

y22

vector of scores at level 2 of A in group 2

Value

Returns a 7-row matrix (one row per effect). The columns are:

References

Bonett DG, Price RM (2020). “Interval estimation for linear functions of medians in within-subjects and mixed designs.” British Journal of Mathematical and Statistical Psychology, 73(2), 333–346. ISSN 0007-1102, doi:10.1111/bmsp.12171.

Examples

y11 <- c(18, 19, 20, 17, 20, 16)
y12 <- c(19, 18, 19, 20, 17, 16)
y21 <- c(19, 16, 16, 14, 16, 18)
y22 <- c(16, 10, 12,  9, 13, 15)
ci.2x2.median.mixed(.05, y11, y12, y21, y22)

# Should return:
#          Estimate       SE         LL       UL
# AB:         -3.50 2.698647 -8.7892514 1.789251
# A:           1.75 1.349324 -0.8946257 4.394626
# B:           4.25 1.017564  2.2556114 6.244389
# A at b1:     0.00 1.489007 -2.9184005 2.918400
# A at b2:     3.50 2.250679 -0.9112492 7.911249
# B at a1:     2.50 1.486420 -0.4133294 5.413329
# B at a2:     6.00 1.871571  2.3317887 9.668211



[Package statpsych version 1.5.0 Index]