[R] p-values

From: Peter Ho <peter_at_fe.up.pt>
Date: Fri 05 Aug 2005 - 08:02:25 EST


HI R-users,

I am trying to repeat an example from Rayner and Best "A contingency table approach to nonparametric testing (Chapter 7, Ice cream example).

In their book they calculate Durbin's statistic, D1, a dispersion statistics, D2, and a residual. P-values for each statistic is calculated from a chi-square distribution and also Monte Carlo p-values.

I have found similar p-values based on the chi-square distribution by using:

> pchisq(12, df= 6, lower.tail=F)

[1] 0.0619688
> pchisq(5.1, df= 6, lower.tail=F)

[1] 0.5310529

Is there a way to calculate the equivalent Monte Carlo p-values?

The values were 0.02 and 0.138 respectively.

The use of the approximate chi-square probabilities for Durbin's test are considered not good enough according to Van der Laan (The American Statistician 1988,42,165-166).

Peter



ESTG-IPVC

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 08:03:02 2005

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