[R] OT: A test with dependent samples.

markleeds at verizon.net markleeds at verizon.net
Wed Feb 11 01:12:57 CET 2009


Hi Bert:  I think what you said about a prior guess for  the NULL is 
also similar to what Chuck said about people looking with a blank stare. 
Thanks for the clarification.






On Tue, Feb 10, 2009 at  7:06 PM, Bert Gunter wrote:

> The only question at issue (i.e. capable of being addressed) is: is 
> giving
> the drug to non-vomiting cats associated with vomiting? (I would 
> strongly
> suspect that cats that were vomiting beforehand would have been 
> excluded
> from the study, as the researcher would have felt that one couldn't 
> then
> tell whether or not the drug caused vomiting problems for them. No?)
>
> There were 73 non-vomiting cats, 12 of which started vomiting after
> receiving the drug. All I can do is give a confidence interval for the
> estimated proportion of nonvomiting cats that vomit when given this 
> drug and
> perhaps ask whether it is consistent with their nonvomiting status 
> before.
> Which is what I did. And it's pretty convincing that giving the pill 
> is
> associated with vomiting, right?
>
> Whether the vomiting was associated with the giving of this 
> **particular**
> drug is, of course, impossible to tell, because the researcher failed 
> to
> include placebo controls. I chose 0 for a null as a representation of 
> their
> non-vomiting status, but the scientific question of interest is 
> probably to
> compare them to the proportion of cats that would vomit if given any 
> pill at
> all. Without any placebo controls, who can tell? Substitute a prior 
> guess if
> you like for a Null. Which is exactly the point that Marc Schwartz 
> made --
> that is, that the data are probably completely useless to answer the
> question of interest because the researcher messed up the design.
> -- Bert Gunter
>
> -----Original Message-----
> From: markleeds at verizon.net [mailto:markleeds at verizon.net] Sent: 
> Tuesday, February 10, 2009 2:54 PM
> To: Bert Gunter
> Cc: 'David Winsemius'; 'Rolf Turner'; r-help at r-project.org
> Subject: Re: [R] OT: A test with dependent samples.
>
>   Hi: Bert:  can you do that because the null is that they are equal 
> before and after,
>   not that the proportion is zero ? Thank for any clarification to my 
> lack of understanding.
>
>
>
>
> On Tue, Feb 10, 2009 at  5:43 PM, Bert Gunter wrote:
>
>> 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.
>>
>> -- 
>> David winsemius
>> On Feb 10, 2009, at 4:33 PM, Rolf Turner wrote:
>>
>>>
>>> I am appealing to the general collective wisdom of this
>>> list in respect of a statistics (rather than R) question.  This 
>>> question
>>> comes to me from a friend who is a veterinary oncologist.  In a 
>>> study that
>>> she is writing up there were 73 cats who were treated with a drug 
>>> called
>>> piroxicam.  None of the cats were observed to be subject to vomiting 
>>> prior
>>> to treatment; 12 of the cats were subject to vomiting after 
>>> treatment
>>> commenced.  She wants to be able to say that the treatment had a 
>>> ``significant''
>>> impact with respect to this unwanted side-effect.
>>>
>>> Initially she did a chi-squared test.  (Presumably on the matrix
>>> matrix(c(73,0,61,12),2,2) --- she didn't give details and I didn't 
>>> pursue
>>> this.) I pointed out to her that because of the dependence --- same 
>>> 73
>>> cats pre- and post- treatment --- the chi-squared test is 
>>> inappropriate.
>>>
>>> So what *is* appropriate?  There is a dependence structure of some 
>>> sort,
>>> but it seems to me to be impossible to estimate.
>>>
>>> After mulling it over for a long while (I'm slow!) I decided that a
>>> non-parametric approach, along the following lines, makes sense:
>>>
>>> We have 73 independent pairs of outcomes (a,b) where a or b is 0
>>> if the cat didn't barf, and is 1 if it did barf.
>>>
>>> We actually observe 61 (0,0) pairs and 12 (0,1) pairs.
>>>
>>> If there is no effect from the piroxicam, then (0,1) and (1,0) are
>>> equally likely.  So given that the outcome is in {(0,1),(1,0)} the
>>> probability of each is 1/2.
>>>
>>> Thus we have a sequence of 12 (0,1)-s where (under the null 
>>> hypothesis)
>>> the probability of each entry is 1/2.  Hence the probability of this
>>> sequence is (1/2)^12 = 0.00024.  So the p-value of the (one-sided) 
>>> test
>>> is 0.00024.  Hence the result is ``significant'' at the usual 
>>> levels,
>>> and my vet friend is happy.
>>>
>>> I would very much appreciate comments on my reasoning.  Have I made 
>>> any
>>> goof-ups, missed any obvious pit-falls?  Gone down a wrong garden 
>>> path?
>>>
>>> Is there a better approach?
>>>
>>> Most importantly (!!!): Is there any literature in which this 
>>> approach is
>>> spelled out?  (The journal in which she wishes to publish will 
>>> almost surely
>>> demand a citation.  They *won't* want to see the reasoning spelled 
>>> out in
>>> the paper.)
>>>
>>> I would conjecture that this sort of scenario must arise reasonably 
>>> often
>>> in medical statistics and the suggested approach (if it is indeed 
>>> valid
>>> and sensible) would be ``standard''.  It might even have a name! But 
>>> I
>>> have no idea where to start looking, so I thought I'd ask this 
>>> wonderfully
>>> learned list.
>>>
>>> Thanks for any input.
>>>
>>> 	cheers,
>>>
>>> 		Rolf Turner
>>>
>>>
>>> 
>>> ######################################################################
>>> Attention:\ This e-mail message is privileged and 
>>> confid...{{dropped: 9}}
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide 
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide 
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list