[R] degree of freedom of smoothing spline in Generalized Additive Model (GAM)

Jackson Rodrigues jacksonmrodrigues at gmail.com
Thu Jul 9 21:02:05 CEST 2015


Hi all,

I am trying to fit a Generalized Additive Model (GAM) with mgcv package
aiming to identify changes on time series just like Gavin Simpson did (
http://www.fromthebottomoftheheap.net/2014/05/15/identifying-periods-of-change-with-gams/
).

However, depending on value of degree of freedom (K) chosen , the result
change considerably.

I run the following code to fit the GAM
fit <- gamm(Mydata ~ s(Age, k =25), correlation = corARMA(form = ~ Age, p =
1))

The package documentation provides some support in "choose K" section by
exploring p-value and k-index (gam.check function), however, I have gotten
no p-value and K-index either.

Could anyone help me to find the best degree of freedom?


Thank you in advance for any support.

Jackson Rodrigues
-- 

Jackson M. Rodrigues
Department of Palynology and Climate Dynamics
Albrecht-von-Haller-Institute for Plant Sciences
Georg-August-University Göttingen
Untere Karspuele 2
37073 Göttingen/Germany
Tel.:   0049 (0) 176 8186 4994

	[[alternative HTML version deleted]]



More information about the R-help mailing list