Drawing parameters from posterior for simulations

Hi All,

I have the following basic question: I have an estimated (linear) model, where I have done the posterior simulations using the RWMH (3 chains, 500000 draws each). I would like to do simulations (not simply IRFs) with it using the non-linear deterministic solver (because the simulation involves interest rate pegs) for different parameter combinations. In particular, I would like to make say 1000 parameter draws from my posterior, and perform my simulation for these 1000 parameter combinations. I would like to ask if I could go about it in the following fashion:

1.) combine all the x2 vectors from the mh files (those in the metropolis folder which end on _mh1_blck1 , _mh1_blck2 etc.) into one large vector with 1.5 million entries.

  1. Make 1000 draws from a uniform distribution with support [0, 1.5 million], and then rounding each draw up to the next integer.

3.) For each of these round draws, save the row of the combined x2 file with the number of the rounded draw from the uniform distribution.

Would that work? Many thanks for your help.

Best,

Ansgar