From ad5586f45b8647903fa26aa8fa2358f6009caa13 Mon Sep 17 00:00:00 2001 From: MichelJuillard Date: Sun, 23 Jun 2024 18:31:53 +0200 Subject: [PATCH] Observations must be kept constant: new matrix, not alias --- src/estimation/estimation.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/estimation/estimation.jl b/src/estimation/estimation.jl index a54b1ec..58762b2 100644 --- a/src/estimation/estimation.jl +++ b/src/estimation/estimation.jl @@ -390,7 +390,7 @@ struct SSWs{D<:AbstractFloat,I<:Integer} ns = length(state_ids) ny = length(varobs) nobs = size(observations, 2) - Y = observations + Y = similar(observations) Z = zeros(D, (ny, ns)) H = zeros(D, (ny, ny)) T = zeros(D, (ns, ns)) @@ -630,7 +630,6 @@ function loglikelihood( context.work.observed_variables, dim = 1 ) - ssws.Y ns = length(ssws.state_ids) np = model.exogenous_nbr ny, nobs = size(ssws.Y)