On Sat, 2009-05-16 at 08:57 -0700, Joseph Retzer wrote: > I was trying to produced bagged importance estimates of attributes in earth > using the caret package with the following commands: > > fit2 <- bagEarth(loyalty ~ ., data=model1, B = 10) > bagImpGCV <- varImp(fit2,value="gcv") > > My bootstrap estimates are produced however the second command "varImp" > produces the following error: > > Error in UseMethod("varImp") : no applicable method for "varImp" > > Not sure what is going on, any advice would be appreciated,
The example in ?bagEarth works for me with caret and earth loaded > library(earth) > data(trees) > fit1 <- earth(trees[,-3], trees[,3]) > fit2 <- bagEarth(trees[,-3], trees[,3], B = 10) > varImp(fit2) Overall Girth 100.000000 Height 2.387985 > packageDescription("earth")$Version [1] "2.3-2" > packageDescription("caret")$Version [1] "4.15" Have you loaded the relevant packages and are they up-to-date? Can you run the example above? If the example works, then you'll probably need to supply data and code that fails for you or contact the package maintainer for expert help. HTH G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.