Quit model fitting after no improvement

82 Views Asked by At

I am using glmulti to fit a logistic regression model. I have 6 predictor variables, with one predictor variable having 84 levels. Consequently, it is taking an exceptionally long time to fit the model. I thought I structured the code to stop running after no improvement in the best model using the conseq argument, but even after 2,000 models with no improvement, it just keeps going. How can I get the model fitting to stop after no improvement? This is the code I am currently using:

detectmodelsexbirdpw<- glmulti::glmulti
(outcome ~ sex + bird + year + month + obsname + season, 
data=detect, 
level=2, 
fitfunction=glm, 
crit="aicc", 
family=binomial, 
confsetsize=10, 
conseq = 10, 
deltaM = 0.05, 
deltaB = 0.05, 
plotty = F)

I also tried setting the method to "g", but that code gets stuck on initialization and doesn't produce anything, even after letting it run through the night.

0

There are 0 best solutions below