i am trying to run stepwise regression for two models(lower,upper), family=gamma and i get the same error despite the models i use. Error in UseMethod("extractAIC") : no applicable method for 'extractAIC' applied to an object of class "formula" In addition: Warning message: In nobs.default(object, use.fallback = TRUE) : no 'nobs' method is available Any help? Thanks -- View this message in context: http://r.789695.n4.nabble.com/stepAIC-error-tp4407460p4407460.html Sent from the R help mailing list archive at Nabble.com.
labbig <lkaimaka <at> windowslive.com> writes:> > i am trying to run stepwise regression for two models(lower,upper), > family=gamma > and i get the same error despite the models i use. > > Error in UseMethod("extractAIC") : > no applicable method for 'extractAIC' applied to an object of class > "formula" > In addition: Warning message: > In nobs.default(object, use.fallback = TRUE) : > no 'nobs' method is available >A reproducible example would definitely help. The "no 'nobs' method is available" warning is a clue that you may be using an older version of R (I believe 'nobs' was introduced in version 2.13). If you possibly can, update to the latest version of R and post a reproducible example. Ben Bolker
Apparently Analagous Threads
- stepAIC() that can use new extractAIC() function implementing AICc
- stepAICc function (based on MASS:::stepAIC.default)
- Why predicted values are fewer that the real?
- glm StepAIC with all interactions and update to remove a term vs. glm specifying all but a few terms and stepAIC
- Problems with stepAIC