26 lines
902 B
Matlab
26 lines
902 B
Matlab
function yr = trank(y);
|
|
% yr = trank(y);
|
|
% yr is the rank transformation of y
|
|
%
|
|
% Part of the Sensitivity Analysis Toolbox for DYNARE
|
|
%
|
|
% Written by Marco Ratto, 2006
|
|
% Joint Research Centre, The European Commission,
|
|
% (http://eemc.jrc.ec.europa.eu/),
|
|
% marco.ratto@jrc.it
|
|
%
|
|
% Disclaimer: This software is not subject to copyright protection and is in the public domain.
|
|
% It is an experimental system. The Joint Research Centre of European Commission
|
|
% assumes no responsibility whatsoever for its use by other parties
|
|
% and makes no guarantees, expressed or implied, about its quality, reliability, or any other
|
|
% characteristic. We would appreciate acknowledgement if the software is used.
|
|
% Reference:
|
|
% M. Ratto, Global Sensitivity Analysis for Macroeconomic models, MIMEO, 2006.
|
|
%
|
|
|
|
[nr, nc] = size(y);
|
|
for j=1:nc,
|
|
[dum, is]=sort(y(:,j));
|
|
yr(is,j)=[1:nr]'./nr;
|
|
end
|