Re: [R] te( ) interactions and AIC model selection with GAM

2012-08-02 Thread Ricardogg
- About the first question, I was not sure about what was the proper model ( a) or b) ) because I saw this at the end of the help for te ---> ?te : n <- 500 v <- runif(n);w<-runif(n);u<-runif(n) f <- test2(u,v,w) y <- f + rnorm(n)*0.2 # tensor product of 2D thin plate regression spline and 1D c

Re: [R] te( ) interactions and AIC model selection with GAM

2012-08-02 Thread Ricardogg
- 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

Re: [R] te( ) interactions and AIC model selection with GAM

2012-08-02 Thread Simon Wood
On 02/08/12 18:02, Bert Gunter wrote: Well, geez! Without trying to upstage SImon, why not google it yourself?! http://en.wikipedia.org/wiki/Akaike_information_criterion -- one or two slightly surprising statements in there though :-) I quite like the coverage in Davison (2003) "Statistical Mod

Re: [R] te( ) interactions and AIC model selection with GAM

2012-08-02 Thread Will Shadish
Bert, thanks for the very useful link. I am duly chastised for not having searched thoroughly enough. Will On 8/2/2012 10:02 AM, Bert Gunter wrote: Well, geez! Without trying to upstage SImon, why not google it yourself?! http://en.wikipedia.org/wiki/Akaike_information_criterion (seemed pret

Re: [R] te( ) interactions and AIC model selection with GAM

2012-08-02 Thread Bert Gunter
Well, geez! Without trying to upstage SImon, why not google it yourself?! http://en.wikipedia.org/wiki/Akaike_information_criterion (seemed pretty clear to me...) -- Bert On Thu, Aug 2, 2012 at 9:54 AM, Will Shadish wrote: > Simon, could you clarify this paragraph. We are submitting to a psych

Re: [R] te( ) interactions and AIC model selection with GAM

2012-08-02 Thread Will Shadish
Simon, could you clarify this paragraph. We are submitting to a psychology journal and I am certain they will be asking us about why it is still ok to use AIC for non-nested models. Thanks. Will Shadish On 8/2/2012 9:49 AM, Simon Wood wrote: For AIC model comparison, the usual advice applies th

Re: [R] te( ) interactions and AIC model selection with GAM

2012-08-02 Thread Simon Wood
Ricardo, Your second construction (b) is the correct one (in a you are asking for one marginal to be a 2 dimensional cubic regression spline, which doesn't exist in mgcv). For visualization, would the example at the end of ?te be the thing to do? In 3d I find looking at a series of 2d slices

[R] te( ) interactions and AIC model selection with GAM

2012-07-30 Thread Ricardogg
Hello R users, I'm working with a time-series of several years and to analyze it, I’m using GAM smoothers from the package mgcv. I’m constructing models where zooplankton biomass (bm) is the dependent variable and the continuous explanatory variables are: -time in Julian days (t), to creat a long-