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

correct coeftable for GLMMs, add tests #308

Merged
merged 3 commits into from
May 2, 2020
Merged

correct coeftable for GLMMs, add tests #308

merged 3 commits into from
May 2, 2020

Conversation

dmbates
Copy link
Collaborator

@dmbates dmbates commented Apr 25, 2020

See #307

Note that the example for this PR ("goldstein") still has the peculiar property that the deviances change between the Laplace approximation and nAGQ=11 but the parameter estimates are exactly the same. Now the multipliers, m11.mult are all close to 1.0 but not that close.

I don't think this is right still

@dmbates dmbates requested a review from palday April 25, 2020 02:01
@codecov
Copy link

codecov bot commented Apr 25, 2020

Codecov Report

Merging #308 into master will increase coverage by 0.27%.
The diff coverage is 92.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #308      +/-   ##
==========================================
+ Coverage   95.69%   95.97%   +0.27%     
==========================================
  Files          20       21       +1     
  Lines        1510     1515       +5     
==========================================
+ Hits         1445     1454       +9     
+ Misses         65       61       -4     
Impacted Files Coverage Δ
src/MixedModels.jl 100.00% <ø> (ø)
src/generalizedlinearmixedmodel.jl 83.33% <83.33%> (+2.26%) ⬆️
src/linearmixedmodel.jl 100.00% <100.00%> (ø)
src/mixedmodel.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 872bba1...753747e. Read the comment docs.

@dmbates
Copy link
Collaborator Author

dmbates commented Apr 25, 2020

It looks as if the identical parameter estimates for the Laplace approximation and the nAGQ=11 fit for the goldstein data may be a coincidence. Fitting such models to the contra data does produce slightly different values for the parameter estimates.

Copy link
Member

@palday palday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're now missing StatsBase.vcov for GeneralizedLinearMixedModel and I'm wondering if it makes sense to gather up all the methods defined for the superclass MixedModel into one place.

src/generalizedlinearmixedmodel.jl Show resolved Hide resolved
src/generalizedlinearmixedmodel.jl Outdated Show resolved Hide resolved
src/generalizedlinearmixedmodel.jl Outdated Show resolved Hide resolved
src/generalizedlinearmixedmodel.jl Show resolved Hide resolved
@dmbates
Copy link
Collaborator Author

dmbates commented May 1, 2020

@palday Will you have the opportunity to look at the latest commit to see if it addresses the questions you had?

@palday
Copy link
Member

palday commented May 2, 2020

There are a couple of spots where the superclass methods aren't there yet (coeftable that depends on coef, which isn't defined for GLMM), but I'll add them in.

@palday
Copy link
Member

palday commented May 2, 2020

Ah, can't do it for the cherry picking after all -- the fixef methods for GLMM and LMM take different arguments (GLMM has a permuted argument, but LMM doesn't -- it instead depends on the difference between fixef and coef). So that would be a breaking change. I'll spin that re-factoring off into a different PR.

@palday palday merged commit 5fb6f65 into master May 2, 2020
@palday
Copy link
Member

palday commented May 2, 2020

Ah, so good news -- the coeftable method for GLMM is actually correct in the last release. The wrong table was introduced in #287 when the static allocation for the coefficients and errors was introduced for LMM. It still makes sense to add in the GLMM parallels for those things, then we can go back to more generic methods for things like coeftable that build upon them.

@dmbates dmbates deleted the glmmcoeftable branch May 15, 2020 17:56
@palday palday mentioned this pull request Oct 2, 2020
10 tasks
palday pushed a commit that referenced this pull request Oct 2, 2020
* correct coeftable for GLMMs, add tests

* Move methods for abstract MixedModel struct to separate file.

(cherry picked from commit 5fb6f65)
palday added a commit that referenced this pull request Oct 2, 2020
* warning for GLMM with dispersion parameter (#373)* warning for GLMM with dispersion parameter(cherry picked from commit 66b8863)

* correct coeftable for GLMMs, add tests (#308)

* Move methods for abstract MixedModel struct to separate file.

(cherry picked from commit 5fb6f65)

* chang CoefTable column names to match GLM.jl

* ranef method for GLMM (#336)

(cherry picked from commit 753aa6f)

* make (1|x) + (y|x) equivalent to (1|x) + (0+y|x) (#338)

* fix error with (1|x) + (y|x)

* fix typo

(cherry picked from commit 20c83ef)

* update ranef docstring

Co-authored-by: Douglas Bates <[email protected]>
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 this pull request may close these issues.

2 participants