[R] te( ) interactions and AIC model selection with GAM
Ricardogg
rgonzalezgil at gmail.com
Thu Aug 2 19:43:38 CEST 2012
- About the visualization, my question is more about interpretation. In the
case of :
model_name <- gam ( bm ~ t + te (t_year, temp_W, temp_sept, k = 5, bs = c(
“cc”,”cr”,”cr”)), data = data)
* a)* vis.gam (model_name , view= c(“t_year”, “temp_W”))
*b)* vis.gam (model_name , view= c(“t_year”, “temp_sept”))
I imagine that what we see in a) is the effect on t_year by temp_W but this
effect is also affected by temp-sept right? In other words, is what we see
the effect of temp_W on t_year considering the other element of the model
which is temp-sept?
- About AIC model selection, my question is more focus on whether it is
necessary to use the same the same type of smoother ( e.g te) and the same
dimension of the basis (k) for different model comparison...that is, if I
have a complex model in my list of models that I want to compare like:
gam ( bm ~ t + te (t_year, temp_W, temp_sept, k = 5, bs = c(
“cc”,”cr”,”cr”)), data = data)
should I always use as type smoother te () instead of using s ( ) and always
fix the k as k = 5?? Here the maximum k I can put is k = 5.
for example, let's say I have another simpler model in my list of models I
want to compare in which I want to check the relationship between bm and t.
Can I write it like /gam (bm ~ s(t, k = 13, bs = “cr”), data = data) /? Or I
have to write like/ gam (bm ~ te (t, k = 5, bs = “cr”), data = data)/ to do
the comparison in the same conditions for all the models?
Thank you very much for your response Simon,
Best regards,
Ricardo
--
View this message in context: http://r.789695.n4.nabble.com/te-interactions-and-AIC-model-selection-with-GAM-tp4638368p4638922.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list