alfajor
alfajor

Reputation: 1

How to fix error in MuMIn package, dredge() function?

I am trying to run the Dredge function of the MuMIn package and keep getting an error, saying "result is empty". I don't know why and cannot find information on the meaning of this error message.

As far as my study of this function and package, the below code "should" be correct. Basically, I have a General Linear Mixed Model being run and I want to use the dredge function to run a model selection procedure based on AICc.

options(na.action = "na.fail") # Require for dredge to run

glmm1 <- lmer(cpue_diff ~ year +  p.afraid + s.frequency.monitoring + (1 | f1.name ), data = dat, REML=FALSE)

summary(glmm1)

model_dredge <- dredge(glmm1, beta = FALSE, evaluate = TRUE, rank = "AICc")

options(na.action = "na.omit") # set back to default

The error message is:

"Fixed term is "(Intercept)" Error in dredge(glmm1, beta = FALSE, evaluate = TRUE, rank = "AICc") : result is empty"

Any ideas anyone what this message means and how to correct it?

Much appreciated!

Upvotes: 0

Views: 2226

Answers (1)

Paulo Paiva
Paulo Paiva

Reputation: 11

Check the the dimensions of your data frame. I had the same error message and when I checked out my data frame, there was more than a thousand "extra rows" full of NAs. After subsetting the data frame to include only the true rows, everything worked well with the dredge function.

Upvotes: 1

Related Questions