rejectoutlier.m
来自「经济学专业代码」· M 代码 · 共 11 行
M
11 行
function Rejected=RejectOutlier(Sample,Index);
% this function finds the "worst" outlier in a time series.
% See Sec. 4.6.1 of "Risk and Asset Allocation" - Springer (2005), by A. Meucci
% for the theory and the routine implemented below
T=size(Sample,1);
m=mean(Sample)';
U=Sample-ones(T,1)*m';
Lambda=diag(U*inv(U'*U)*U');
[a,Rejected]=max(Lambda);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?