[R] GAM function with interaction

2009-06-22 Thread Paul Simonin
Hello R Users, I have a question regarding fitting a model with GAM{mgcv}. I have data from several predictor (X) variables I wish to use to develop a model to predict one Y variable. I am working with ecological data, so have data collected many times (about 20) over the course of two years. P

Re: [R] GAM function with interaction

2009-06-17 Thread Simon Wood
Paul, I think I would try something like yoyoras~te(temp,date) ... to incorportate a continuous interaction of temp and date. Otherwise with the models you are using, if `datecode' is a factor you'll get a smooth for every date, which may be over-flexible, and if datecode is numeric you'll ge

[R] GAM function with interaction

2009-06-17 Thread Paul Simonin
Hello R Users, I have a question regarding fitting a model with GAM{mgcv}. I have data from several predictor (X) variables I wish to use to develop a model to predict one Y variable. I am working with ecological data, so have data collected many times (about 20) over the course of two years.