<<

Outliers are points which lie outside the general linear pattern of which the midline is the regression line. A rule of thumb is that outliers are points whose standardized residual is greater than 3.3 (corresponding to the .001 alpha level). The removal of outliers from the under analysis can at times dramatically affect the performance of a regression model. Outliers should be removed if there is reason to believe that other variables not in the model explain why the cases are unusual -- that is, these cases need a separate model. Alternatively, outliers may suggest that additional explanatory variables need to be brought into the model (that is, the model needs respecification). Another alternative is to use , whose algorithm gives less weight to outliers but does not discard them. The statistic, h, also called the hat-value, is available to identify cases which influence the regression model more than others.

• Belsley, Kuh, and Welsch (1980) define the leverage (hi ) of the ith observation as & 2 1 (xi x¯) hi = % n & 2 (n 1)Sx Leverage assesses how far away a value of the independent variable value is from the mean value: the farther away the observation the more leverage it has. From the definition you can see that leverage is mitigated by a larger size (any single point should have less influence) and by a larger of the independent variable (again, any single point should have less influence).

• 0

Cook's distance, D, is another measure of the influence of a case. Cook's distance measures the effect of deleting a given observation. • Observations with larger D values than the rest of the data are those which have unusual leverage. • D > 4/n the criterion to indicate a possible problem. STATA command predict D, cooksd dfbetas, is another statistic for assessing the influence of a case. • If dfbetas > 0, the case increases the slope; if <0, the case decreases the slope. • The case may be considered an influential outlier if |dfbetas| > 2/%n. STATA command dfbeta creates dfbeta’s for all variables. or predict DFx1, dfbeta(x1) for individual variables dfFit. DfFit measues how much the estimate changes as a result of a particular observation being dropped from analysis. dfits is defined as h • dfits = Rstudent i . Where Rstudent is the . i & 1 hi • The case may be considered an influential outlier if DFITS> 2/%k/n STATA command predict DFITS, dfits

Studentized residuals and deleted studentized residuals are also used to detect outliers with high leverage. A "studentized residual" is the observed residual divided by the standard . The "studentized deleted residual," also called the "jacknife residual," is the observed residual divided by the computed with the given observation left out of the analysis. Analysis of outliers usually focuses on deleted residuals. Other synonyms include externally studentized residual or, misleadingly, standardized residual. There will be a t value for each residual, with df - n - k - 1, where k is the number of independent variables. When t exceeds the critical value for a given alpha level (ex., .05) then the case is considered an outlier. In a of deleted studentized residuals versus ordinary residuals, one may draw lines at plus and minus two standard units to highlight cases outside the range where 95% of the cases normally lie; points substantially off the straight line are potential leverage problems. STATA command predict student, rstudent or predict standard, rstandard

Partial regression plots, also called partial regression leverage plots or added variable plots, are yet another way of detecting influential sets of cases. Partial regression plots are a series of bivariate regression plots of the dependent variable with each of the independent variables in turn. The plots show cases by number or label instead of dots. One looks for cases which are outliers on all or many of the plots. STATA command avplots

Example using the Murder.dta data set. reg mrdrte exec unem d90 d93

Source SS df MS Number of obs= 153 F( 4, 148) = 3.05 Model 977.390644 4 244.347661 Prob > F = 0.0190 Residual 11867.9475 148 80.1888343 R-squared = 0.0761 Adj R-squared= 0.0511 Total 12845.3381 152 84.5088034 Root MSE = 8.9548

mrdrte Coef. Std. Err. t P>t [95% Conf. Interval] exec .1627547 .1939295 0.84 0.403 -.2204738 .5459832 unem 1.390786 .4508653 3.08 0.002 .4998207 2.281751 d90 2.675335 1.816934 1.47 0.143 -.91515 6.26582 d93 1.607317 1.774768 0.91 0.367 -1.899842 5.114476 _cons -1.864393 3.069517 -0.61 0.545 -7.930134 4.201349 predict e, residual predict yhat predict standard, rstandard predict student, rstudent predict h, hat predict D, cooksd predict DFITS, dfits predict W, welsch dfbeta DFexec: DFbeta(exec) DFunem: DFbeta(unem) DFd90: DFbeta(d90) DFd93: DFbeta(d93) rvplot 60 40 20 Residuals 0 -20 0 5 10 15 Fitted values

To create a standardized residual plot graph twoway scatter standard yhat, yline(0) 8 6 4 2 Standardized residuals 0 -2

0 5 10 15 Fitted values

To identify the outliers. graph twoway scatter standard yhat, yline(0) mlabel(state) 8 DC DC 6 4

DC 2

