Specifically for the Stochastic Volatility Second order model (ie, the output of estimate_rbc_sv_2_joint.jl), write the following code to make plots of the latent state variables x.
Write code to make time series plots of the latent variables (specifically z and ν) in the same format as the existing plots of the epsilons, ie with mean and intervals over time.
Outline of approach:
This basically requires taking the MCMC output, and writing code so that for each draw of parameters and shocks, it solves the model and produces the simulations with noise= in QuadraticStateSpaceProblem set to the saved shocks.
This is slightly different than either the estimation code in estimate_rbc_sv_2_joint.jl (which computes the likelihood) or the data generation code in generate_fake_data_rbc_sv.jl, which does not take in shocks and so I think generates new ones by default.
It might be possible to do this using the EnsembleProblem method (see Jesse's code example), which does generally what I want, but if it's hard to make that use the saved data and parameter values, you can just write a loop.
Asides on potential implementation improvements, not required:
If you can write this code as a generic function that produces the corresponding output given MCMC output from an arbitrary DSSM model solved at second order int he same format, great, but no rush on that.
This should be naively parallelizable, but it's not likely to be slow enough that you should worry about that
Specifically for the Stochastic Volatility Second order model (ie, the output of
estimate_rbc_sv_2_joint.jl
), write the following code to make plots of the latent state variablesx
.Outline of approach:
noise=
inQuadraticStateSpaceProblem
set to the saved shocks.estimate_rbc_sv_2_joint.jl
(which computes the likelihood) or the data generation code ingenerate_fake_data_rbc_sv.jl
, which does not take in shocks and so I think generates new ones by default.EnsembleProblem
method (see Jesse's code example), which does generally what I want, but if it's hard to make that use the saved data and parameter values, you can just write a loop.Asides on potential implementation improvements, not required: