From dcc441eaec72fc8b258ce99fa6c2bc63c3833c67 Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Tue, 10 Dec 2024 09:47:17 -0600 Subject: [PATCH] BlueStyle Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/generalizedlinearmixedmodel.jl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/generalizedlinearmixedmodel.jl b/src/generalizedlinearmixedmodel.jl index ce5373c0a..d6b998b36 100644 --- a/src/generalizedlinearmixedmodel.jl +++ b/src/generalizedlinearmixedmodel.jl @@ -364,7 +364,7 @@ function GeneralizedLinearMixedModel( kwargs..., ) return GeneralizedLinearMixedModel( - f, Tables.columntable(tbl), d, l; kwargs..., + f, Tables.columntable(tbl), d, l; kwargs... ) end @@ -467,15 +467,15 @@ function GeneralizedLinearMixedModel( # if the response is constant, there's no point (and this may even fail) constresponse || try - deviance!(res, 1) - catch ex - ex isa PosDefException || rethrow() - @warn "Evaluation at default initial parameter vector failed, " * - "initializing to very small variances. This may result in long " * - "model fitting times. You will probably also need to use " * - "`init_from_lmm=[:β, :θ]` in order to fit the model." - res.optsum.initial[res.optsum.initial .!= 0] .= 1e-8 - end + deviance!(res, 1) + catch ex + ex isa PosDefException || rethrow() + @warn "Evaluation at default initial parameter vector failed, " * + "initializing to very small variances. This may result in long " * + "model fitting times. You will probably also need to use " * + "`init_from_lmm=[:β, :θ]` in order to fit the model." + res.optsum.initial[res.optsum.initial .!= 0] .= 1e-8 + end return res end