Skip to content

correct coeftable for GLMMs, add tests - #308

Merged
palday merged 3 commits into
masterfrom
glmmcoeftable
May 2, 2020
Merged

correct coeftable for GLMMs, add tests#308
palday merged 3 commits into
masterfrom
glmmcoeftable

Conversation

@dmbates

@dmbates dmbates commented Apr 25, 2020

Copy link
Copy Markdown
Collaborator

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

codecov Bot commented Apr 25, 2020

Copy link
Copy Markdown

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

dmbates commented Apr 25, 2020

Copy link
Copy Markdown
Collaborator Author

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.

@palday palday left a comment

Copy link
Copy Markdown
Member

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.

Comment thread src/generalizedlinearmixedmodel.jl
Comment thread src/generalizedlinearmixedmodel.jl Outdated
Comment thread src/generalizedlinearmixedmodel.jl
Comment thread src/generalizedlinearmixedmodel.jl
@dmbates

dmbates commented May 1, 2020

Copy link
Copy Markdown
Collaborator Author

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

@palday

palday commented May 2, 2020

Copy link
Copy Markdown
Member

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

palday commented May 2, 2020

Copy link
Copy Markdown
Member

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

palday commented May 2, 2020

Copy link
Copy Markdown
Member

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 <dmbates@gmail.com>
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