Skip to content
Prev 2149 / 7420 Next

Error message in GAM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/18/2011 06:16 PM, ARISTIDES LOPEZ wrote:
It means you're pushing your data too hard: how about being
old-fashioned and fitting quadratic models [e.g. poly(Lat,2)] for each
of your predictor variables (this of course ignores interactions, which
you might ?? want to worry about in some cases -- but you probably
can't.  In principle, gam() in the mgcv package (which is what I assume
you are using) tries to adjust the degree of complexity of your model
downward as appropriate, but it may be having a hard time doing so; can
you set k lower?  For the models that do succeed, I would suspect that
the effective degrees of freedom fitted are much lower than the k values
you are specifying, so you could afford to reduce them (see ?choose.k )

  Remember the rule of thumb that you should not be trying to fit more
than *at most* N/10 parameters, where N is your number of points -- so
quadratic models of 3 independent predictors (= 7 parameters, intercept
+ 2 for each predictor variable) would already be overfitting slightly.

  cheers
    Ben Bolker
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3USAMACgkQc5UpGjwzenPfLgCfdjIADyDtkY0OkBHJQdaNJOjd
nKsAn1kQt5OaoHA4hmRhNOM/ybtEWZ9W
=FN0f
-----END PGP SIGNATURE-----