[R] Permutation Ramsey RESET test ?

varin sacha v@r|n@@ch@ @end|ng |rom y@hoo@|r
Sun Jun 28 20:45:31 CEST 2020


Dear R-experts,

I am trying to do a permutation test for the Ramsey RESET test. More precisely, I am interested in the "exact" p-value of the test.

I have checked the coin package and all the functions (oneway_test; ...). There are plenty of functions but no one is helping me for RESET test. I have checked as well lmPerm package for linear model but I don't find anything that can help me. I have googled but did not find anything to help me. I guess I have to write my own function. I really don't know how to do that. Any help would be highly appreciated.

Here below the reproducible example :

####################
Y=c(22349,34567,23123,43212,56765,45321,34534,33345,34356,56434,65434,32143,34532,23453,34321,65434,40983,56432,23435,65432)
X1=c(23,12,43,23,54,34,12,11,32,23,21,12,11,43,54,23,23,22,17,18)
X2=c(121,212,101,109,432,154,342,176,324,254,421,342,333,444,123,213,243,254,398,397)
X3=c(12,32,22,12,13,15,23,24,31,17,18,21,23,24,31,21,12,18,19,20)

fit=lm(Y~ X1+X2+X3)

install.packages("lmtest")
library(lmtest)
resettest(Y~ X1+X2+X3)
####################

 



More information about the R-help mailing list