[R] Error message in dredge function (MuMIn package) with binary GLM
Cat Cowie
cat.e.cowie at gmail.com
Mon Apr 1 07:14:30 CEST 2013
Hi all,
My replies within the forum aren't getting approved, though my emails
always go through, so here is my reply to a question I previously
posted (all questions and answers shown). Thanks, Cat
I'm having trouble with the model generating 'dredge' function in the MuMIn
'Multi-model Inference' package.
Here's the script:
globalmodel<- glm(TB~lat+protocol+tested+
streams+goats+hay+cattle+deer,
family="binomial")
chat<- deviance(globalmodel)/59 #There we 59 residual degrees of freedom in
this global model.
models<- dredge(globalmodel, beta=FALSE, evaluate=TRUE, rank="AICc",
chat=chat, fixed=NULL, trace=FALSE)
And the error message is:
Error in UseMethod("logLik") :
no applicable method for 'logLik' applied to an object of class "logical"
I have trawled the literature and it seems to be ok to use a binary GLM as
the global model - could this be the problem? The variables are a mix of
binary and continuous data.
Any thoughts?
Thanks,
Cat
______________________________________________
[hidden email] mailing list
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.
Kamil Barton
Reply | Threaded | More
Mar 30, 2013; 9:48am
Re: Error message in dredge function (MuMIn package) used with binary GLM
2 posts
'rank' should be "QAICc".
AICc does not have argument 'chat', hence the error.
kamil
CatCowie
Reply | Threaded | More
Mar 30, 2013; 10:35am
Re: Error message in dredge function (MuMIn package) used with binary GLM
Hi Kamil,
Thanks for your help. I do want to use rank="QAICc", but I when I try
it I get the following error message:
Error in get(as.character(FUN), mode = "function", envir = envir) :
object 'QAICc' of mode 'function' was not found
Do I need to install another package that would recognise this?
When I leave the script with rank="AICc" (to see if it will run), and
having removed "chat" (which I put in after previously recieving an
error message about it being missing from the formula), I still get my
original error message:
Error in UseMethod("logLik") :
no applicable method for 'logLik' applied to an object of class "logical"
Any further thoughts?
Thanks, Cat
More information about the R-help
mailing list