


yr = trank(y); yr is the rank transformation of y 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 yr = trank(y); 0002 % yr = trank(y); 0003 % yr is the rank transformation of y 0004 % 0005 % Written by Marco Ratto 0006 % Joint Research Centre, The European Commission, 0007 % (http://eemc.jrc.ec.europa.eu/), 0008 % marco.ratto@jrc.it 0009 % 0010 % Reference: 0011 % M. Ratto, Global Sensitivity Analysis for Macroeconomic models, MIMEO, 2006. 0012 0013 % Copyright (C) 2012 Dynare Team 0014 % 0015 % This file is part of Dynare. 0016 % 0017 % Dynare is free software: you can redistribute it and/or modify 0018 % it under the terms of the GNU General Public License as published by 0019 % the Free Software Foundation, either version 3 of the License, or 0020 % (at your option) any later version. 0021 % 0022 % Dynare is distributed in the hope that it will be useful, 0023 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0024 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0025 % GNU General Public License for more details. 0026 % 0027 % You should have received a copy of the GNU General Public License 0028 % along with Dynare. If not, see <http://www.gnu.org/licenses/>. 0029 0030 [nr, nc] = size(y); 0031 for j=1:nc, 0032 [dum, is]=sort(y(:,j)); 0033 yr(is,j)=[1:nr]'./nr; 0034 end