From 2685b7fd48cfcb97139591ff5771cc33d7beba1f Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Thu, 12 Sep 2024 06:02:18 -0700 Subject: [PATCH] Doc improvements (#76) * note about sigmas being relative * version bump * add note to update! * docs compat --- Project.toml | 2 +- docs/Project.toml | 8 +++----- src/utilities.jl | 10 ++++++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index fbcab26..fdee096 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MixedModelsSim" uuid = "d5ae56c5-23ca-4a1f-b505-9fc4796fc1fe" authors = ["Phillip Alday", "Douglas Bates", "Lisa DeBruine", "Reinhold Kliegl"] -version = "0.2.10" +version = "0.2.11" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/docs/Project.toml b/docs/Project.toml index dfaa096..e4f9ea1 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,6 +1,5 @@ [deps] CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" -CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" DataFrameMacros = "75880514-38bc-4a95-a458-c2aea5a3a702" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" DisplayAs = "0b91fe84-8a4c-11e9-3e1d-67c38462b6d6" @@ -16,9 +15,8 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" [compat] -CairoMakie = "0.10" -CategoricalArrays = "0.10" -DataFrames = "1" +CairoMakie = "0.12" DataFrameMacros = "0.1" -Documenter = "1" +DataFrames = "1" +Documenter = "1.3" StableRNGs = "1" diff --git a/src/utilities.jl b/src/utilities.jl index 77bd5e5..4a8f4eb 100644 --- a/src/utilities.jl +++ b/src/utilities.jl @@ -215,6 +215,11 @@ Update the mixed model to use the random-effects covariance matrices. The `namedre` can be created using [`create_re`](@ref). The `namedre` are specified by the name of the blocking variable, e.g. `subj=create_re(...)`. +!!! warning + The model's response must be initialized to a non-constant value before + calling this function, otherwise the model update will fail with a + `PosDefException`. + !!! warning Setting θ directly as a keyword-argument is deprecated. @@ -273,6 +278,11 @@ Create the covariance factor for a random effect from the standard deviations an The `sigmas` should be specified in the same order as the random slopes in the output of `VarCorr(m)`. +!!! note + The `sigmas` are specified **relative** to the residual standard deviation. + Absolute values must be scaled by dividing by the assumed residual + standard deviation. + The correlation matrix defaults to the identity matrix, i.e. no correlation between random effects.