diff --git a/src/smc_main.jl b/src/smc_main.jl index d05b9cb..279adea 100644 --- a/src/smc_main.jl +++ b/src/smc_main.jl @@ -82,7 +82,7 @@ function smc(loglikelihood::Function, parameters::ParameterVector{U}, data::Matr take their regime 1 values at the end of the loglikelihood computation and set `toggle = false`. - `debug_assertion::Bool = false`: if true, then when an assertion error is thrown during the estimation, output is created in a JLD2 file to help the user debug the problem. -- `log_prob_oldy::Float64 = 0.0`: Log MDD of old y for correct incremental weights when bridging +- `log_prob_old_data::Float64 = 0.0`: Log MDD of old data for correct incremental weights when bridging ### Outputs @@ -158,7 +158,7 @@ function smc(loglikelihood::Function, parameters::ParameterVector{U}, data::Matr regime_switching::Bool = false, toggle::Bool = true, debug_assertion::Bool = false, - log_prob_oldy::Float64 = 0.0) where {S<:AbstractFloat, U<:Number} + log_prob_old_data::Float64 = 0.0) where {S<:AbstractFloat, U<:Number} ######################################################################################## ### Settings @@ -404,7 +404,7 @@ function smc(loglikelihood::Function, parameters::ParameterVector{U}, data::Matr elseif tempered_update_prior_weight == 1.0 incremental_weights = exp.((ϕ_n - ϕ_n1) * get_loglh(cloud)) else - incremental_weights = exp.((ϕ_n1 - ϕ_n) * log.((exp.(get_old_loglh(cloud) .- log_prob_oldy .+ + incremental_weights = exp.((ϕ_n1 - ϕ_n) * log.((exp.(get_old_loglh(cloud) .- log_prob_old_data .+ log(1-tempered_update_prior_weight)) .+ tempered_update_prior_weight)) + (ϕ_n - ϕ_n1) * get_loglh(cloud)) end