How to remove leverage from data.

조회 수: 5 (최근 30일)
David Craig
David Craig 2012년 1월 18일
Hi, I am comparing two data sets and examining some statistics using 'regstats'.
My code goes something like,
Stats = regstats(data1,data1,'linear')
qqplot(Stats.r)
The plot shows some outliers in the residuals, anyone know how I can remove them??

답변 (1개)

David Craig
David Craig 2012년 1월 18일
Have made some progress, I can find the outliers but not remove them,
Stats = regstats(data1,data1,'linear')
qqplot(Stats.r)
mu=mean(Stats.r)
sigma=std(Stats.r)
[n,m]=size(Stats.r)
outliers=abs(Stats.r - mu(ones(n,1),:)) > 3*sigma(ones(n,1),:);
nout=sum(outliers)
Stats.r(any(outliers),:)=[]
qqplot(Stats.r)
Anyone got any ideas??????

카테고리

Help CenterFile Exchange에서 Model Building and Assessment에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by