Forum: help


RE: ordered factors [ Reply ] By: Evick Mestre on 2022-03-10 22:32 | [forum:49367]![]() |
Hi Maya, I tried with the new version. This solved the problem for GLM, GBM, GAM, ANN and MARS models, but I still get the same error message with the RF model. Here is my code and the output of Biomod2 functions as an attachment. Thank you |
RE: ordered factors [ Reply ] By: Maya Guéguen on 2022-03-08 14:50 | [forum:49362] |
Hello Evick, I released a new version of biomod2 (4.0), available on github. You can install it with the following commands : library(devtools) install_github("biomodhub/biomod2") and check the new documentation here : https://biomodhub.github.io/biomod2/index.html Help messages should also be reported onto the github in order to gather everything in the same place :) https://github.com/biomodhub/biomod2/issues Could you try with this new biomod2 version ? You might have to adapt a bit your code (function and parameter names...) but I will be more able to help you then. Maya |
ordered factors [ Reply ] By: Evick Mestre on 2022-03-03 05:03 | [forum:49359] |
Hi, is it possible to use ordered factors for exploratory variables in BioMod2 ? When i use "as.factor()" to convert a variable into a factorial one followed by factor(x, levels=c(...)) , there is no problem. But when I try order the levels using "factor(x, ordered = TRUE, levels=c(....))" or "as.ordered(X)", I get the following error message when I run "BIOMOD_Modeling()" -=-=-=--=-=-=- P.A.ERS_AllData_RUN1 Model=GLM ( quadratic with no interaction ) Stepwise procedure using AIC criteria selected formula : P.A.ERS ~ DEP_SUR_SYNTH + VERSANT + TEXTB_SYNTH + EXPOSITION + DRAI_SYNTH <environment: 0x000000003671a5f0> Error in validObject(.Object) : invalid class “GLM_biomod2_model” object: invalid object for slot "expl_var_type" in class "GLM_biomod2_model": got class "list", should be or extend class "character" Is there a way to order factors compatible with "BIOMOD_Modeling()" ? Thank you, Evick |