From c3acdf2f4bef1cc9dc733a9b2bcbe6edefa0c08a Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Wed, 15 May 2024 12:51:40 -0500 Subject: [PATCH] delegate as many GLMM properties as possible to internal LMM --- src/generalizedlinearmixedmodel.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/generalizedlinearmixedmodel.jl b/src/generalizedlinearmixedmodel.jl index e33429b81..f9f6ad5dc 100644 --- a/src/generalizedlinearmixedmodel.jl +++ b/src/generalizedlinearmixedmodel.jl @@ -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