Re: [R] GAM model with interactions between continuous variables and factors

2013-03-25 Thread Antonio P. Ramos
Thanks! On Mon, Mar 25, 2013 at 6:25 PM, Joshua Wiley wrote: > Yep that's exactly right! :) > > On Mon, Mar 25, 2013 at 6:22 PM, Antonio P. Ramos > wrote: > > Just to clarify: I should include wealth - the categorical variable - as > a > > fixed effects *and* within the smooth using the argumen

Re: [R] GAM model with interactions between continuous variables and factors

2013-03-25 Thread Joshua Wiley
Yep that's exactly right! :) On Mon, Mar 25, 2013 at 6:22 PM, Antonio P. Ramos wrote: > Just to clarify: I should include wealth - the categorical variable - as a > fixed effects *and* within the smooth using the argument "by". It that > correct? thanks a bunch > > > On Mon, Mar 25, 2013 at 6:18

Re: [R] GAM model with interactions between continuous variables and factors

2013-03-25 Thread Antonio P. Ramos
Just to clarify: I should include wealth - the categorical variable - as a fixed effects *and* within the smooth using the argument "by". It that correct? thanks a bunch On Mon, Mar 25, 2013 at 6:18 PM, Joshua Wiley wrote: > Hi Antonio, > > If wealth is a factor variable, you should include the

Re: [R] GAM model with interactions between continuous variables and factors

2013-03-25 Thread Joshua Wiley
Hi Antonio, If wealth is a factor variable, you should include the main effect in the model, as the smooths will be centered. Cheers, Josh On Mon, Mar 25, 2013 at 6:09 PM, Antonio P. Ramos wrote: > Hi all, > > I am not sure how to handle interactions with categorical predictors in the > GAM

Re: [R] GAM model with interactions between continuous variables and factors

2013-03-25 Thread Antonio P. Ramos
Just to clarify: gam.1 has wealth inside the smooths and as a fixed effect predictor while gam.2 only have wealth inside the smooths. Thanks On Mon, Mar 25, 2013 at 6:09 PM, Antonio P. Ramos < ramos.grad.stud...@gmail.com> wrote: > Hi all, > > I am not sure how to handle interactions with catego

[R] GAM model with interactions between continuous variables and factors

2013-03-25 Thread Antonio P. Ramos
Hi all, I am not sure how to handle interactions with categorical predictors in the GAM models. For example what is the different between these bellow two models. Tests are indicating that they are different but their predictions are essentially the same. Thanks a bunch, > gam.1 <- gam(mortality