How to remove leverage from data.

3 visualizaciones (últimos 30 días)
David Craig
David Craig el 18 de En. de 2012
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??

Respuestas (1)

David Craig
David Craig el 18 de En. de 2012
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??????

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by