Re: [R-sig-Geo] Predict GAM model with categorical predictors

2014-11-11 Thread Thiago Silveira
Hi Dhyey Bhatpuria, Sorry, I've posted the code with some mistakes. Consider the code below. I've one response, and two predictors, v1 (numeric) and v2 (factor). So, I have just one predictor which is possible to have a raster, the other is a categorical variable. How to predict to rasters co

Re: [R-sig-Geo] Predict GAM model with categorical predictors

2014-11-11 Thread Thiago Cesar Lima Silveira
Hi, Sorry, I've posted the code with some mistakes. Consider the code below. I've one response, and two predictors, v1 (numeric) and v2 (factor). So, I have just one predictor which is possible to have a raster, the other is a categorical variable. How to predict to rasters considering categ

Re: [R-sig-Geo] Predict GAM model with categorical predictors

2014-11-11 Thread Dhyey Bhatpuria
, Research Fellow, Space Applications Centre, ISRO, Ahmedabad, India - Message: 5 Date: Mon, 10 Nov 2014 16:43:46 -0200 From: Thiago Cesar Lima Silveira To: r-sig-geo@r-project.org Subject: [R-sig-Geo] Predict GAM model with categorical predictors Message-ID: <520f8cdb-0

Re: [R-sig-Geo] Predict GAM model with categorical predictors

2014-11-10 Thread Thiago Cesar Lima Silveira
## Disregard the code sent before, this is the right Hi, I'm experiencing some problems to predict a gam model with factor as predictor to raster stack. I wrote an example code to illustrate the problem. This is the error message when I try to predict with a model with factors: 'Error in `

[R-sig-Geo] Predict GAM model with categorical predictors

2014-11-10 Thread Thiago Cesar Lima Silveira
Hi, I'm experiencing some problems to predict a gam model with factor as predictor to raster stack. I wrote an example code to illustrate the problem. This is the error message when I try to predict with a model with factors: 'Error in `[.data.frame`(blockvals, , f[j]) : undefined columns se