Dear Johannes,

you are right. This code doesn't make much sense. It only creates several (replic) simulation samples in a binary file, but doesn't do anything with it. I had forgotten about the binary file. I doubt anybody ever used it.

Best

Michel


On 06/24/2012 07:08 PM, Johannes Pfeifer wrote:

Dear all,

 

can anyone tell me what is going in simult.m when replic>0?

The different replications are written into a file

 

fname = [M_.fname,'_simul'];

 

but this file has no valid file ending and is – as far as I can tell - never called or used later on.

 

Moreover, I cannot identify how the moments are computed across replications. After the last run

 

for i=1:replic

    if ~isempty(M_.Sigma_e)

        oo_.exo_simul(:,i_exo_var) = randn(options_.periods,nxs)*chol_S;

    end

    y_ = simult_(y0,dr,oo_.exo_simul,order);

    % elimninating initial value

    y_ = y_(:,2:end);

    if replic > 1

        fwrite(fh,y_,'float64');

    end

end

 

 

the last simulation result y_ is saved into oo_.endo_simul which is then used by disp_moments.m to display the simulated moments. Hence, it looks to me as if only the last replication is used. What am I missing?

 

Best,

 

Johannes

 



_______________________________________________
Dev mailing list
Dev@dynare.org
https://www.dynare.org/cgi-bin/mailman/listinfo/dev