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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

jacksonmrodrigues@gmail.com
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]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.