RBC_Est.mod and RBC_DataGen.mod do not work

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

RBC_Est.mod and RBC_DataGen.mod do not work

Postby fsacault » Wed Apr 13, 2016 9:31 am

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
Attachments
simuldataRBC.m
(140.86 KiB) Downloaded 190 times
RBC_Est.mod
(796 Bytes) Downloaded 212 times
fsacault
 
Posts: 9
Joined: Sun Apr 03, 2016 8:40 am

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

Postby jpfeifer » Thu Apr 14, 2016 8:46 am

Unfortunately, this is a problem with Octave. Please use the attached file where I replaced the gamma by a normal prior.
Attachments
RBC_Est.mod
(798 Bytes) Downloaded 197 times
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

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

Postby fsacault » Thu Apr 14, 2016 6:14 pm

Many thanks for your help, it worked well with this substitution by normal distribution
fsacault
 
Posts: 9
Joined: Sun Apr 03, 2016 8:40 am

Using RBC_Est.mod with own data

Postby fsacault » Fri Apr 15, 2016 2:23 am

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
Attachments
RBC_Est_jpfeifer.mod
RBC_Est.mod modified by jpfeifer replacing gamma prior by a normal prior to make it work under octave
(780 Bytes) Downloaded 190 times
data.m
replacing simuldataRBC.m by data.m containing own data = seasonally adjusted GDP, divided by 100.000 to put the data into [0,1], is it necessary ?
(462 Bytes) Downloaded 169 times
fsacault
 
Posts: 9
Joined: Sun Apr 03, 2016 8:40 am

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

Postby jpfeifer » Sat Apr 16, 2016 4:00 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

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

Postby fsacault » Sun Apr 17, 2016 8:16 am

again, many thanks ! 8) your guess is very nice, all works with full stop !
fsacault
 
Posts: 9
Joined: Sun Apr 03, 2016 8:40 am


Return to Dynare User Guide

Who is online

Users browsing this forum: No registered users and 0 guests