Skip to content
Prev 169985 / 398506 Next

OT: A test with dependent samples.

Ah, experimental units,again ... a subject little taught by statisticians
that is often the crux of the matter. As here.

The cat is the experimental unit. There are 73 of them. 12 of them
experienced vomiting after treatment. What's a confidence interval for the
true proportion based on our sample of 73? binom.test(12,72) gives us .088
to .27 for an exact 2 sided interval (and a P value of 2.2e-16 for the null
= 0).

Seems rather convincing -- and simple -- to me!

-- Bert Gunter

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of David Winsemius
Sent: Tuesday, February 10, 2009 1:51 PM
To: Rolf Turner
Cc: R-help Forum
Subject: Re: [R] OT: A test with dependent samples.

In the biomedical arena, at least as I learned from Rosner's  
introductory text, the usual approach to analyzing paired 2 x 2 tables  
is McNemar's test.

?mcnemar.test

 > mcnemar.test(matrix(c(73,0,61,12),2,2))

	McNemar's Chi-squared test with continuity correction

data:  matrix(c(73, 0, 61, 12), 2, 2)
McNemar's chi-squared = 59.0164, df = 1, p-value = 1.564e-14

The help page has citation to Agresti.