


[yt, j0, ir, ic]=teff(T,Nsam,istable) Written by Marco Ratto Joint Research Centre, The European Commission, (http://eemc.jrc.ec.europa.eu/), marco.ratto@jrc.it Reference: M. Ratto, Global Sensitivity Analysis for Macroeconomic models, MIMEO, 2006.


0001 function [yt, j0, ir, ic]=teff(T,Nsam,istable) 0002 % [yt, j0, ir, ic]=teff(T,Nsam,istable) 0003 % 0004 % Written by Marco Ratto 0005 % Joint Research Centre, The European Commission, 0006 % (http://eemc.jrc.ec.europa.eu/), 0007 % marco.ratto@jrc.it 0008 % 0009 % Reference: 0010 % M. Ratto, Global Sensitivity Analysis for Macroeconomic models, MIMEO, 2006. 0011 0012 % Copyright (C) 2012 Dynare Team 0013 % 0014 % This file is part of Dynare. 0015 % 0016 % Dynare is free software: you can redistribute it and/or modify 0017 % it under the terms of the GNU General Public License as published by 0018 % the Free Software Foundation, either version 3 of the License, or 0019 % (at your option) any later version. 0020 % 0021 % Dynare is distributed in the hope that it will be useful, 0022 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0023 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0024 % GNU General Public License for more details. 0025 % 0026 % You should have received a copy of the GNU General Public License 0027 % along with Dynare. If not, see <http://www.gnu.org/licenses/>. 0028 0029 ndim = (length(size(T))); 0030 if ndim==3, 0031 if nargin==1, 0032 Nsam=size(T,3); 0033 istable = [1:Nsam]'; 0034 end 0035 tmax=max(T,[],3); 0036 tmin=min(T,[],3); 0037 [ir, ic]=(find( (tmax-tmin)>1.e-8)); 0038 j0 = length(ir); 0039 yt=zeros(Nsam, j0); 0040 0041 for j=1:j0, 0042 y0=squeeze(T(ir(j),ic(j),:)); 0043 %y1=ones(size(lpmat,1),1)*NaN; 0044 y1=ones(Nsam,1)*NaN; 0045 y1(istable,1)=y0; 0046 yt(:,j)=y1; 0047 end 0048 0049 else 0050 tmax=max(T,[],2); 0051 tmin=min(T,[],2); 0052 ir=(find( (tmax-tmin)>1.e-8)); 0053 j0 = length(ir); 0054 yt=NaN(Nsam, j0); 0055 yt(istable,:)=T(ir,:)'; 0056 0057 0058 end 0059 %clear y0 y1;