[R] gam and prior

From: Paul Baverel <Paul.Baverel_at_farmbio.uu.se>
Date: Tue, 03 Jun 2008 18:57:19 +0200


Hi.
I am running a gam for covariate forward inclusions/ backward exclusions, using the weight options as follow.
library(gam)
gam.object1<-gam(ET~1, data=nonp.dat, weights=PROBA) summary(gam.object1)
step.object1<-step.gam(gam.object1, direction="both" , trace=T,

                                     scope=list("CRCL"=~1+CRCL+ns(CRCL,2),

"HT"=~1+HT+ns(HT,2),
"WT"=~1+WT+ns(WT,2),
"SER"=~1+SER+ns(SER,2),
"ALAT"=~1+ALAT+ns(ALAT,2),
"AGE"=~1+AGE+ns(AGE,2),
"UNI1"=~1+UNI1+ns(UNI1,2),

"as.factor(SEX)"=~1+as.factor(SEX),  

"as.factor(COME)"=~1+as.factor(COME),  

"as.factor(SMOK)"=~1+as.factor(SMOK)))
summary(step.object1)
The problem is that I am not sure how to use this weight since my AIKAIKE criteria goes really high as soon as I include the weights (that is, by the way, a probability (very small number then)) and then, it includes all the covariates in the scope while it should include only the one created in a previous step.
I heard about a prior.weights() option as well but using it does not affect the results at all.
Some suggestions or help on how to use prior.weights or weights in gam or even in glm will be very welcome as it is not really well documented.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 03 Jun 2008 - 18:02:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 03 Jun 2008 - 18:30:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive