Caitie Kuempel
2016-Oct-03 05:47 UTC
[R] Error in aictab with CLM model "function not yet defined"
Hi R help,
I am trying to do some AIC model averaging on a CLM model in R and keep getting
the error:
Error in aictab.default(cand.set = Cand.model0, modnames = Modnames0, :
Function not yet defined for this object class
The MuMIn package says that the functions should work for clm and clmm models so
I'm not sure if I'm missing something or if there is an extra step? Any
help or examples would be appreciated.
My model (m1) works fine- which I fit using the clm() function from the package
ordinal. Then I run the following:
dred<-dredge(m1,rank="AICc",trace=TRUE,evaluate=FALSE)
Cand.model0<-list()
r2val<-rep(0,length(dred)) # r-square values
for(i in 1:length(dred))
{
print(length(dred)-i)
Cand.model0[[i]]<-clm(as.character(dred[[i]])[2],data=datt2,REML=FALSE)
#r2val[i]<-summary(Cand.model0[[i]])$r.squared
}
Modnames0 <- paste("mod", 1:length(Cand.model0), sep = "
")
t0<-aictab(cand.set=Cand.model0, modnames=Modnames0, sort = TRUE, second.ord
= TRUE,nobs = NULL)
Error in aictab.default(cand.set = Cand.model0, modnames = Modnames0, :
Function not yet defined for this object class
Thanks for your time.
Best,
Caitie
[[alternative HTML version deleted]]