Skip to content
Snippets Groups Projects
Commit 4359eb6d authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Adapted ms sbvar codes (options_.varobs is a row cell array of strings).

parent 62e28dac
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,7 @@ pctindx = [];
% Select the variable to use and rearrange columns if desired
%vlist = [3 1 2];
%options_.ms.vlist = [1 2 3];
options_.ms.vlist = 1:size(options_.varobs,1);
options_.ms.vlist = 1:length(options_.varobs);
vlist1=options_.ms.vlist;
%==========================================================================
......
......@@ -28,7 +28,7 @@ function ms_write_markov_file(fname, options)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
n_chains = length(options.ms.ms_chain);
nvars = size(options.varobs,1);
nvars = length(options.varobs);
fh = fopen(fname,'w');
%/******************************************************************************/
......
......@@ -48,16 +48,16 @@ end
%1 CBO output gap -- log(x_t)-log(x_t potential)
%2 GDP deflator -- (P_t/P_{t-1})^4-1.0
%2 FFR/100.
options_.ms.vlist = [1:size(options_.varobs,1)]; % 1: U; 4: PCE inflation.
options_.ms.varlist=cellstr(options_.varobs);
options_.ms.log_var = sort(varlist_indices(options_.ms.vlistlog,options_.varobs)); % subset of "options_.ms.vlist. Variables in log level so that differences are in **monthly** growth, unlike R and U which are in annual percent (divided by 100 already).
options_.ms.vlist = [1:length(options_.varobs)]; % 1: U; 4: PCE inflation.
options_.ms.varlist=cellstr(options_.varobs');
options_.ms.log_var = sort(varlist_indices(options_.ms.vlistlog,char(options_.varobs))); % subset of "options_.ms.vlist. Variables in log level so that differences are in **monthly** growth, unlike R and U which are in annual percent (divided by 100 already).
options_.ms.percent_var =setdiff(options_.ms.vlist,options_.ms.log_var);
%options_.ms.restriction_fname='ftd_upperchol3v'; %Only used by msstart2.m.
ylab = options_.ms.varlist;
xlab = options_.ms.varlist;
%----------------
nvar = size(options_.varobs,1); % number of endogenous variables
nvar = length(options_.varobs); % number of endogenous variables
nlogeno = length(options_.ms.log_var); % number of endogenous variables in options_.ms.log_var
npereno = length(options_.ms.percent_var); % number of endogenous variables in options_.ms.percent_var
if (nvar~=(nlogeno+npereno))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment