
Hi folks, I am experimenting with Monte Carlo simulations with IRIS model objects. Disregarding the theoretical flaws of doing so, I have fit different marginal distributions (other than normal) to the residuals filtered from an estimated model object.
I am modelling the dependencies of these residuals with a copula. I now have a 3dimensional object with 'n' residuals, 't' time increments' and 'p' paths. I was wondering which would we the most appropriate way to tell IRIS to use this object to generate
simulations for the statespace model variables.
Thanks!
Hector



I figured I can use 'plan' and 'endogenize' to do so (I am endogenizing all transition shocks in the model) , but it takes a relatively small model considerable time to run a simulation with over 100 paths (with 60 time increments). Is this the most efficient
way I can do this in IRIS? I would appreciate your input.
Thanks!
Hector


Coordinator
Jun 27, 2014 at 4:53 PM

Hector
I'm a little bit puzzled. Originally, I thought you used copulas to approximate the empirical distributions of shocks obtained from a Kalman filter, and wanted to resample the shocks from those empirical distributions to simulate the model... But having seen
you other post, I'm not sure I understood your experiment correctly. Do you actually resample the endogenous variables and you want to back out the underlying shocks? Can you please describe in detail what exactly you're doing... Sorry about that....
Best,
Jaromir



Jaromir, thank you for your reply. I apologize for the confusion. Your first interpretation is correct. What I have done after my first comment is:
 resampled from empirical distributions and dependency structures (fitted shocks extracted from the Kalman filter),
 created a plan,
 endogenized the transition shocks and assigned the resampled shocks to the database used by jforecast,
 repeated this in loops to get the distributions for the other transition variables.
I was wondering if you would have approached this in a similar fashion or if there is a better way of performing this experiment. Thank you so much for your time.
Hector



Is the fact that I am endogenizing the shocks the source of the confusion? This was the only way I could come up with to get simulation paths out of the model given empirical distributions. I have attached the general theme in my code so far, in case that
helps explain my question better.
P = plan(Model,Range);
P = endogenize(P,Shocks,Range);
for jj = 1:10 where 10 is the number of simulation paths
for ii = 1:3 where 3 is the total # of shocks in the system (no measurement shocks)
Data.mean.(Shocks{ii}))(Range) = R(:,ii); where R contains the draws from empirical distributions
end
Simulation = jforecast(Model, Data, Range, 'plan=', P, 'anticipate=', false, 'meanOnly=',true);
end
Thanks again.
Hector



Ok, I think I figured this one out. I went back to the tutorials and realized that 'simulate' was the way to go in this case. There is no need to create a plan or use 'jforecast'. Once the shocks are drawn from the empirical distributions we need to simply
use them as an input in 'simulate', which is able to take several data sets. I'm sorry for the initial confusion. Should have checked those tutorials before :)
Have a nice day.
Hector

