Question: How to run ANOVA functions for a random forest model in R?
0
gravatar for pierre.jorcin
19 months ago by
pierre.jorcin0 wrote:

need to do an ANOVA on a random forest model. Calling the same code I use for glm and gam models doesn't with my rf model. What code shall I use to make it work?

I am using the sdm package from R to build my rf model. The rf model runs ok, however, I can't use the ANOVA function on the results.

MRF <- sdm(presence~.,data=dM,methods='rf',replication='sub',test.percent=20)

anova(MRF)

Error in UseMethod("anova") : no applicable method for 'anova' applied to an object of class "sdmModels

I have also tried this option :

m <-MRF@models$presence$rf$1@object

anova(m)

Error in UseMethod("anova") : no applicable method for 'anova' applied to an object of class "c('randomForest.formula', 'randomForest')"
anova random forest R • 1.1k views
ADD COMMENTlink written 19 months ago by pierre.jorcin0

Crossposted. Do not crosspost or at the very least link the posts.

ADD REPLYlink written 19 months ago by Jean-Karim Heriche23k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1228 users visited in the last hour