[R] p-values

Peter Ho peter at fe.up.pt
Fri Aug 5 00:02:25 CEST 2005


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




More information about the R-help mailing list