This project is read-only.

Monte Carlo procedure

Topics: Models, Times Series
Aug 7, 2015 at 9:35 AM

I am relatively new to the MC procedure and just want to find out how to get MC draws of from an estimated model object in IRIS?

Is it correct to use the RESAMPLE command? How would you go about specifying mean-zero Gaussian processes for the model shocks in this situation?

Aug 7, 2015 at 8:49 PM
Hi Harri,

Yes, that is the correct function if you are trying to sample from the distribution of shocks.

There is an undocumented feature which allows you to specify a function handle to resample which specifies the distribution. Currently this is assumed to be a function which takes two scalar arguments and produces an array of scalar normalized random draws. (E.g., you can consider the default monte carlo method to be @randn. The draws are then adjusted based on the model covariance matrix to produce a sample from the asymptotic shock distribution.)

You can use this to specify a t-distribution, for example, instead of a standard normal. E.g.,
fh = logdist.t(0,1,15) ;
sfh = @(varargin) fh([],'draw',[varargin{1},varargin{2}]) ;
s = resample(m,qq(1,1):qq(100,4),1000,'method=',sfh) ;
is valid.

You also have options to do a bootstrap or block bootstrap -- this is better documented.

In principle you could use something like a coupla method or the k-harmonic means method in IRIS (see the help for irisoptim.kcluster) to estimate a multivariate distribution from which one can sample, and then sample from that. But currently resample does not support any means of capturing dependence between draws other than simple correlation. It would require some modifications to be able to accept something like the function handle which is the output from irisoptim.kcluster, including some type of assumption about the ordering of shocks, or maybe the custom function handle should be assumed to return a struct with named shock tseries objects... anyway, the point is this is currently unsupported but is, in principle, possible. If it is really important to you can I try to look into this but you should not expect something immediately as I am quite busy with the job that pays my rent.