From 418dc24b82dda1454956b7f01ea198c707a0979d Mon Sep 17 00:00:00 2001 From: William Chen Date: Mon, 21 Jun 2021 13:51:16 -0400 Subject: [PATCH] Rename log_prob_oldy to log_prob_old_data --- src/smc_main.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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