Re: [R] GAM with binary predictors

2023-02-21 Thread varin sacha via R-help
Dear Thierry, Dear all, Many thanks for your replies. Le jeudi 16 février 2023 à 10:39:34 UTC+1, Thierry Onkelinx a écrit : Dear Sacha, use glm() in this case. I'd rather code the covariable as TRUE / FALSE or as a factor. Best regards, ir. Thierry Onkelinx Statisticus /

Re: [R] GAM with binary predictors

2023-02-16 Thread Thierry Onkelinx via R-help
Dear Sacha, use glm() in this case. I'd rather code the covariable as TRUE / FALSE or as a factor. Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST Team

[R] GAM with binary predictors

2023-02-11 Thread varin sacha via R-help
Dear R-experts, I am trying to fit a GAM with 2 binary predictors (variables coded 0,1). I guess I cannot just smooth binary variables. By the way I code them as 0=no,1=yes, then mgcv will think those variables are numeric.  I have tried to change 0 and 1 in no and yes. It does not work. How to