From c9c5fe268f4bd86508ecc0d165d7fcd117c7cf2c Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Mon, 9 Dec 2024 14:44:17 -0600 Subject: [PATCH] scope is hard --- src/profile/profile.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/profile/profile.jl b/src/profile/profile.jl index 608a71b86..0069936f0 100644 --- a/src/profile/profile.jl +++ b/src/profile/profile.jl @@ -35,7 +35,7 @@ value of ζ exceeds `threshold`. function profile(m::LinearMixedModel; threshold=4) isfitted(m) || refit!(m) final = copy(m.optsum.final) - try + profile = try tc = TableColumns(m) val = profileσ(m, tc; threshold) # FIXME: defer creating the splines until the whole table is constructed objective!(m, final) # restore the parameter estimates @@ -48,6 +48,7 @@ function profile(m::LinearMixedModel; threshold=4) profileθj!(val, s, tc; threshold) end profileσs!(val, tc) + MixedModelProfile(m, Table(val.tbl), val.fwd, val.rev) catch ex @error "Exception occurred in profiling; aborting..." rethrow(ex) @@ -57,7 +58,7 @@ function profile(m::LinearMixedModel; threshold=4) m.optsum.fmin = objective(m) m.optsum.sigma = nothing end - return MixedModelProfile(m, Table(val.tbl), val.fwd, val.rev) + return profile end """