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.