LA Standardized residuals NY NY LA MD CAFLNCMDGA MDMS DE NCVA SCNC SCTNTNGACAGA MI NY TX NH MACT NEHINJ AZMONVINVATN NVNVAR MIILMOILFLAL ALMS 0 VTRI NE SDHINEKS PA KSORCOIN AZPAOKILVAOKKYAZALMONM AKSCNMMIAR CA SDME IAUTHIMNWIWIKSWIDEWANJOHDECTINWYCTKYWAOHOHCO ARPA NMKYAKFL MSAKTX NDNDIASD IAMNUTUTVTWYMNCOMTORMTMT NJ TX ND VTMEIDNHIDNHMAIDMAORRIWARI WV LA WYME WV WV -2

0 5 10 15 Fitted values avplots, mlabel(state)

DCDC 80

60 DC DC 60 40 DC 40

20 DC LA LA MSNYMDNC FL GATX 20 e( mrdrte | X ) NYMIMDTNCATNMDNCCTDESCNCSCGAGAVAMO TX e( mrdrte | X )

0 NVTNNHARNVVA FL VA TX KYNMAKPAARILMIOHCTKYOKILMIOHAKDECOORNMKSINMOILAZWIKYOHPAMNSCHIINIADECTNJWANEAZKSWIKSMESDMSCANJHIRIINVTNEHINVMAUTNEOKALAROKAZ ALMOFL LA AKRIWVNJORIDMACOWAIDMTRIMAVTMNWIIDNHMTWAORNDIAWYMEVTNDCOMNIANDWYSDUTUT LA NY LA WVMEWYNH MDNCNCFLNYGANCSCMDSCGATNCAMOTNARGANVMDNVMOMSTXCATNMIILNMALILSCALARALNYMIMIMSNMCA MS AK LA

0 NVAZFL OKAKAR KY DECTHINJVAVAKSVAKSCOINPANJOKAZINAZKYCTORPAMOINOKOHOHFLKYPAOHTXMTNMWACOAK WV WV NHNENEMASDVTHIRIUTIASDHINDMESDWINDNETXIAUTMNNDKSWIDEWYVTMNIAMNWACOVTMEDECTMTIDWIWYUTORNHNHIDMTMAORNJWARIRIMEID WY -20 0 10 20 30 -4 -2 0 2 4 6 e( exec | X ) e( unem | X ) coef = .16275467, se = .19392954, t = .84 coef = 1.3907856, se = .45086525, t = 3.08

80 DC DC

DC DC 60 60 40

40 DC DC 20

20 LA LA NYLA MDNY LAMDNY NCMDMS e( mrdrte | X ) MS NCMD e( mrdrte | X ) GAFLVASCNCCA TXGASCTNNCCA MOARGAILTNNVNY MDNYFLGACA NCTNGAMDNY VASCNVTNGACATX MS 0 NVNHHINJDECTAZMOTNMI FLALVANVMSILMI VAAZOKALCASCNEKSMIIN 0 DEVANCSC MI ARNVMOILAL CA AZFLNMILARALMI VTKSALMARIPAOKNMIL MOARNEOKPAKYHIAZNM FLUTDECTPANMSDHIWICOKYAK NHMACTVTRIHINJSDMENEKSMNPAWIORINAZNVMOTNOHOKILWACOALARTXKYNMMSAKNESDUTIAHINDWIVAKSMNDECOINWYVTOKCTKYAZOHTXFLPAMINJNMSCAK NEHISDNDIAUTKSWIMNCOWAVTMECTDENJINWYORPAMTOHOKMOKYMARIAK TXLAUTNDIAMNMSINSDMENEMTWIWACOKYAKOROHAR UTIDNDIAMNVTMEORMARISDMTWIKSWACONJCTDEINWYOHAK TX WAWYNHRIMTIDMAORNJIANDMNVTOH NDIAUTMTIDWY WVLA MTIDNHMAORWAMERI WV NHID WV WYWVID NHWV MEWV -20 -20 -1 -.5 0 .5 -.5 0 .5 e( d90 | X ) e( d93 | X ) coef = 2.6753348, se = 1.8169343, t = 1.47 coef = 1.6073174, se = 1.774768, t = .91

To graphically measure the influence of observations graph twoway scatter standard yhat [aweight=D], msymbol(oh) yline(0) 8 6 4 2 Standardized residuals 0 -2

0 5 10 15 Fitted values

Leverage versus residual squared plot marks the means of leverage and squared residuals. Leverage tells us how much potential for influencing the regression an observation has. lvr2plot

To examine the numerical measure for outliers. leverage h>2k/n Cook’s D>4/n DFITS>2/%k/n Welsch’s W>3/%k DFBETA>2/%n

For example, sort D list state yhat D DFITS W in -5/l

state yhat D DFITS W 149. WV 13.15609 .0150447 -.2742131 -3.513339 150. DC 6.897557 .0452811 .4927538 6.137678 151. TX 15.01208 .0504226 -.500824 -8.794935 152. DC 9.990127 .2905912 1.547051 19.3077 153. DC 11.5646 .4116747 1.832155 22.9866 Recall that D > 4/n indicates a possible problem. With n=153, D > .02614379

DFITS> 2/%k/n may be considered an influential outlier. With n=153, k=4, DFITS>12.369317