Plots residuals from a REML
analysis (S.J. Welham).
Options
RMETHOD = string token |
Which random terms to use when calculating the residuals (final , all , notspline , stfinal , stall ); default uses the setting from the REML statement |
---|---|
INDEX = variate or factor |
X-variable for an index plot; default !(1,2...) |
GRAPHICS = string token |
What type of graphics to use (lineprinter , highresolution ); default high |
TITLE = text |
Overall title for the plots; if unset, the identifier of the y-variate is used |
SAVE = REML save structure |
Specifies the (REML ) save structure from which the residuals and fitted values are to be taken; default * uses the SAVE structure from the most recent REML analysis |
Parameters
METHOD = string tokens |
Type of residual plot (fittedvalues , normal , halfnormal , histogram , absresidual , index ); default fitt , norm , half , hist |
---|---|
PEN = scalars, variates or factors |
Pen(s) to use for each plot |
Description
Procedure 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 REML
analysis.
The RMETHOD
option controls which random terms are used to calculate the residuals:
all |
all the random effects, |
---|---|
final |
only the final random term, |
notspline |
all except any random spline terms, |
stall |
standardized residuals using all the random effects, and |
stfinal |
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 RMETHOD=all
instead.
By default, high-resolution graphics are used. Line-printer graphics can be used by setting option GRAPHICS=lineprinter
.
Options: RMETHOD
, INDEX
, GRAPHICS
, TITLE
, SAVE
.
Parameters: METHOD
, PEN
.
Method
Residuals and fitted values effects are accessed, using VKEEP
or VFRESIDUALS
, from the REML
analysis specified by the SAVE
option. The plots are produced using the DRESIDUALS
procedure.
Action with RESTRICT
If the y-variate in the REML
analysis was restricted, then only units included by the restriction will be used in the graphs.
See also
Procedures: VDEFFECTS
, VDFIELDRESIDUALS
, VFRESIDUALS
, VGRAPH
, APLOT
, DRESIDUALS
, RCHECK
.
Commands for: REML analysis of linear mixed models.
Example
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