test.prop.ps | R Documentation |
Computes a continuity-corrected McNemar test for equality of population proportions in a paired-samples design. This function requires the frequency counts from a 2 x 2 contingency table for two paired dichotomous measurements. A confidence interval for a difference in population proportions (see ci.prop.ps) is a recommended supplement to the McNemar test.
test.prop.ps(f00, f01, f10, f11)
f00 |
number participants with y = 0 and x = 0 |
f01 |
number participants with y = 0 and x = 1 |
f10 |
number participants with y = 1 and x = 0 |
f11 |
number participants with y = 1 and x = 1 |
Returns a 1-row matrix. The columns are:
Estimate - ML estimate of proportion difference
z - z test statistic
p - two-sided p-value
Snedecor1980statpsych
test.prop.ps(156, 96, 68, 80)
# Should return:
# Estimate z p
# 0.07 2.108346 0.03500109
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.