ci.ratio.prop.ps {statpsych} | R Documentation |
Computes a confidence interval for a ratio of proportions in a paired-samples design. This function requires the frequency counts from a 2 x 2 contingency table for two repeated dichotomous measurements.
ci.ratio.prop.ps(alpha, f00, f10, f01, f11)
alpha |
alpha level for 1-alpha confidence |
f00 |
number of participants with y = 0 and x = 0 |
f10 |
number of participants with y = 1 and x = 0 |
f01 |
number of participants with y = 0 and x = 1 |
f11 |
number of participants with y = 1 and x = 1 |
Returns a 1-row matrix. The columns are:
Estimate - estimate of proportion ratio
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
Bonett DG, Price RM (2006). “Confidence intervals for a ratio of binomial proportions based on paired data.” Statistics in Medicine, 25(17), 3039–3047. ISSN 0277-6715, doi: 10.1002/sim.2440.
ci.ratio.prop.ps(.05, 12, 26, 4, 6) # Should return: # Estimate LL UL # [1,] 2.375 1.537157 3.669518