Skip to content

Commit

Permalink
delegate as many GLMM properties as possible to internal LMM (#767)
Browse files Browse the repository at this point in the history
* delegate as many GLMM properties as possible to internal LMM

* NEWS and version bump
  • Loading branch information
palday authored May 15, 2024
1 parent c4beee9 commit 84a61c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
MixedModels v4.24.0 Release Notes
==============================
* Properties for `GeneralizedLinearMixedModel` now default to delegation to the internal weighted `LinearMixedModel` when that property is not explicitly handled by `GeneralizedLinearMixedModel`. Previously, properties were delegated on an explicit basis, which meant that they had to be added manually as use cases were discovered. The downside to the new approach is that it is now possible to access properties whose definition in the LMM case doesn't match the GLMM definition when the GLMM definition hasn't been explicitly been implemented. [#767]

MixedModels v4.23.1 Release Notes
==============================
* Fix for `simulate!` when only the estimable coefficients for a rank-deficient model are provided. [#756]
Expand Down Expand Up @@ -516,3 +520,4 @@ Package dependencies
[#748]: https://github.com/JuliaStats/MixedModels.jl/issues/748
[#755]: https://github.com/JuliaStats/MixedModels.jl/issues/755
[#756]: https://github.com/JuliaStats/MixedModels.jl/issues/756
[#767]: https://github.com/JuliaStats/MixedModels.jl/issues/767
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MixedModels"
uuid = "ff71e718-51f3-5ec2-a782-8ffcbfa3c316"
author = ["Phillip Alday <[email protected]>", "Douglas Bates <[email protected]>", "Jose Bayoan Santiago Calderon <[email protected]>"]
version = "4.23.1"
version = "4.24.0"

[deps]
Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"
Expand Down
8 changes: 4 additions & 4 deletions src/generalizedlinearmixedmodel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,12 @@ function Base.getproperty(m::GeneralizedLinearMixedModel, s::Symbol)
σs(m)
elseif s == :σρs
σρs(m)
elseif s (:A, :L, :optsum, :reterms, :Xymat, :feterm, :formula, :parmap)
getfield(m.LMM, s)
elseif s (:dims, , :lowerbd, :corr, :PCA, :rePCA, :X)
getproperty(m.LMM, s)
elseif s == :y
m.resp.y
elseif !hasfield(GeneralizedLinearMixedModel, s) && s propertynames(m.LMM, true)
# automatically delegate as much as possible to the internal local linear approximation
# NB: the !hasfield call has to be first since we're calling getproperty() with m.LMM...
getproperty(m.LMM, s)
else
getfield(m, s)
end
Expand Down

2 comments on commit 84a61c2

@palday
Copy link
Member Author

@palday palday commented on 84a61c2 May 15, 2024

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/106897

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v4.24.0 -m "<description of version>" 84a61c28f470e16910b70ad0485c874dcc01b572
git push origin v4.24.0

Please sign in to comment.