Home > matlab > ms-sbvar > identification > exclusions.m

exclusions

PURPOSE ^

function [Ui,Vi,n0,np,ixmC0Pres] = exclusions(nvar,nexo,options_ms)

SYNOPSIS ^

function [Ui,Vi,n0,np,ixmC0Pres] = exclusions(nvar,nexo,options_ms)

DESCRIPTION ^

 function [Ui,Vi,n0,np,ixmC0Pres] = exclusions(nvar,nexo,options_ms)

 INPUTS
    nvar:                      number endogenous variables
    nexo:                      number exogenous variables
    options_ms:    (struct)    options

 OUTPUTS
    Ui
    Vi
    n0
    np
    ixmC0Pres

 SPECIAL REQUIREMENTS
    none

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [Ui,Vi,n0,np,ixmC0Pres] = exclusions(nvar,nexo,options_ms)
0002 % function [Ui,Vi,n0,np,ixmC0Pres] = exclusions(nvar,nexo,options_ms)
0003 %
0004 % INPUTS
0005 %    nvar:                      number endogenous variables
0006 %    nexo:                      number exogenous variables
0007 %    options_ms:    (struct)    options
0008 %
0009 % OUTPUTS
0010 %    Ui
0011 %    Vi
0012 %    n0
0013 %    np
0014 %    ixmC0Pres
0015 %
0016 % SPECIAL REQUIREMENTS
0017 %    none
0018 
0019 % Copyright (C) 2011 Dynare Team
0020 %
0021 % This file is part of Dynare.
0022 %
0023 % Dynare is free software: you can redistribute it and/or modify
0024 % it under the terms of the GNU General Public License as published by
0025 % the Free Software Foundation, either version 3 of the License, or
0026 % (at your option) any later version.
0027 %
0028 % Dynare is distributed in the hope that it will be useful,
0029 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0030 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0031 % GNU General Public License for more details.
0032 %
0033 % You should have received a copy of the GNU General Public License
0034 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
0035 
0036 indxC0Pres = options_ms.cross_restrictions;
0037 nlags = options_ms.nlags;
0038 
0039 Qi1 = options_ms.Qi;
0040 Ri1 = options_ms.Ri;
0041 
0042 Ui = cell(nvar,1);
0043 Vi = cell(nvar,1);
0044 n0 = zeros(nvar,1);
0045 np = zeros(nvar,1);
0046 
0047 k = nlags*nvar+1;
0048 
0049 for n=1:nvar
0050  Qi{n} = zeros(nvar,nvar);
0051  sQ = size(Qi1{n});
0052  if all(sQ) > 0
0053      Qi{n}(1:sQ(1),1:sQ(2)) = Qi1{n};
0054  end
0055  Ri{n} = zeros(k,k);
0056  sR = size(Ri1{n});
0057  if all(sR) > 0
0058      Ri{n}(1:sR(1),1:sR(2)) = Ri1{n};
0059  end
0060 
0061  if options_ms.constants_exclusion
0062         Ri{n}(sR(1)+1,k) = 1;
0063  end
0064 
0065  Ui{n} = null(Qi{n});
0066  Vi{n} = null(Ri{n});
0067  n0(n) = size(Ui{n},2);
0068  np(n) = size(Vi{n},2);
0069 end
0070 
0071 ixmC0Pres = NaN;

Generated on Tue 22-May-2012 02:40:23 by m2html © 2005