Page 1 of 1

RBC_Est.mod and RBC_DataGen.mod do not work

PostPosted: Wed Apr 13, 2016 9:31 am
by fsacault
RBC_DataGen.mod
(2.15 KiB) Downloaded 173 times
Hi, I am a PHD student at French Polynesia University trying to learn Dynare

to run RBC_Est.mod (attached), you need simuldataRBC.m
this file should be generated by RBC_DataGen.mod (attached)
When you run it, dynare gives the following error messages:
Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
[color=#0000FF]ERROR: RBC_DataGen.mod: line 205, cols 32-46: syntax error, unexpected NAME
error: DYNARE: preprocessing failed
error: called from:
error: c:\dynare\4.4.3\matlab\dynare.m at line 174, column 5
[/color]


this problem has already reported in the forum:
viewtopic.php?f=4&t=4209
viewtopic.php?f=1&t=1477 : this reply gives corrected simuldataRBC.m (attached) and RBC_DataGen.mod which is taken back in Dynare Userguide (the code is the same)

So, you cannot have data generated for RBC_Est.mod
Let us try the simuldataRBC.m given by the 1477/reply and run RBC_Est.mod, you will have the following error messages:

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
Found 9 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.

You did not declare endogenous variables after the estimation/calib_smoother command.

***MESSAGE FROM ROUTINE D9LGIT IN LIBRARY SLATEC.
***FATAL ERROR, PROG ABORTED, TRACEBACK REQUESTED
* NO CONVERGENCE IN 200 TERMS OF CONTINUED FRACTION
* ERROR NUMBER = 3
*
***END OF MESSAGE

***JOB ABORT DUE TO FATAL ERROR.
0 ERROR MESSAGE SUMMARY
LIBRARY SUBROUTINE MESSAGE START NERR LEVEL COUNT
SLATEC D9LGIT NO CONVERGENCE IN 20 3 2 1

error: Due to a bug in Octave, you must choose other values for mean and/or variance of your prior on psi, or use
another shape
error: called from:
error: c:\dynare\4.4.3\matlab\draw_prior_density.m at line 58, column 13
error: c:\dynare\4.4.3\matlab\plot_priors.m at line 55, column 38
error: c:\dynare\4.4.3\matlab\dynare_estimation_init.m at line 257, column 13
error: c:\dynare\4.4.3\matlab\dynare_estimation_1.m at line 81, column 63
error: c:\dynare\4.4.3\matlab\dynare_estimation.m at line 89, column 5
error: C:\dynare\4.4.3\models\RBC_Est.m at line 159, column 1
error: c:\dynare\4.4.3\matlab\dynare.m at line 180, column 1


So, I checked the content of simuldataRBC.m, it is c=[data] and not y which appears in line 17 varobs y;
replacing c by y does not work neither

Many thanks for somebody to help me

Re: RBC_Est.mod and RBC_DataGen.mod do not work

PostPosted: Thu Apr 14, 2016 8:46 am
by jpfeifer
Unfortunately, this is a problem with Octave. Please use the attached file where I replaced the gamma by a normal prior.

Re: RBC_Est.mod and RBC_DataGen.mod do not work

PostPosted: Thu Apr 14, 2016 6:14 pm
by fsacault
Many thanks for your help, it worked well with this substitution by normal distribution

Using RBC_Est.mod with own data

PostPosted: Fri Apr 15, 2016 2:23 am
by fsacault
I tried to use RBC_Est.mod (attached) with my own data file (seasonally adjusted GDP in data.m attached)
it produced the following errors:

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
Found 9 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.


You did not declare endogenous variables after the estimation/calib_smoother command.
Forecasts will be computed for the 9 endogenous variables of
your model, this can be very long....


Choose one of the following options:

[1] Consider all the endogenous variables.
[2] Consider all the observed endogenous variables.
[3] Stop Dynare and change the mod file.

options [default is 1] = 2

warning: print.m: epstool binary is not available.
Some output formats are not available.
warning: called from
__print_parse_opts__ at line 385 column 9
print at line 283 column 8
dyn_saveas at line 41 column 5
plot_priors at line 73 column 5
dynare_estimation_init at line 257 column 13
dynare_estimation_1 at line 81 column 63
dynare_estimation at line 89 column 5
RBC_Est_jpfeifer at line 158 column 1
dynare at line 180 column 1
error: read_variables: A(I,J,...) = X: dimensions mismatch
error: called from:
error: c:\dynare\4.4.3\matlab\read_variables.m at line 79, column 37
error: c:\dynare\4.4.3\matlab\/utilities/dataset\initialize_dataset.m at line 32, column 9
error: c:\dynare\4.4.3\matlab\dynare_estimation_init.m at line 475, column 10
error: c:\dynare\4.4.3\matlab\dynare_estimation_1.m at line 81, column 63
error: c:\dynare\4.4.3\matlab\dynare_estimation.m at line 89, column 5
error: C:\dynare\4.4.3\models\RBC_Est_jpfeifer.m at line 158, column 1
error: c:\dynare\4.4.3\matlab\dynare.m at line 180, column 1


I got the same errors with y=GDP in trend cycle,

Must I use detrended GDP ( = raw data - trend) ?

thanks

Re: RBC_Est.mod and RBC_DataGen.mod do not work

PostPosted: Sat Apr 16, 2016 4:00 pm
by jpfeifer
My guess is that your Octave has trouble with you using a comma as the decimal separator in the data set. Use a fullstop instead.

Re: RBC_Est.mod and RBC_DataGen.mod do not work

PostPosted: Sun Apr 17, 2016 8:16 am
by fsacault
again, many thanks ! 8) your guess is very nice, all works with full stop !