Another question: I have to compute standard errors using a parametric
bootstrapping procedure (generating 1000 samples of artificial data for the variables, each containing the same number of observations as the original samples and then re-estimating the model 1000 times using these artificial data sets).
I didn’t find anything in the Manual, so do you have any example of the code for this? Many thanks! Detailed description is in the attachment.
Jerger Roehe 2011.pdf (261.6 KB)
We do not provide bootstrap based estimates for the variance of the ML estimator. I am not sure it would be safe to use a bootstrap here. In the paper by Cho and Moreno, cited in the paper you shared, they consider a model where the reduced form solution is a VAR(1) model for the vector of observed variables, it is generally not the case: we have to deal with a state space reduced form model. Then I don’t know which estimated residuals we should use for the bootstrap.
Best,
Stéphane.
Dear professor,
my master’s thesis advisor dr. Masten advised me to do “resampling” of data which I use to estimate the model. Due to the timely correlated data, block bootstrap should probably be used.
I found resampling command in Dynare manual on page 90/223, however there’s no mention of block bootstrap. How could I implement it? Many thanks!
Model.mod (3.5 KB)
Dear Svit,
In Dynare, resampling is an option for the particle filter, I don’t think this is what your are looking for. As I wrote in the previous post, we do not provide commands or options for the bootstrap. Note that it would not be very difficult to write a matlab code for that, once you know which data you want to resample: the original time series (?) or the estimated innovations (from which you would simulate new samples).
Best,
Stéphane.
I still don’t understand why you would want that particular type of bootstrapping when there are other, more well-established methods for obtaining standard errors.
Many thanks for your insight. I wanted to follow dr. Röhe PhD thesis as closely as possible (partly due to my inexperience as master’s student and not knowing the alternatives).
If there is a way to obtain standard errors in Dynare without losing quality when replacing parametric bootstrapping, I am kindly asking for information what would be this alternative.
P.S. People on Stata forum advised me this is extremly complicated procedure and that it would require me at least a year of studying both Stata and bootstrapping in order to be able to run parametric bootstrapping in Stata. It was my understanding that such complicated procedure is better than simpler ones, but I would be happy if I was wrong.
But the problem is I don’t obtain the standard errors that you mentioned in second point. I did obtain them when I ran Bayesian estimation (Metropolis-Hastings algorithm). However, after deleting distribution of priors and running ML estimation, this Octave window freezes and estimates and standard errors don’t appear:

Model.mod (3.5 KB)
I do not have Octave on my machine. Under Matlab it’s not a freeze but an error (a non definite positive covariance matrix). I tried with mode_compute=5, same issue. Looking at the mode_check plots something must be wrong in the model (or the data). Also, you should probably put boundary constraints on the parameters.
Best,
Stéphane.
Dear professor,
another question. After replacing parametric bootstrapping with normal standard errors, can I replace “maximum likelihood” estimators with Bayesian (Random Walk Metropolis) estimators without losing quality?
Later on, I plan to conduct parameter stability tests, if that matters.
I do not understand the question. It’s up to you to choose between the Bayesian and the Frequentist paradigms. Note that you can go for a Bayesian approach (using the Metropolis-Hastings as a posterior sampler) with uniform priors on all the estimated parameters. In this case the posterior density will have the shape than the likelihood (but the interpretation of the inference is still quite different).
Best,
Stéphane.
Thank you, I thought so.
Edit: I added several parameters that need to be estimated. Could you comment if distribution and standard deviations are correct? I am not sure if “normal_pdf” is correct expression for normal distribution and if gamm and bet should have gamma and beta distributions, as well as their deviations that I set to 0.01. Many thanks!
Model.mod (3.8 KB)
The names of the priors look good. Without knowing the model and the data, it is difficult to say whether the priors are “correct” (if that means anything). There is obviously something wrong with the prior on the discount factor, which has a peak (the mode) at 1. So the model is not defined on the prior mode… This is unfortunate. You probably want to reduce the prior variance on this parameter. I haven’t looked at your data, but the theoretical definitions of the observed are zero mean, while you have prefilter=0 in the estimation command. If your data are not centred on 0, that’s a problem. Also, if your data are centred, it is unlikely that you will be able to estimate the discount factor… It may be preferable to calibrate this parameter. Regarding the priors on the shocks, it is useful to check that the moments of the observed variables (the variances) are not too far from the moments in the data.
Best,
Stéphane
Thank you for your insights. Please find the Data and the model files in attachment. How should I change prefilter=0?
Data.xlsx (19.4 KB)
Jerger Roehe 2011.pdf (261.6 KB)
Your observation equations feature a constant, so prefilter=0 is correct.
Thank you, great, so I will use code “uniform_pdf” and leave standard deviation 0.01.
No. Leave the mean and standard deviation empty and instead use an upper and lower bound.
But how would I compute the upper in lower bounds? I tried like this:
gamm, uniform_pdf, , ,0.041, 0.043;
Given that the mean 0.042 is the only information I have about this parameter and 0.001 is completely randomly determined deviation.