From 1a740cf5600fa2e31958d50003becc0ee1cd3213 Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Wed, 17 Feb 2021 21:06:06 +0100 Subject: [PATCH 1/3] remove (unused) `named` kwarg from ranef (#469) (cherry picked from commit e14078a8ccf6c01618a3b61607e7448b10fc6332) --- src/linearmixedmodel.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/linearmixedmodel.jl b/src/linearmixedmodel.jl index 9d9f44a8c..ebcf0b097 100644 --- a/src/linearmixedmodel.jl +++ b/src/linearmixedmodel.jl @@ -689,14 +689,16 @@ end ranef!(v::Vector, m::LinearMixedModel, uscale::Bool) = ranef!(v, m, fixef(m), uscale) """ - ranef(m::LinearMixedModel; uscale=false, named=false) + ranef(m::LinearMixedModel; uscale=false) Return, as a `Vector{Matrix{T}}`, the conditional modes of the random effects in model `m`. If `uscale` is `true` the random effects are on the spherical (i.e. `u`) scale, otherwise on the original scale. + +For a named variant, see [`@raneftables`](@ref). """ -function ranef(m::LinearMixedModel{T}; uscale = false, named = false) where {T} +function ranef(m::LinearMixedModel{T}; uscale = false) where {T} reterms = m.reterms v = [Matrix{T}(undef, size(t.z, 1), nlevs(t)) for t in reterms] ranef!(v, m, uscale) From 3ed0719ebcf6a19c2e6b237531a8c30bb7659725 Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Mon, 12 Apr 2021 14:00:03 +0200 Subject: [PATCH 2/3] deprecate unused `named` kwarg --- src/linearmixedmodel.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/linearmixedmodel.jl b/src/linearmixedmodel.jl index ebcf0b097..64e5eeca3 100644 --- a/src/linearmixedmodel.jl +++ b/src/linearmixedmodel.jl @@ -689,7 +689,7 @@ end ranef!(v::Vector, m::LinearMixedModel, uscale::Bool) = ranef!(v, m, fixef(m), uscale) """ - ranef(m::LinearMixedModel; uscale=false) + ranef(m::MixedModel; uscale=false) Return, as a `Vector{Matrix{T}}`, the conditional modes of the random effects in model `m`. @@ -698,7 +698,10 @@ the original scale. For a named variant, see [`@raneftables`](@ref). """ -function ranef(m::LinearMixedModel{T}; uscale = false) where {T} +function ranef(m::LinearMixedModel{T}; uscale = false, named=nothing) where {T} + if named !== nothing + Base.depwarn("the `named` keyword argument is deprecated; it has no effect. Use `raneftables` instead.", :ranef) + end reterms = m.reterms v = [Matrix{T}(undef, size(t.z, 1), nlevs(t)) for t in reterms] ranef!(v, m, uscale) From 88e2e3ecc0ba8462c3a549fcc9b7f2bd9cf0da4e Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Mon, 12 Apr 2021 14:03:27 +0200 Subject: [PATCH 3/3] news + patch bump --- NEWS.md | 4 ++++ Project.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index cf61c84d7..ad7cc6422 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +MixedModels v3.5.2 Release Notes +======================== +* Explicitly deprecate non-functional `named` kwarg in `ranef` in favor of `raneftables` [#507]. + MixedModels v3.5.1 Release Notes ======================== * Fix MIME show methods for models with random-effects not corresponding to a fixed effect [#501]. diff --git a/Project.toml b/Project.toml index 504f7f304..6c2fdb4ec 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MixedModels" uuid = "ff71e718-51f3-5ec2-a782-8ffcbfa3c316" author = ["Phillip Alday ", "Douglas Bates ", "Jose Bayoan Santiago Calderon "] -version = "3.5.1" +version = "3.5.2" [deps] Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"