sn.m

% -------------------------------------------------------------------------
% Function: s=sn(X)
% -------------------------------------------------------------------------
% Aim:
% Computing SN - scale estimator
% -------------------------------------------------------------------------
% Input:  
% X, matrix (n,p), data 
% -------------------------------------------------------------------------
% Output: 
% s, vector (1,p) containing the Sn scale estimates of the columns of X
% -------------------------------------------------------------------------
% Example:
% s=sn(X)
% -------------------------------------------------------------------------
% Reference:
% P.J. Rousseeuw, C. Croux, Alternatives to the median absolute deviation, 
% J. Am. Statist. Assoc. 88 (1993) 1273-1283
Valid CSS! Valid HTML 4.01!