[R] chisq.test: decreasing p-value
David Winsemius
dwinsemius at comcast.net
Wed Mar 11 14:39:43 CET 2009
Thanks to Peter Dalgaard for the correct answer. I misinterpreted what
R was returning.
On Mar 11, 2009, at 7:32 AM, David Winsemius wrote:
>
> On Mar 11, 2009, at 6:36 AM, soeren.vogel at eawag.ch wrote:
>
>> A Likert scale may have produced counts of answers per category.
>> According to theory I may expect equality over the categories. A
>> statistical test shall reveal the actual equality in my sample.
>>
>> When applying a chi square test with increasing number of
>> repetitions (simulate.p.value) over a fixed sample, the p-value
>> decreases dramatically (looks as if converge to zero).
>>
>> (1) Why?
>
> With low numbers of repetitions the test has low power, i.e, it may
> give you the wrong answer to the question: are those two vectors
> from the same distribution? As you increase in number, the simulated
> value approaches the "truth".
>>
>> (2) (If this test is wrong), then which test can check what I want
>> to check, that is: are the two distributions of frequencies
>> (observed and expected) in principle the same?
>
> "In principle" they are not the same. Do you want a test that tells
> you they are?
>>
>> (3) By the way, how to deal with low frequency cells?
>>
>> r <- c(10, 100, 500, 1000, 2000, 5000)
>> v <- c(35, 40, 45, 45, 40, 35)
>> sapply(list(r), function (x) { chisq.test(v, p=c(rep.int(40, 6)),
>> rescale.p=T, simulate.p.value=T, B=x)$p.value })
>>
>>
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list