Ronaldo Reis Junior
2007-Nov-15 11:55 UTC
[R] Package to make stepwise model selection using F or Chisq test
Hi, I looking for a method that use F or Chisq test instead of AIC in a stepwise modelo selection. I try the grasp package using the grasp.step.anova, but It dont work.> library(grasp)Carregando pacotes exigidos: gam Carregando pacotes exigidos: splines Carregando pacotes exigidos: mda Carregando pacotes exigidos: class> data(anorexia,package="MASS") > > m1 <- glm(Postwt ~ Prewt * Treat,data=anorexia) > > m1.grasp <- grasp.step.anova(m1,scope=list(upper=~ Prewt *Treat,lower=~1),trace=1,direction="both") # # FUNCTION: grasp.step.anova # (by Splus, adapted by A. Lehmann from step.gam) # grasp.step.anova is a modified version of step.gam of Splus using ANOVA based on Chi or F tests instead # of AIC criteria # Erro em grasp.step.anova(m.pres, scope = list(upper = ~(ProfSer + NgalhoSer + : objeto "OPTIONS" n?o encontrado Looking for OPTIONS in the code I found that this need a P.limit in an OPTIONS object. I make it.> OPTIONS <- NULL > OPTIONS$P.limit <- 0.05> m.pres.step <-grasp.step.anova(m.pres,scope=list(upper=~(ProfSer+NgalhoSer+CTOTAL+DensRamos+Htotal+CAP)^3,lower=~1),trace=1,direction="both") # # FUNCTION: grasp.step.anova # (by Splus, adapted by A. Lehmann from step.gam) # grasp.step.anova is a modified version of step.gam of Splus using ANOVA based on Chi or F tests instead # of AIC criteria # Erro em untangle.scope(object$terms, scope) : The elements of a regimen 1 appear more than once in the initial model>Dont work and grasp manual is incomplete. Anybody know other package to make this? Thanks Ronaldo --> Prof. Ronaldo Reis J?nior| .''`. UNIMONTES/Depto. Biologia Geral/Lab. de Biologia Computacional | : :' : Campus Universit?rio Prof. Darcy Ribeiro, Vila Mauric?ia | `. `'` CP: 126, CEP: 39401-089, Montes Claros - MG - Brasil | `- Fone: (38) 3229-8187 | ronaldo.reis em unimontes.br | chrysopa em gmail.com | http://www.ppgcb.unimontes.br/ | ICQ#: 5692561 | LinuxUser#: 205366