Dear Dynare friends/helpers,
I run the attached codes on Dynare 4.4.2 and got some teribble error message. it reads
‘’ Matrix is singular to working precision
Matrix is singular, close to singular or badly scaled. Results may be inaccurate.
RCOND=NaN …
The log data density is negative infinity.
A guide on what steps to take would be helpful. Someone should kindly assist.
Here is my model codes
abiodungboy.mod (5.81 KB)
Dear jpfeifer,
I HAVE JUST ATTACHED THE DATAFILE AS REQUESTED. YOUR EFFORT IS APPRECIATED.
hi,
I try to attach the datafile again
aadegboyedata.xls (93 KB)
Before looking at the Laplace, try fixing the other issues with your model first. For example:

You are neglecting the parameter dependence in your estimation. You need to set hpid and mpif in each iteration, because you are estimating gamad. Define them as modellocal variables. See Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” for more information.

Plot your data. y seems to have a massive seasonal pattern at the end. You need to deal with seasonal adjustment before estimation. See again Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models” for more information.

Similarly, amp looks like a step function. Fitting a continuous ARprocess to this most probably won’t work.

Check identification. You have
[quote]==== Identification analysis ====
Testing prior mean
Evaluating simulated moment uncertainty … please wait
Doing 402 replicas of length 300 periods.
Simulated moment uncertainty … done!
WARNING !!!
The rank of H (model) is deficient!
phigy is not identified in the model!
[dJ/d(phigy)=0 for all tau elements in the model solution!][/quote]
You estimate phigy but it does not appear in any equation.
Dear jpfeifer,
Your effort is appreciated. Kindly guide on the following.
 how to use one sided HP filter
 is AR(1) process suggesting a stationarity in my model e.g. in log A= rho (log A) + eps_a? I treat it as a stationary factor in my model. I’m I right? Kindly guide.
I appreciate your effort in guiding me.
dear jpfeifer,
I HAVE FOUND YOUR GUIDE BEFORE NOW VERY HELPFUL.
I have removed trend and seasonality from my data. I use one sided hp filter as suggested in your paper, ’ GUIDE TO SPECIFYING OBSERVATION EQUATIONS’. FOR THE MODEL I HAVE EXPRESSED THE PARAMETERS DIRECTLY. HOWEVER THE RESULTS IS YET TO COME OUT. THE ERRORS …MATRIX IS BADLY SCALED, SINGULAR ETC STILL SHOWS.
MY MODEL CODES AND DATAFILE ARE ATTACHED. I SHOULD BE GLAD TO RECEIVE FURTHER GUIDE ON HOW TO MOVE FORWARD. KINDLY ASSIST WITH GUIDE TO GET MY MODEL CODE RUN.
ola_waleee.xls (46.5 KB)
biodunmodel.mod.mod (5.76 KB)
Dear jpfeifer,
I should be glad to receive some guide as earlier requested in my post on the subject.
Add
estimated_params_init(use_calibration);
end;
before estimation. Then follow the error messages. For example
[quote]Cannot use parameter values from calibration as they violate the prior bounds.Error using check_prior_bounds (line 39)
Initial value(s) of comega, aeta, phidebt, phigove, aystab, exrstab are outside parameter bounds. Potentially, you should set prior_trunc=0. If you used the
mode_fileoption, check whether your modefile is consistent with the priors.[/quote]
If you look at comega, your calibrated value is 0.8 but your prior mean is 0.7 with a standard error of 0.01 only. Essentially you are saying, the 0.8 you calibrated your model to will never happen.