2
$\begingroup$

I am conducting a GLMM for my bachelors thesis and I am wondering, how I can calculate and whether it is common to report confidence intervals for the models' estimates.

This is the model I fitted on my data:

glmer(response_time ~ 1 + hunger_rating + basketSize + hunger_rating:basketSize + (1|prolific_id), data = GLMM_data, family="inverse.gaussian"(link='identity'), control = glmerControl(optimizer="bobyqa",optCtrl=list(maxfun=2e9),calc.derivs = FALSE))
$\endgroup$
2
  • $\begingroup$ In my opinion, if you report the model's estimates, it is best to also report confidence intervals, it gives the reader an idea of whether the estimate is significant or not. $\endgroup$
    – Pohoua
    Commented May 17 at 9:00
  • $\begingroup$ thanks! Do you have some tips/recommendations how to calculate them? All the functions I've tried didn't work. $\endgroup$
    – Johanne
    Commented May 17 at 9:06

1 Answer 1

2
$\begingroup$

I would absolutely add confidence intervals if possible. It provides an estimate of what the plausible range of values should be given the estimated model and would go beyond the single point estimates given by the regression. Thankfully, calculating them is quite easy in lme4. You just have to run confint() on your model and it will automatically produce them. Having said that, you may consider the types of CIs for your model, as lme4 uses profile, Wald, and bootstrapped versions. I would recommend the bootstrap personally, for reasons discussed here.

As an example, assuming your model is fit right:

#### Fit Model ####
fit <- glmer(response_time ~ 1 + hunger_rating + basketSize + hunger_rating:basketSize + (1|prolific_id), data = GLMM_data, family="inverse.gaussian"(link='identity'), control = glmerControl(optimizer="bobyqa",optCtrl=list(maxfun=2e9),calc.derivs = FALSE))

#### Calculate Wald CIs (Fastest Version) ####
ci.wald <- confint(fit)
ci.wald

#### Calculate Bootstrapped CIs ####
ci.boot <- confint(fit, method = "boot", nsim = 1000)
ci.boot
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.