Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

confint(::MixedModelProfile) swaps lower and upper when profiled model is fitted with REML #784

Closed
yjunechoe opened this issue Sep 23, 2024 · 1 comment · Fixed by #785
Closed

Comments

@yjunechoe
Copy link

All works fine for models fitted with ML:

m = fit(MixedModel, @formula(reaction ~ 1 + days + (1|subj)), MixedModels.dataset(:sleepstudy));
confint(profile(m))
DictTable with 3 columns and 4 rows:
 par   estimate  lower    upper
 ────┬───────────────────────────
 β1  │ 251.405   231.992  270.818
 β2  │ 10.4673   8.88655  12.048
 σ   │ 30.8954   27.8139  34.5911
 σ1  │ 36.0121   26.0079  52.9358

But with REML, lower and upper values are seemingly swapped for the βs:

refit!(m, REML=true);
confint(profile(m))
DictTable with 3 columns and 4 rows:
 par   estimate  lower    upper
 ────┬───────────────────────────
 β1  │ 251.405   265.901  236.909
 β2  │ 10.4673   11.6974  9.23715
 σ   │ 30.9912   27.8913  34.7109
 σ1  │ 37.1238   26.6233  55.1929
@palday
Copy link
Member

palday commented Sep 24, 2024

Thanks for including an MWE!

I'm looking into what causes this -- both REML and ML models use the same confint method, so this is a little bit surprising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants