Plots residuals from a
REML analysis (S.J. Welham).
||Which random terms to use when calculating the residuals (
||X-variable for an index plot; default
||What type of graphics to use (
||Overall title for the plots; if unset, the identifier of the y-variate is used|
||Specifies the (
||Type of residual plot (
||Pen(s) to use for each plot|
VPLOT provides up to four types of residual plots from a
REML analysis. These are selected using the
METHOD parameter, with settings:
fitted for residuals versus fitted values,
normal for a Normal plot,
halfnormal for a half-Normal plot,
histogram for a histogram of residuals,
absresidual for a plot of the absolute values of the residuals versus the fitted values, and
index for a plot against an “index” variable (specified by the
INDEX option). The
PEN parameter can specify the graphics pen or pens to use for each plot. The
TITLE option can supply an overall title. If this is not set, the identifier of the y-variate is used.
The residuals and fitted values are accessed automatically from the analysis specified by the
SAVE option. If the
SAVE option has not been set, they are taken from the
SAVE structure from the most recent
RMETHOD option controls which random terms are used to calculate the residuals:
||all the random effects,|
||only the final random term,|
||all except any random spline terms,|
||standardized residuals using all the random effects, and|
||standardized residuals using only the final random term.|
The default takes the setting from the
REML directive that produced the analysis. Note that residuals based on the final random term will not be calculated when any of the variance components are negative, as the associated negative correlations can generate very misleading patterns.
VPLOT will then generate a warning that all the residuals are missing, and you should use
By default, high-resolution graphics are used. Line-printer graphics can be used by setting option
If the y-variate in the
REML analysis was restricted, then only units included by the restriction will be used in the graphs.
Commands for: REML analysis of linear mixed models.
CAPTION 'VPLOT example',\ !t('Incomplete block design, data from Cochran & Cox',\ '(1957), Experimental Designs, p. 406.'); STYLE=meta,plain FACTOR [LEVELS=2; VALUES=25(1,2)] Reps & [LEVELS=10; VALUES=5(1...10)] Blocks & [LEVELS=25; VALUES=1...25,1,6...21,2,7...22,3,8...23,4,9...24,\ 5,10...25] Treats VARIATE [NVALUES=50] Yield READ Yield 6. 7. 5. 8. 6. 16. 12. 12. 13. 8. 17. 7. 7. 9. 14. 18. 16. 13. 13. 14. 14. 15. 11. 14. 14. 24. 13. 24. 11. 8. 21. 11. 14. 11. 23. 16. 4. 12. 12. 12. 17. 10. 30. 9. 23. 15. 15. 22. 16. 19. : VCOMPONENTS [FIXED=Treats] RANDOM=Reps+Blocks REML [PRINT=*] Yield; SAVE=S VPLOT fitted,normal,halfnormal,histogram