[R] Convergence problem in gam(mgcv)

Ariyo Kanno 10dimensioner at gmail.com
Thu Oct 4 23:11:49 CEST 2007


Dear all,

I'm trying to fit a pure additive model of the following formula :
fit <- gam(y~x1+te(x2, x3, bs="cr"))
,with the smoothing parameter estimation method "magic"(default).

Regarding this, I have two questions :

Question 1 :
In some cases the value of "mgcv.conv$fully.converged" becomes
"FALSE", which tells me that the method stopped with a "steepest
descent step failure".

So I'd like to modify the arguments of magic() to make it easier to
converge. But It doesn't seem like that I can do it by modifying the
gam defaults through gam.control(). Is there any means to set magic()
arguments from outside ?

Question 2 :
Sometimes the smoothing parameter for x2 is very large (in the order
of 1E+8 or 1E+10), while that for x3 is modest(less than 1), and the
opposite cases also happen. Does this indicate that something is
wrong, or just that the data is actually linear with respect to x2 or
x3 ?

Thank you for your help in advance.



More information about the R-help mailing list