[R] Error in aictab with CLM model "function not yet defined"
Kamil Bartoń
kamil.barton at go2.pl
Tue Oct 4 13:18:13 CEST 2016
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-request w r-project.org pisze:
> Message: 10
> Date: Mon, 3 Oct 2016 05:47:11 +0000
> From: Caitie Kuempel <c.kuempel w uq.edu.au>
> To: "r-help w r-project.org" <r-help w r-project.org>
> Subject: [R] Error in aictab with CLM model "function not yet defined"
> Message-ID: <cb84ce6b22614415a40df8aa56f99a25 w 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]]
>
>
More information about the R-help
mailing list