Skip to content
Prev 275435 / 398506 Next

difficulties with MuMIn model generation with coxph

Hi All,

I'm having trouble with the automatized model generation (dredge) function
in the MuMIn package. I'm trying to use it to automatically generate subsets
of models from a global cox proportional hazards model, and rank them based
on AICc. These seems like it's possible, and the Mumin documentation says
that coxph is supported. However, when I run the code (see below), it gives
me the following error message:

Error in UseMethod("logLik") : 
  no applicable method for 'logLik' applied to an object of class "logical"

##RCode

#read in the data
survival<-Surv(data1$Wks.at.dth, data1$Died)

#create the full (global) model, a coxph object
pctcrsog +  ravine + canfrag + pctoldc,  data=data1)

#evaluate all subsets of models using dredge
marge.ex=TRUE, rank="AICc")

Error in UseMethod("logLik") : 
  no applicable method for 'logLik' applied to an object of class "logical"


any suggestions would be greatly appreciated. The globemodel works on its
own, and prints out a summary just fine. The only thing I can think of is
that in the names of globemodel, there is an attribute called loglik, not
logLik?

Thank you,

Sophie

--
View this message in context: http://r.789695.n4.nabble.com/difficulties-with-MuMIn-model-generation-with-coxph-tp3935078p3935078.html
Sent from the R help mailing list archive at Nabble.com.