Code covered by the BSD License  

Highlights from
regout

Be the first to rate this file! 5 Downloads (last 30 days) File Size: 4.17 KB File ID: #8896
image thumbnail

regout

by Antonio Trujillo-Ortiz

 

01 Nov 2005 (Updated 14 Nov 2005)

Outlier test on an analysis of regression based on the externally studentized residual, R-student.

| Watch this File

File Information
Description

Among the considerations in the use of analysis of regression, outliers or bad values can seriously disturb the least-squares fit. They falls far from the line implied by the rest of the data. If these points are really outliers, then the estimate of the intercept may be incorrect and the residual mean square may be an inflated estimate of the true variance. There are methods for scaled residuals useful in finding observations that are outliers. One of them is the externally studentized residual, usually called R-student. It is based on the fact that the MSRes is an internally generated estimate of the variance obtained from fitting the model to all n observations and it is necessary to get an estimation based on a data set with the ith observation removed. This statistic follows a Student t-distribution. But one could use a Bonferroni-type approach and compare all n values of t_i to t_(alpha/2*n),n-p-1 to provide guidance regarding outliers.

Inputs:
      D - matrix data (=[X Y]) (last column must be the Y-dependent variable). (X-independent variable entry can be for a simple [X], multiple [X1,X2,X3,...Xp] or polynomial [X,X^2,X^3,...,X^p] regression model).
  alpha - significance (default = 0.05).

Outputs:
     A complete summary (table and/or plot) of the outliers diagnostic test.

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
26 Mar 2010 Natsumme

Should the test any(ti>tc,2)
be changed into any(abs(ti)>tc,2)?

Please login to add a comment or rating.
Updates
03 Nov 2005

It was added an appropriate format to cite this file.

03 Nov 2005

Text was improved.

14 Nov 2005

Text was improved.

Tag Activity for this File
Tag Applied By Date/Time
statistics Antonio Trujillo-Ortiz 22 Oct 2008 08:05:13
probability Antonio Trujillo-Ortiz 22 Oct 2008 08:05:13
outlier Antonio Trujillo-Ortiz 22 Oct 2008 08:05:13
regression analysis Antonio Trujillo-Ortiz 22 Oct 2008 08:05:13
externally studentized residual Antonio Trujillo-Ortiz 22 Oct 2008 08:05:13
rstude Antonio Trujillo-Ortiz 22 Oct 2008 08:05:13

Contact us at files@mathworks.com