Home > freetb4matlab > outliers > outlier.m

outlier

PURPOSE ^

% Find value with largest difference from the mean

SYNOPSIS ^

function [out] = outlier(x,opposite,logical)

DESCRIPTION ^

% Find value with largest difference from the mean
% 
% Description:
% 
%      Finds value with largest difference between it and sample mean,
%      which can be an outlier.
% 
% Usage:
% 
%      [out] = outlier(x,opposite,logical) 
% 
% Arguments:
% 
%        x: a data sample, vector in most cases. If argument is a
%          matrix, each column is treated as independent dataset. 
% 
% opposite: if set to 1 (default 0), gives opposite value (if largest value has
%           maximum difference from the mean, it gives smallest and vice
%           versa)
% 
%  logical: if set to 1 (default 0), gives vector of logical values, and possible
%           outlier position is marked by 1, others are 0
% 
% Value:
% 
%      A vector of value(s) with largest difference from the mean.
% 
% Author(s):
% 
%      Lukasz Komsta, ported from R package 'outliers'.
%    See R News, 6(2):10-13, May 2006
%      
%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003