State variables indices gone missing

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.

State variables indices gone missing

Postby aaronb2017 » Wed May 03, 2017 9:21 pm

I switched from MATlab to Octave (using version 4.3.1) and am no longer able to find the structure M_.state_var. I need these indices. Does anyone know where to find them in Octave?
aaronb2017
 
Posts: 4
Joined: Wed May 03, 2017 9:17 pm

Re: State variables indices gone missing

Postby jpfeifer » Thu May 04, 2017 11:37 am

Could it be that you switched to a newer Dynare version where it's stored in
Code: Select all
oo_.dr.state_var
?
------------
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: State variables indices gone missing

Postby aaronb2017 » Thu May 04, 2017 1:27 pm

That does not exist either.

octave:6> oo_.dr.state_var
error: structure has no member 'state_var'
aaronb2017
 
Posts: 4
Joined: Wed May 03, 2017 9:17 pm

Re: State variables indices gone missing

Postby jpfeifer » Thu May 04, 2017 2:09 pm

Is there a reason you are not using the most recent unstable version of Dynare with Octave 4.2.1?
------------
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: State variables indices gone missing

Postby aaronb2017 » Fri May 05, 2017 1:37 pm

I'm using Dynare 4.3.1 and Octave 3.6.4 because I have legacy code from 2014 that parses out individual model variables and decision rules for a model with > 100 state variables. The code was previously working fine with Dynare 4.3.1 and MATlab 2015a (I lost my MATlab license). I installed Dynare 4.3.1 since I didn't want to go through the ordeal of finding and labeling all the variables again. I believe the indexing of state variables changed in subsequent versions of Dynare. Would switching to Octave 3.8.1 help?
aaronb2017
 
Posts: 4
Joined: Wed May 03, 2017 9:17 pm

Re: State variables indices gone missing

Postby jpfeifer » Fri May 05, 2017 4:50 pm

You must be confusing something. I looked into Dynare 4.3.1 and
Code: Select all
M_.state_var

seems to be only created with the
Code: Select all
block

option. Thus, Octave is not the problem.
In 4.3.1, the state ordering should be in
Code: Select all
oo_.dr.kstate
------------
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: State variables indices gone missing

Postby aaronb2017 » Fri May 05, 2017 8:21 pm

I see. Thanks. My prior code was creating the transition matrix, hx, so that the state variables would be in declaration order.

hx=oo_.dr.ghx(oo_.dr.inv_order_var(M_.state_var),oo_.dr.inv_order_var(M_.state_var-20));

I've tried switching to:

hx=oo_.dr.ghx(oo_.dr.inv_order_var(oo_.dr.kstate),oo_.dr.inv_order_var(oo_.dr.kstate-20));

Basically, I'm trying to get the rows and columns of hx so that they are in declaration order. Would that already be the case with the new indexing?
aaronb2017
 
Posts: 4
Joined: Wed May 03, 2017 9:17 pm

Re: State variables indices gone missing

Postby jpfeifer » Sat May 06, 2017 8:31 am

I am not sure I understand what you mean with "new indexing". To me it seems you were using a newer version already. Please note that in newer versions the ordering should be documented in the manual. You may also be interested in the discussion at http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=19807
------------
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


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 11 guests