Handout 5 Levine, Wilks Shapiro Tests

Handout 5 Levine, Wilks Shapiro Tests - Stat 404(Fall 2006...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Stat 404 (Fall 2006) Modified Levene Test for Heterogeneity of Variances 1. Run your model (whether simple, multiple, polynomial or other); output and plot the residuals. Proc Reg; model y = X/ p xpx i stb influence; output out=out1 r=e1 p = yhat1; run; Proc plot; plot e1*X e1*yhat1; run; 2. If the residual plot looks heterogeneous, find the median of X (or the median level of y ˆ ). Proc freq; tables X; run; or Proc univariate; var X; run; 3. Divide your data set into 2 groups at the median level of X (or at the median level of y ˆ ). Data; set; If X le <median> then D = 1; If X gt <median> then D = 2; 4. Find the median value of the residual, i e ~ , for each of the two groups (it may be a negative number). Proc sort; by D; Proc univariate; var e1 ; by D; run ; 5. Calculate the absolute deviations from the median in each group. 1 1 ~ 1 e e d i - = 2 2 ~ 2 e e d i - = Data; set; If D = 1 then d1 = abs(e1 - 1 ~ e ); If D = 2 then d1 = abs(e1 - 2 ~ e ); 6. Compute a t-test to compare the
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/18/2012 for the course STAT 404 taught by Professor Staff during the Spring '08 term at Iowa State.

Page1 / 2

Handout 5 Levine, Wilks Shapiro Tests - Stat 404(Fall 2006...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online