diff --git a/src/simulate.jl b/src/simulate.jl index ce8c78ba9..08c2e4131 100644 --- a/src/simulate.jl +++ b/src/simulate.jl @@ -158,8 +158,8 @@ function simulate!( isempty(θ) || setθ!(m, θ) if length(β) ≠ length(m.feterm.piv) - β = invpermute!(copyto!(fill(-0.0, length(m.feterm.piv)), β), - m.feterm.piv) + β = invpermute!(copyto!(fill(-0.0, length(m.feterm.piv)), β), + m.feterm.piv) end # initialize y to standard normal @@ -248,10 +248,9 @@ function _simulate!( d = m.resp.d if length(β) ≠ length(m.feterm.piv) - β = invpermute!(copyto!(fill(-0.0, length(m.feterm.piv)), β), - m.feterm.piv) + β = invpermute!(copyto!(fill(-0.0, length(m.feterm.piv)), β), + m.feterm.piv) end - fast = (length(m.θ) == length(m.optsum.final)) setpar! = fast ? setθ! : setβθ! params = fast ? θ : vcat(β, θ)