ci.mixed.interaction: Confidence interval for the interaction of two pairs of...

Description Usage Arguments Value Author(s) References Examples

View source: R/ci_mixed_interaction.R

Description

This function computes a confidence interval for the interaction of two pairs of dependent proportions. This corresponds to a repeated measures design where subjects in two independent groups give dichotomous responses on two different occasions (thus, this analysis corresponds closely to a 2x2 mixed ANOVA with one between-subjects independent variable and one within-subjects independent variable). The confidence interval tests if the difference in proportions in one group is larger than the difference of proportions in the other group.

Usage

1
ci.mixed.interaction(ci, e1, f1, g1, h1, e2, f2, g2, h2)

Arguments

ci

The confidence level - pass as a natural number (e.g. 95 for the 95% confidence interval).

e1

Group 1: Number of cases for which both events are 1.

f1

Group 1: Number of cases for which the first event is 1, and the second event is 0.

g1

Group 1: Number of cases for which the first event is 0, and the second event is 1.

h1

Group 1: Number of cases for which both events are 0.

e2

Group 2: Number of cases for which both events are 1.

f2

Group 2: Number of cases for which the first event is 1, and the second event is 0.

g2

Group 2: Number of cases for which the first event is 0, and the second event is 1.

h2

Group 2: Number of cases for which both events are 0.

Value

A list containing the confidence interval boudaries.

d

The difference between differences of the two paired proportions

l

The lower bound of the confidence interval

u

The upper bound of the confidence interval

Author(s)

Martin Papenberg martin.papenberg@hhu.de

References

Newcombe, R. G. (2001). Estimating the difference between differences: measurement of additive scale interaction for proportions. Statistics in medicine, 20(19), 2885-2893.

Examples

1
2
3
4
5
6
# Example from From Newcombe (Section 4.2; 2001):
ci.mixed.interaction(95, 294, 36, 59, 57, 209, 19, 32, 50)
# Example from From Newcombe (Section 4.3; 2001):
ci.mixed.interaction(95, 2, 12, 3, 17, 4, 1, 2, 25)
# Example from From Newcombe (Section 4.4; 2001):
ci.mixed.interaction(95, 11, 6, 1, 3, 9, 4, 5, 1)

m-Py/propint documentation built on July 26, 2019, 8:47 a.m.