1. Home

Puts results from a regression, generalized linear or nonlinear model into a spreadsheet (R.W. Payne).

### Options

`DISPERSION` = scalar Dispersion parameter to be used as estimate for variability in s.e.s; default as set in `MODEL` Type of residual to use (`deviance`, `Pearson`, `simple`, `deletion`); default `*` i.e. as set in `MODEL` basis of estimate of dispersion, if not fixed by `DISPERSION` option (`deviance`, `Pearson`); default `*` i.e. as set in `MODEL` Which spreadsheets to form (`summary`, `estimates`, `fittedvalues`, `accumulated`); default `summary`, `estimates`, `fittedvalues` What to include in the estimates spreadsheet (`estimates`, `se`, `testimates`, `prestimates`); default `esti`, `se`, `test`, `pres` What to include in the fitted-values spreadsheet (`y`, `fittedvalues`, `residuals`, `leverages`, `sefittedvalues`); default `y`, `fitt`, `resi`, `leve` Specifies which analysis to save; default `*` i.e. most recent regression

### Parameters

`Y` = variates Y-variate of the analysis to be saved Identifier of variate to save the residuals from each analysis; default `residuals` Identifier of variate to save the fitted values from each analysis; default `fittedvalues` Identifier of variate to save the leverages from each analysis; default `leverages` Identifier of variate to save the estimates from each analysis; default `estimates` Identifier of variate to save s.e.’s of the estimates from each analysis; default `se` Identifier of variate to save the t-statistics of the estimates from each analysis; default `t_statistics` Identifier of variate to save the t-probabilities of the estimates from each analysis; default `t_probabilities` Identifier of variate to save s.e.’s of the fitted values from each analysis; default `sefittedvalues` Identifier of pointer to save the summary analysis-of-variance (or deviance) from each analysis; default `summary` Identifier of pointer to save the accumulated analysis-of-variance (or deviance) from each analysis; default `accumulated` Name of Genstat workbook file (.gwb) or Excel (.xls or .xlsx) file to create

### Description

`RSPREADSHEET` puts results from a regression, generalized linear or nonlinear model into a spreadsheet. By default the results are from the most recent regression, but you use the `SAVE` option to specify the save structure (from a `MODEL` statement) from some other analysis. You can use the `Y` parameter to indicate the y-variate, if the `SAVE` structure contains results from more than one.

The `SPREADSHEET` option specifies which pages of the spreadsheet to form, with settings:

    `summary` summary analysis of variance (or deviance for a generalized linear model), estimates with the standard errors etc., fitted values, y-variate, residuals etc., and summary analysis of variance (or deviance for a generalized linear model).

By default, `SPREADSHEET=summ,esti,fitt`.

The `SPESTIMATES` option specifies which columns to include in the estimates spreadsheet, with settings:

    `estimates` estimates, standard errors of estimates, t-statistics of of estimates, and t-probabilities of estimates.

By default they are all included.

The `SPFITTEDVALUES` option specifies which columns to include in the estimates spreadsheet, with settings:

    `y` y-variate, fitted values, residuals, leverages, and standard errors of fitted values.

By default `SPFITTEDVALUES=y,fitt,resi,leve`.

To help avoid clashes between the columns of the spreadsheets if you want to save results from more than one analysis, the parameters `RESIDUALS`, `FITTEDVALUES`, `LEVERAGES`, `ESTIMATES`, `SE`, `TESTIMATES`, `PRESTIMATES`, `SEFITTEDVALUES`, `SUMMARY`, `ACCUMULATED` allow you to specify identifiers for the columns (or sets of columns) that will store the corresponding results in the current spreadsheets. Their defaults are mainly the same as the parameter names, but in lower-case letters. The exceptions are that `TESTIMATES` and `PRESTIMATES` have defaults `t_statistics` and `t_probabilities`, respectively.

You can save the data in either a Genstat workbook (.gwb) or an Excel spreadsheet (.xls or .xlsx), by setting the `OUTFILENAME` option to the name of the file to create. If the name is specified without a suffix, `'.gwb'` is added (so that a Genstat workbook is saved). If `OUTFILENAME` is not specified, the data are put into a spreadsheet opened inside Genstat.

Options: `DISPERSION`, `RMETHOD`, `DMETHOD`, `SPREADSHEET`, `SPESTIMATES`, `SPFITTEDVALUES`, `SAVE`.

Parameters: `Y`, `RESIDUALS`, `FITTEDVALUES`, `LEVERAGES`, `ESTIMATES`, `SE`, `TESTIMATES`, `PRESTIMATES`, `SEFITTEDVALUES`, `SUMMARY`, `ACCUMULATED`, `OUTFILENAME`.

### Action with `RESTRICT`

If the `Y` variate is restricted, that restriction will carry over into the fitted-values spreadsheet.

Directive: `SPLOAD`.

Procedures: `ADSPREADSHEET`, `ASPREADSHEET`, `AUSPREADSHEET`, `FSPREADSHEET`, `VSPREADSHEET`.

Commands for: Regression analysis.

### Example

```CAPTION 'RSPREADSHEET example',\
!t('Model atmospheric pressure on boiling point',\
'(data from Atkinson, 1985, Plots, Transformations & Regression).');\
STYLE=meta,plain
VARIATE [NVALUES=17] Boil,Pressure