フィルターのクリア

How to remove leverage from data.

1 回表示 (過去 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 Center および File ExchangeModel Building and Assessment についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by