[Biomod-commits] Factors as predictive variables

Wilfried Thuiller wilfried.thuiller at ujf-grenoble.fr
Mon Jun 7 18:01:20 CEST 2010


Dear Peter,
This is supposed to work indeed. I need to have a look. It seems the GAM function does not work with the categorical variables whereas I thought I had previously removed that problem. 

A sexy alternative is to transform your categorical variable in n-1 binary variables. This is actually what the models do but hidden. 
In your case, you just need one variable GRASS coded in 0 when there is forest and 1 when there is grassland. 
Use this binary variable as continuous into the models. 

HIH
Wilfried


Le 31 mai 2010 à 13:08, <Horchler at bafg.de> <Horchler at bafg.de> a écrit :

> Hello,
> 
> I am wondering if I can use factorial vairables in BIOMOD?
> I want to include type of land-use codes as "grassland" or "forest" in
> my analysis but get an error message:
> 
> ----------------------------------- 
> Modelling summary 
> ----------------------------------- 
> Number of species modelled :            6
> Alopprat, Urtidioi, Glycmaxi, Rubucaes, Crxacuta, Rorisylv
> 
> numerical variables :                   UFD.n, vmhq, Hum, S
> factorial variables :                   Nutzung
> 
> number of evaluation repetitions :      0
> number of pseudo-absences runs :        0
> models selected :                       GAM, GBM, GLM, RF
> total number of model runs :            24
> ----------------------------------- 
> 
> 
> #####                    Alopprat                       #####
> Model=GAM spline 
>         3  Degrees of smoothing 
> Fehler in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 3L, 3L, 1L, 1L, 1L, 3L,
> : 
>  sum not meaningful for factors
> 
> 
> 
> What can I do about this?
> 
> Thnaks in advance!
> Peter
> _______________________________________________
> Biomod-commits mailing list
> Biomod-commits at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/biomod-commits

--------------------------
Dr. Wilfried Thuiller
Laboratoire d'Ecologie Alpine, UMR CNRS 5553
Université Joseph Fourier
BP53, 38041 Grenoble cedex 9, France
tel: +33 (0)4 76 51 44 97
fax: +33 (0)4 76 51 42 79

Email: wilfried.thuiller at ujf-grenoble.fr
Home page: http://www.will.chez-alice.fr
Website: http://www-leca.ujf-grenoble.fr/equipes/tde.htm

FP6 European MACIS project: http://www.macis-project.net
FP6 European EcoChange project: http://www.ecochange-project.eu





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/biomod-commits/attachments/20100607/43f66cec/attachment.htm>


More information about the Biomod-commits mailing list