King and Rebelo (1999)

I have attached a mod file replicating the theoritical moments and the impulse responses of King and Rebelo (1999) : " Resuscitating Real Business Cycles". This is a standard RBC model.

KingRebelo99.mod (4.18 KB)

Hi I just run your code and is really useful. However I tried to simulate by myself the model and I get different results for the moments… do u know how dynare computes the business cycle statistics? and where does it store them?
I know for example that dynare stores the impulse response function of, say, variable “x” to exo shock “e” in a vector called “x_e”, but what is the analog for the moments?



Dynare stores the simulated variables in a matrix called oo_.endo_simul, with size J-by-N, where J is the number of (all) variables and N is the number of periods you asked. Dynare drops by default the first one-hundred observations in computing statistics to avoid dependence of moments on initial conditions. This can be modified by including the option “drop” following the stoch_simul command. If you are computing statistics using ALL observations of the (simulated) variables, then it is normal they are different. Then, some differences might come from the way you estimate certain moments compared to the way Dynare does, e.g. how exactly correlations or autocorrelations are estimated (I remember I had something like that with autocorrelations). However, these differences should be minor and I think it should be mostly the initial-conditions thing.

Hope that helps. Good luck!!