DSGE modelling

For making suggestions and/or requests for new features you'd like added to EViews.

Moderators: EViews Gareth, EViews Moderator

donihue
Posts: 135
Joined: Wed Oct 07, 2009 8:51 am

DSGE modelling

Postby donihue » Sun Nov 22, 2009 3:57 am

The state of the art in macroeconometric analysis, especially as used in central banks, is the DSGE model "taken to the data" by the use of Bayesian estimation methods. Yet - despite the presence of state-space modelling and Kalman filter techniques - EViews seems to have no methods to estimate such models, nor even "garden variety" Bayesian VARs. RATS is especially good at Bayesian methodology, including extensive code for Bayesian DSGE modelling, but of course is not at all as "user-friendly" as EViews, and its code seems almost impenetrable to the new(ish) user. It would therefore be a real step forward if EViews were to include code to do this sort of analysis.

Regards
Donihue

donihue
Posts: 135
Joined: Wed Oct 07, 2009 8:51 am

Re: DSGE modelling

Postby donihue » Mon Jan 04, 2010 3:33 am

donihue wrote:The state of the art in macroeconometric analysis, especially as used in central banks, is the DSGE model "taken to the data" by the use of Bayesian estimation methods. Yet - despite the presence of state-space modelling and Kalman filter techniques - EViews seems to have no methods to estimate such models, nor even "garden variety" Bayesian VARs.


As a follow-up to this, many researchers use the Dynare programme (http://www.dynare.org) to estimate these BVARs with a DSGE prior. Dynare is a (complex and highly-developed) pre-processor for Matlab, generating Matlab code which does all the actual work. If EViews indeed contains (or will contain) a method for porting Matlab code, perhaps it would be possible to estimate DSGE-BVARs through EViews via this port?

Another point: Schorfheide (one of the originators of this approach) has considerable GAUSS code for DSGE-BVARs on his site (http://www.econ.upenn.edu/~schorf/). Is there any plan to provide an EViews "port" for GAUSS code?

Regards
Donihue

EViews Glenn
EViews Developer
Posts: 2672
Joined: Wed Oct 15, 2008 9:17 am

Re: DSGE modelling

Postby EViews Glenn » Thu Jan 07, 2010 12:01 pm

Thanks, this is useful.

Note that EViews 7 provides a client to run MATLAB so that if you have the latter you can use EViews as a front end. That's not, unfortunately the same as running MATLAB code natively.

We will put BVARs and DGSE modelling on the list (actually, they're on the list, but we'll bump them up a bit). :) Any additional information on what types of things you want to see are always gratefully received. In particular, what features are viewed as essential and which ones are desirable, but less central.

donihue
Posts: 135
Joined: Wed Oct 07, 2009 8:51 am

Re: DSGE modelling

Postby donihue » Wed Jan 13, 2010 1:18 pm

Glenn,

Thank you for this. I have tried out the port, and am able to run a Dynare model in Matlab through it. However, although I can recover (via "xget") scalars and vectors, I cannot recover (components of) what Matlab calls "structures" (which are essentially multidimensional matrices). Thus, for example, whilst "xget c_u" works fine and returns the correct vector, "xget oo_.steady_state" (which attempts to retrive the vector "steady_state" which resides within the Matlab structure "oo_") returns the message "GetWorkspaceData returned an error". Perhaps there is some way to get at these structures directly?

Regards
Donihue

EViews Steve
EViews Developer
Posts: 799
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: DSGE modelling

Postby EViews Steve » Thu Jan 14, 2010 8:49 am

You can probably work around the XGET problem with your structure vector by copying it to a separate standalone vector variable first (e.g. x = oo_.steady_state), and then retrieving that stand alone vector separately.

I'm not familiar with MATLAB, but if you can provide a short sequence of MATLAB commands that creates the structure and structure vector you're talking about, I can debug it for you on my end and try to figure out what's going on.

Steve

donihue
Posts: 135
Joined: Wed Oct 07, 2009 8:51 am

Re: DSGE modelling

Postby donihue » Thu Jan 14, 2010 12:27 pm

Steve,

Thank you for your suggestion and offer. I do not mysyelf use Matlab as such, only as a platform to run the Dynare programme, which is what creates the mentioned structures. However, below is a snippet of a Matlab programme which is generated by Dynare, and which creates the oo_. structure:

oo_.steady_state( 1 ) = 1.08068253095672;
oo_.steady_state( 2 ) = 0.80359242014163;
oo_.steady_state( 5 ) = 0.29175631001732;
oo_.steady_state( 3 ) = 5;
oo_.steady_state( 4 ) = 0;
oo_.steady_state( 6 ) = 0;
oo_.exo_steady_state( 1 ) = 0;
oo_.exo_steady_state( 2 ) = 0;
oo_.endo_simul=[oo_.steady_state*ones(1,M_.maximum_lag)];
if M_.exo_nbr > 0;
oo_.exo_simul = [ones(M_.maximum_lag,1)*oo_.exo_steady_state'];
end;
if M_.exo_det_nbr > 0;
oo_.exo_det_simul = [ones(M_.maximum_lag,1)*oo_.exo_det_steady_state'];
end;


As you can see, oo_. contains not only "steady_state", but also "exo_steady_state", "exo_simul" and "exo_det_simul", among many others, some of these elements being vectors, other matrices, yet other scalars. It is basically a "hold-all" where Dynare puts the model results.

Hope this helps.
Regards
Donihue

EViews Steve
EViews Developer
Posts: 799
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: DSGE modelling

Postby EViews Steve » Fri Jan 15, 2010 9:23 am

I've confirmed that this is a MATLAB limitation with their COM interface. They do not allow you to pull in struct members directly.

At the MATLAB support site, they suggested doing the same as I suggested yesterday, namely copy the struct member into a temporary variable first, then get the temporary variable. (see http://www.mathworks.com/support/soluti ... n=1-3YTQX7)

So, in EViews terms, you can do this by doing the following:

Code: Select all

xrun temp = oo_.steady_state
xget temp

donihue
Posts: 135
Joined: Wed Oct 07, 2009 8:51 am

Re: DSGE modelling

Postby donihue » Fri Jan 15, 2010 9:57 am

Thanks. It therefore seems clear that I will have to use your proposed workaround in this case.
Regards
Donihue

donihue
Posts: 135
Joined: Wed Oct 07, 2009 8:51 am

Re: DSGE modelling

Postby donihue » Wed Feb 03, 2010 4:29 am

Dear Glenn/Steve,

As a follow-up to this, attached is an effort to run the famous Lubik-Schorfheide (2007) model [Lubik, Thomas A. & Schorfheide, Frank, 2007. "Do central banks respond to exchange rate movements? A structural investigation," Journal of Monetary Economics, vol. 54(4), pages 1069-1087, May 2007] under EViews, following the only forward looking model example I could find in EViews' sample programmes ("taylor.prg"). It fails miserably, presumably through some error on my part. Perhaps you can see what is wrong at a glance?

Regards
Donihue
Attachments
ls2007mod_v3a.prg
(2.08 KiB) Downloaded 1070 times


Return to “Suggestions and Requests”

Who is online

Users browsing this forum: No registered users and 25 guests