1

I keep getting this error when I run the dredge function in R: "Error in MuMIn::dredge(global.model = ols) : result is empty", and I'm not sure What is wrong. Here is my coding:R coding

FYI I didn't include all of the formula (it got cut off in the image).

library(MuMIn)
library(spatialreg)
library(spdep)
data = RHDVdatasetMarch
names(data)
?MuMIn::dredge
#first "global" model
ols = stats::lm(formula = DV3composite~classify3+classify8+house2+house5+travel+Male+prefernot+age+school+compositeconcern40+compositeimpact128+totalknowledgescore+compositerisk41+compositeprevent44+compositegov113+composite42factor1+composite42factor2, data = RHDVdatasetMarch)
summary(ols)
##dredge to confirm variable and best model
options(na.action = "na.fail")
MuMIn::dredge(global.model = ols)
Nicki
  • 11
  • 2
  • Welcome to Stack Overflow! In order for us to be able to answer your question, could you please (1) edit your question to include your code in **text format** (e.g. cut the text from your session and paste it into the SO edit box; it is best in code format, but others can help you do that); (2) give us a [mcve]? https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Ben Bolker Mar 15 '22 at 22:10
  • https://stackoverflow.com/questions/56246123/how-to-fix-error-in-mumin-package-dredge-function – Ben Bolker Mar 15 '22 at 22:11
  • Could you provide some parts of `RHDVdatasetMarch` ? – Abdur Rohman Mar 16 '22 at 13:26
  • Dataset is confidential and to big to share I just need to know why I keep getting this error – Nicki Mar 16 '22 at 15:27

0 Answers0