Hi Caitie,
whatever it is you want to achieve, you seem to be doing it in a very complicated way. The code you
gave appears to be for producing a model selection table, yet you say you're trying to do model
averaging.
If you want a model selection table, why not use the one `dredge` produces (with evaluate=TRUE, you
can add R^2 via argument 'extra')?
If you actually mean model averaging, there is `model.avg` that can be used directly on `dredge`'s
output.
cheers,
k
W dniu 2016-10-04 o 12:00, r-help-requ...@r-project.org pisze:
Message: 10
Date: Mon, 3 Oct 2016 05:47:11 +0000
From: Caitie Kuempel <c.kuem...@uq.edu.au>
To: "r-help@r-project.org" <r-help@r-project.org>
Subject: [R] Error in aictab with CLM model "function not yet defined"
Message-ID: <cb84ce6b22614415a40df8aa56f99...@uq-exmbx6.soe.uq.edu.au>
Content-Type: text/plain; charset="UTF-8"
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]]
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.