1. Home
  2. RDISPLAY directive

RDISPLAY directive

Displays the fit of a linear, generalized linear, generalized additive or nonlinear model.

Options

PRINT = string tokens What to print (model, deviance, summary, estimates, correlations, fittedvalues, accumulated, confidence); default mode,summ,esti
CHANNEL = identifier Channel number of file, or identifier of a text to store output; default current output file
DENOMINATOR = string token Whether to base ratios in accumulated summary on rms from model with smallest residual ss or smallest residual ms (ss, ms); default ss
NOMESSAGE = string tokens Which warning messages to suppress (dispersion, leverage, residual, vertical, df, inflation); default *
FPROBABILITY = string token Printing of probabilities for variance and deviance ratios (yes, no); default no
TPROBABILITY = string token Printing of probabilities for t-statistics (yes, no); default no
SELECTION = string tokens Statistics to be displayed in the summary of analysis produced by PRINT=summary, seobservations is relevant only for a Normally distributed response, and %cv only for a gamma-distributed response (%variance, %ss, adjustedr2, r2, seobservations, dispersion, %cv, %meandeviance, %deviance, aic, bic, sic); default %var, seob if DIST=normal, %cv if DIST=gamma, and disp for other distributions
DISPERSION = scalar Dispersion parameter to be used as estimate for variability in s.e.s; default is as set in the MODEL statement
RMETHOD = string token Type of residuals to display (deviance, Pearson, simple); default is as set in the MODEL statement
DMETHOD = string token Basis of estimate of dispersion, if not fixed by DISPERSION option (deviance, Pearson); default is as set in the MODEL statement
PROBABILITY = scalar Probability level for confidence intervals for parameter estimates; default 0.95
DFDISPERSION = scalar allows you to specify the number of degrees of freedom for a dispersion parameter specified by the DISPERSION option; default is as set in the MODEL statement
SAVE = identifier Specifies save structure of model to display; default * i.e. that from latest model fitted

No parameters

Description

RDISPLAY produces further output from a linear, generalized linear, generalized additive or nonlinear model. The PRINT option has the same settings as in the FIT directive, except that no monitoring is available. The CHANNEL option selects the output channel to which the results are output, as in the PRINT directive; this may be a text structure, allowing output to be stored prior to display. The DENOMINATOR, NOMESSAGE, FPROBABILITY, TPROBABILITY, SELECTION and PROBABILITY options are also as in the FIT directive.

The RMETHOD option allows you temporarily to change the method of forming residuals, for the output of the current statement only, in the same way as the corresponding option in the MODEL directive sets the default method of formation. Similarly, the DMETHOD option temporarily changes the method used to calculate the residual variability to be displayed for a generalized linear model, the DISPERSION option allows you (temporarily) to set the dispersion parameter, and the DFDISPERSION option allows you to define the number of degrees of freedom for a specified dispersion parameter. These again operate like the corresponding options of MODEL (except that they apply only to the current statement).

The SAVE option lets you specify the identifier of a regression save structure; the output will then relate to the most recent regression model fitted with that structure.

Options: PRINT, CHANNEL, DENOMINATOR, NOMESSAGE, FPROBABILITY, TPROBABILITY, SELECTION, DISPERSION, RMETHOD, DMETHOD, PROBABILITY, DFDISPERSION, SAVE.

Parameters: none.

See also

Directives: MODEL, FIT, FITCURVE, FITNONLINEAR, PREDICT.

Procedures: RCHECK, RGRAPH, RDESTIMATES, RCOMPARISONS, RTCOMPARISONS, RWALD, FIELLER, RFUNCTION.

Commands for: Regression analysis.

Example

" Example FIT-1: Simple linear regression

  Modelling the relationship between counts of apples from 12 trees
  (recorded as 100s of fruit) and percentage damage by codling moth.
  (Snedecor & Cochran, Statistical analysis, 1980, p162.)"

VARIATE [VALUES= 8, 6,11,22,14,17,18,24,19,23,26,40] Cropsize
&       [VALUES=59,58,56,53,50,45,43,42,39,38,30,27] Wormy
DGRAPH  Wormy; Cropsize

" It is expected that the larger the crop is the less the damage will be,
  since the density of the flying moths is unrelated to the crop size.
  Try fitting a linear model relating the percentage of damage directly
  to the size of the crop."
MODEL Wormy
FIT Cropsize

" Tree number 4 seems different from the rest: perhaps it was not
  adequately protected by the standard spraying programme, or was on the
  side from which the codling moths flew in to the orchard.
  Tree number 12 has a much larger crop than the rest: the results of the
  regression are strongly influenced by this one observation.
  Display all the fitted values, residuals and leverages (influence)."
RDISPLAY [PRINT=fittedvalues]

" Check the effect of omitting tree number 4."
RESTRICT Wormy; .NOT.EXPAND(4; 12)
FIT [PRINT=summary] Cropsize

" Return to the complete dataset, and display the fitted line."
RESTRICT Wormy
FIT [PRINT=*] Cropsize
RGRAPH [GRAPHICS=high]

" Plot the fitted values against the residuals, to check that the
  variance is roughly constant; use the procedure RCHECK from the
  Genstat Procedure Library."
RCHECK [GRAPHICS=high] residual; fittedvalues
Updated on June 18, 2019

Was this article helpful?