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

Wilfried Thuiller wilfried.thuiller at ujf-grenoble.fr
Tue Feb 21 13:46:58 CET 2012


> 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

We have not coded the categorical representation of the variables. 

I said that the Models function and most of the models will work, not that all functions supplied within the BIOMOD package will.

> 
> 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

This is because ecoreg in the z data is listed as a numeric variable and not as a factor. 
Take a look at 

summary(z)
summary(Expl.Var)

z$ecoreg = as.factor(z$ecoreg)




> 
> 
> Cheers,
> 
> Andreas
> 
> 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
> 
> 
> 
> _______________________________________________
> 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/236fe19b/attachment-0001.html>


More information about the Biomod-commits mailing list