[Biomod-commits] Can I use categorical variables in BIOMOD? (Wilfried Thuiller)

Andreas Soteriades andreassot10 at yahoo.com
Tue Feb 21 13:41:21 CET 2012

Hi Wilfried and thanks for your email.

>BIOMOD take categorical variables. Some technique do not (e.g. MARS) but they will be atomically excluded from the runs).
>Just make sure your variable is seen as categorical:

>MyData = as.factor(MyData)

Unfortunately, I'm still facing some trouble with this categorical variable:

1) I tried to plot the variables on the map by using:

multiple.plot(Expl.Var, LatLong[,1:2], cex=0.7)

and got this warning:

Error in Summary.factor(c(10L, 10L, 10L, 10L, 10L, 10L, 8L, 10L, 10L,  :
  min not meaningful for factors

2) Please take a look as well at the warning below the following commands:

model <- glm(Sp1 ~ cld6190_ann + dtr6190_ann + ecoreg + frs6190_ann + h_dem + pre6190_ann + pre6190_l10 + pre6190_l1 + pre6190_l4 + pre6190_l7 + tmn6190_ann + tmp6190_ann + tmx6190_ann + vap6190_ann, data = z)

Pred <- predict(model, Expl.Var, type="response")

Error: variable 'ecoreg' was fitted with type "numeric" but type "factor" was supplied



Le 21 f?vr. 2012 ? 11:08, Andreas Soteriades a ?crit :

> Hi again,
> I would like to play a little bit with BIOMOD by using the sample dataset for Bradypus Variegatus which is given in the MaxEnt tutorial. The data consist of : i) a dataset with the species' localities plus continuous bioclimatic variables, ii) a dataset of background points. Nevertheless, one of the variables is categorical and it describes potential vegetation classes. Its values are distinct, ranging from 1 to 14.
> Could you please let me know if- and how- I can use the above mentioned categorical variable in BIOMOD?
> Cheers,
> Andreas
> _______________________________________________
> 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
Personal website: http://www.will.chez-alice.fr
Team website: http://www-leca.ujf-grenoble.fr/equipes/emabio.htm

ERC Starting Grant TEEMBIO project: http://www.will.chez-alice.fr/Research.html
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/20120221/f11aab4c/attachment.html>

More information about the Biomod-commits mailing list