Dear list,
i'm using the GAM function from mgcv package. I'm using this syntax:
model=gam(y~offset(x)+s(log1p(x1))+s(log1p(x2))+s(x3)+s(x4)+s(5),family=quasipoisson,data=data)
and I'm sequentially dropping the single term with the highest
non-significant p-value from the model and re-fitting until all term are
significant. Now I have:
model=gam(y~offset(x)+s(log1p(x1))+s(log1p(x2))+s(x5),family=quasipoisson,data=data)
summary(model)
Approximate significance of smooth terms:
edf Ref.df F p-value
s(log1p(x1)) 1.000 1.00 36.984 8.09e-08 ***
s(log1p(x2)) 13.174 13.84 5.767 5.66e-07 ***
s(x5) 8.807 8.98 3.600 0.00118 **
My question is: may I increase the k parameter for the variable x1 to avoid
the 1 edf and the linear relationship in the plot result. I tried:
model=gam(y~offset(x)+s(log1p(x1)*,*
k=15)+s(log1p(x2))+s(x5),family=quasipoisson,data=data)
and all variables still significant and I have a edf higher than 1 and a
non-linear relationship in the plot result.
If I increase the k parameter for one variable, should I increase it for the
other variables?? Does the increase (or decrease) of the k parameter changes
the interpretation of the results? I'm not sure to understand when I should
change or not the k parameter... and of course I read the help page choose.k
{mgcv}.
Thanks a lot in advance
Sam
[[alternative HTML version deleted]]