White Test for HeteroscedasticityAnybody know if we can do this test in JMP or Pro... was asked by a customer. White Test - Wikipedia
I found an article on the SPSS website for a procedure for something similar: Procedure
Thoughts from the team?
M
Re: White Test for HeteroscedasticityDon - You rock!
Thx^9,
B
Re: White Test for HeteroscedasticityWhen I was at Amgen, I wrote a short script for Breusch-Pagan. If it's of any use, here you go:
tbl = Current Data Table();
cDlog = Column Dialog(
rCol = Col List("Residual", Max Col(1)),
pCol = Col List("Predicted Value", Max Col(1))
);
residCol = Column(cDlog["rCol"]);
predCol = Column(cDlog["pCol"]);
tbl << Fit Y by X(
Y(residCol),
X(predCol),
Fit Line({Save Residuals})
);
Column(tbl,N Col(tbl)) << Set Name("BP Resids");
bpResidCol = Column(tbl,N Col(tbl));
n = N Row(tbl);
zVec = predCol << Get as matrix;
eVec = (:BP Resids << Get as matrix);
e2Vec = eVec^2;
iVec = J(n,1,1);
zVec = iVec || zVec;
uProd = (e2Vec-Mean(e2Vec)*iVec);
eSqr = eVec`*eVec/n;
outVal = Summation(i=1,N Row(),
(residCol[i]^2 - eSqr)^2
);
e2Var = outVal/n;
bp = (uProd`*zVec*Inverse(zVec`*zVec)*zVec`*uProd)/e2Var;
pVal = 1-Chi Square Distribution(bp,2);
Show(bp,pVal)Re: White Test for Heteroscedasticitythis would be a useful test to include when looking at linearity and bias.
In a repeated measures study across the linear range of a test method, often the variation is proportional the the magnitude of the input variable. With this test I think I could answer, "Is the heteroscedasticity through the range significant?"
That would be a good thing to know.
Re: White Test for HeteroscedasticityAdditional comments: I just found this discussion https://community.jmp.com/t5/Discussions/Test-for-homo-heteroscedacity-in-JMP/m-p/7737#M7731. What he describes is what’s stated in the SPSS article. However, if the test is rejected,which is quite often, then people would want the heteroscedasticity-consistent standard errors reported.Re: White Test for HeteroscedasticityUnfortunately JMP Pro doesn't have it or the White heteroscedasticity-consistent standard errors. I'd highly recommend JMP implements both the White test and MacKinnon and White Estimators.