diff --git a/Project.toml b/Project.toml index 71b3858..6c1b456 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "MessyTimeSeriesOptim" uuid = "7115d47b-e118-4204-bc33-dbd7ed133e66" -version = "0.1.5" +version = "0.1.6" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/src/estimation.jl b/src/estimation.jl index b3d41a4..033f205 100644 --- a/src/estimation.jl +++ b/src/estimation.jl @@ -430,7 +430,7 @@ Kalman smoother and CM-step for initial conditions (i.e., X0 and P0) APIs to call `MessyTimeSeries.update_smoothing_factors!` with SmootherArrays. """ -call_update_smoothing_factors!(sspace::KalmanSettings, status::SizedKalmanStatus, smoother_arrays::SmootherArrays, ind_not_missings::Union{IntVector, Nothing}, e::Union{FloatVector, Nothing}, inv_F::Union{SymMatrix, Nothing}, L::Union{FloatMatrix, Nothing}) = update_smoothing_factors!(sspace, status, ind_not_missings, smoother_arrays.J1, smoother_arrays.J2, e, inv_F, L); +call_update_smoothing_factors!(sspace::KalmanSettings, status::SizedKalmanStatus, smoother_arrays::SmootherArrays, ind_not_missings::Union{IntVector, Nothing}, e::Union{FloatVector, Nothing}, inv_F::Union{SymMatrix, FloatVector, Nothing}, L::Union{FloatMatrix, Vector{FloatMatrix}, Nothing}) = update_smoothing_factors!(sspace, status, ind_not_missings, smoother_arrays.J1, smoother_arrays.J2, e, inv_F, L); call_update_smoothing_factors!(sspace::KalmanSettings, status::SizedKalmanStatus, smoother_arrays::SmootherArrays, ind_not_missings::Union{IntVector, Nothing}) = update_smoothing_factors!(sspace, status, ind_not_missings, smoother_arrays.J1, smoother_arrays.J2); """ @@ -779,7 +779,7 @@ function ecm(estim::EstimSettings; output_sspace_data::Union{FloatMatrix, JMatri sspace, B_star, C_star, Q_view, coordinates_measurement_states, coordinates_transition_current, coordinates_transition_lagged, coordinates_transition_PPs, coordinates_transition_P0, coordinates_free_params_B, coordinates_free_params_C = initialise(estim); # Pre-allocate memory for Kalman filter and smoother - status = SizedKalmanStatus(sspace.Y.T); + status = SizedKalmanStatus(sspace); smoother_arrays = SmootherArrays(estim, sspace, coordinates_measurement_states, coordinates_transition_current, coordinates_transition_lagged, coordinates_transition_PPs); # ECM controls diff --git a/test/dfm.jl b/test/dfm.jl index 25aa310..7991728 100644 --- a/test/dfm.jl +++ b/test/dfm.jl @@ -223,7 +223,7 @@ function naive_dfm_simulation(true_loadings::FloatMatrix, true_dynamics::FloatMa sspace = ecm(estim); # Run Kalman filter - status = SizedKalmanStatus(sspace.Y.T); + status = SizedKalmanStatus(sspace); kfilter_full_sample!(sspace, status); X_sm, P_sm, X0_sm, P0_sm = ksmoother(sspace, status); diff --git a/test/dfm_write.jl b/test/dfm_write.jl index 66009bd..96d54c2 100644 --- a/test/dfm_write.jl +++ b/test/dfm_write.jl @@ -60,7 +60,7 @@ function naive_dfm_simulation(true_loadings::FloatMatrix, true_dynamics::FloatMa sspace = ecm(estim); # Run Kalman filter - status = SizedKalmanStatus(sspace.Y.T); + status = SizedKalmanStatus(sspace); kfilter_full_sample!(sspace, status); X_sm, P_sm, X0_sm, P0_sm = ksmoother(sspace, status); diff --git a/test/var.jl b/test/var.jl index c55efaf..cc1f68f 100644 --- a/test/var.jl +++ b/test/var.jl @@ -144,7 +144,7 @@ function var_estimation_test(Y::JArray, q::Int64, λ::Number, α::Number, β::Nu =# # Run Kalman filter - status = SizedKalmanStatus(sspace.Y.T); + status = SizedKalmanStatus(sspace); kfilter_full_sample!(sspace, status); # Compute Kalman stats from the ksmoother function diff --git a/test/vma.jl b/test/vma.jl index 9832af3..650b804 100644 --- a/test/vma.jl +++ b/test/vma.jl @@ -142,7 +142,7 @@ function vma_estimation_test(Y::JArray, r::Int64, λ::Number, α::Number, β::Nu =# # Run Kalman filter - status = SizedKalmanStatus(sspace.Y.T); + status = SizedKalmanStatus(sspace); kfilter_full_sample!(sspace, status); # Compute Kalman stats from the ksmoother function