From: Christine Adrion <christine.adrion_at_web.de>

Date: Fri 05 Aug 2005 - 07:26:10 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Aug 05 07:30:14 2005

Date: Fri 05 Aug 2005 - 07:26:10 EST

Hello,

I have a question concerning the R-function chisq.test.

For example, I have some count data which can be categorized as follows

class1: 15 observations class2: 0 observations class3: 3 observations class4: 4 observations

I would like to test the hypothesis whether the population probabilities are all equal (=> Test for discrete uniform distribution) If you have a small sample size and therefore a sparse (1xr)-table, then assumptions for chisquare-goodness-of-fit test are violated (the numbers expected are less than 5 in more than 75% of the entries.)

####### R-Program: Chisquare-Test :#########

mydata <- c(15,0,3,4)

chisq.test(mydata, correct=TRUE, rescale.p = TRUE, simulate.p.value = TRUE, B = 2000)

As you cannot ignore the small sample size, I use 'simulate.p.value' is 'TRUE' and therefore the p-value is computed by Monte Carlo simulation with 'B' replicates. But is it also the possible to use an EXACT version of a chisquare goodness-of-fit test without a Monte-Carlo-simulation? How can I calculate this in R?

Any hint would be appreciated,

Regards,

Christine Adrion

[[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Aug 05 07:30:14 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:39:41 EST
*