topic REML residuals - Bug or True Value? in Discussions
https://community.jmp.com/t5/Discussions/REML-residuals-Bug-or-True-Value/m-p/208405#M41881
<P>Hi,</P><P>I am relatively new in building models with REML. I encoutered an usual behavior of residuals and I am not sure if it is a bug or not:</P><P> </P><P>I have no preknowledge regarding the interaction of the different factors, therefore I build a model with stepwise regression (named 'SR: Response - BIC' in the data table) first, where I used the blocking factor as categorical factor. After identifiying the significant parameters, I rebuild the model with REML (named 'REML: Response' in the data table) using the same parameters as in the stepwise regression model, but I changed the blocking factor to a random effect.</P><P>After that I saved the studentized residuals of both models. The residuals of the stepwise regression model look quite 'normal'. However, the residuals of the REML model include an huge outlier (run 10), altough the actual vs. predicted plot shows no anomalies. Furthermore, the residual value for run 4 is missing and I can't explain why this is the case.</P><P>Does someone know, why ths outlier exists and why the residual is missing? Thanks in advance!</P><P> </P><P>Data description:</P><UL><LI>1 response</LI><LI>9 factors</LI><LI>1 blocking factor</LI></UL><P>Software:</P><UL><LI>JMP 14.0.0</LI></UL>Tue, 21 May 2019 13:25:52 GMTSandraSeidl2019-05-21T13:25:52ZREML residuals - Bug or True Value?
https://community.jmp.com/t5/Discussions/REML-residuals-Bug-or-True-Value/m-p/208405#M41881
<P>Hi,</P><P>I am relatively new in building models with REML. I encoutered an usual behavior of residuals and I am not sure if it is a bug or not:</P><P> </P><P>I have no preknowledge regarding the interaction of the different factors, therefore I build a model with stepwise regression (named 'SR: Response - BIC' in the data table) first, where I used the blocking factor as categorical factor. After identifiying the significant parameters, I rebuild the model with REML (named 'REML: Response' in the data table) using the same parameters as in the stepwise regression model, but I changed the blocking factor to a random effect.</P><P>After that I saved the studentized residuals of both models. The residuals of the stepwise regression model look quite 'normal'. However, the residuals of the REML model include an huge outlier (run 10), altough the actual vs. predicted plot shows no anomalies. Furthermore, the residual value for run 4 is missing and I can't explain why this is the case.</P><P>Does someone know, why ths outlier exists and why the residual is missing? Thanks in advance!</P><P> </P><P>Data description:</P><UL><LI>1 response</LI><LI>9 factors</LI><LI>1 blocking factor</LI></UL><P>Software:</P><UL><LI>JMP 14.0.0</LI></UL>Tue, 21 May 2019 13:25:52 GMThttps://community.jmp.com/t5/Discussions/REML-residuals-Bug-or-True-Value/m-p/208405#M41881SandraSeidl2019-05-21T13:25:52ZRe: REML residuals - Bug or True Value?
https://community.jmp.com/t5/Discussions/REML-residuals-Bug-or-True-Value/m-p/208423#M41885
<P>First of all, the choice of a fixed or a random effect depends on the nature of the factor and how you see its contribution to the response. Can you establish the same blocks in the future? Can you use the block level to predict future observations? That sounds like a fixed effect to me. If you cannot establish the same blocks in the future, then it is likely that the levels in this experiment are a sample and the next experiment would be a new sample of the blocks. That sounds like a random effect to me.</P>
<P> </P>
<P>Second, the studentized residual is the estimated error in the response (residual) divided by the standard error of the residual. You can see this standard error. Click the red triangle at the top and select Save Columns > Standard Error of Residual. This result is what I found:</P>
<P> </P>
<P>(Image removed for confidentiality reasons.)</P>
<P> </P>
<P>So the Studentized residual for observation 3 is unusual large because it has an unusually small standard error. (Think t-ratio) The Studentized residual for observation 7 is missing because the standard error (denominator for ratio) is missing.</P>Mon, 20 May 2019 17:10:17 GMThttps://community.jmp.com/t5/Discussions/REML-residuals-Bug-or-True-Value/m-p/208423#M41885markbailey2019-05-20T17:10:17ZRe: REML residuals - Bug or True Value?
https://community.jmp.com/t5/Discussions/REML-residuals-Bug-or-True-Value/m-p/209056#M41992
<P>Thanks for the answer and your explanation. I do not want to establish the blocks in future, so ‘Block’ is a random effect. I only used the stepwise regression model for variable selection, since this is not implemented with REML.</P><P> </P><P>Let’s assume that following formula is used to calculate the studentized residuals:</P><P><EM><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="studentized_residuals.PNG" style="width: 271px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/17282i97A0F1121133A64D/image-size/medium?v=1.0&px=400" title="studentized_residuals.PNG" alt="studentized_residuals.PNG" /></span>(<A href="https://newonlinecourses.science.psu.edu/stat501/node/401/" target="_blank" rel="noopener">https://newonlinecourses.science.psu.edu/stat501/node/401/</A>)<BR /></EM></P><UL><LI><EM>MSE(i) </EM>= mean squared error of residuals, with observation i deleted</LI><LI>hii = leverage</LI><LI>ei = yi – yihat (for a model, where observation i is deleted)</LI></UL><P>I double checked and neither MSE(i), nor ei is 0. I also checked if hii is 1, but this is not the case (<span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hat_matrix.PNG" style="width: 130px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/17281i9C6694047B62D7E9/image-size/medium?v=1.0&px=400" title="hat_matrix.PNG" alt="hat_matrix.PNG" /></span><EM><A href="https://de.mathworks.com/help/stats/hat-matrix-and-leverage.html" target="_blank" rel="noopener">https://de.mathworks.com/help/stats/hat-matrix-and-leverage.html</A></EM>). I am really curious how the standard error results in 0 or missing. How exactly is the standard error of residual calculated? Do I miss something here?</P><P> </P><P>Cheers</P>Mon, 20 May 2019 15:26:39 GMThttps://community.jmp.com/t5/Discussions/REML-residuals-Bug-or-True-Value/m-p/209056#M41992SandraSeidl2019-05-20T15:26:39Z