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` |
---|---|

`RMETHOD` = string token |
Type of residual to use (`deviance` , `Pearson` , `simple` , `deletion` ); default `*` i.e. as set in `MODEL` |

`DMETHOD` = string token |
basis of estimate of dispersion, if not fixed by `DISPERSION` option (`deviance` , `Pearson` ); default `*` i.e. as set in `MODEL` |

`SPREADSHEET` = string tokens |
Which spreadsheets to form (`summary` , `estimates` , `fittedvalues` , `accumulated` ); default `summary` , `estimates` , `fittedvalues` |

`SPESTIMATES` = string tokens |
What to include in the estimates spreadsheet (`estimates` , `se` , `testimates` , `prestimates` ); default `esti` , `se` , `test` , `pres` |

`SPFITTEDVALUES` = string tokens |
What to include in the fitted-values spreadsheet (`y` , `fittedvalues` , `residuals` , `leverages` , `sefittedvalues` ); default `y` , `fitt` , `resi` , `leve` |

`SAVE` = regression save structure |
Specifies which analysis to save; default `*` i.e. most recent regression |

### Parameters

`Y` = variates |
Y-variate of the analysis to be saved |
---|---|

`RESIDUALS` = variates |
Identifier of variate to save the residuals from each analysis; default `residuals` |

`FITTEDVALUES` = variates |
Identifier of variate to save the fitted values from each analysis; default `fittedvalues` |

`LEVERAGES` = variates |
Identifier of variate to save the leverages from each analysis; default `leverages` |

`ESTIMATES` = variates |
Identifier of variate to save the estimates from each analysis; default `estimates` |

`SE` = variates |
Identifier of variate to save s.e.’s of the estimates from each analysis; default `se` |

`TESTIMATES` = variates |
Identifier of variate to save the t-statistics of the estimates from each analysis; default `t_statistics` |

`PRESTIMATES` = variates |
Identifier of variate to save the t-probabilities of the estimates from each analysis; default `t_probabilities` |

`SEFITTEDVALUES` = variates |
Identifier of variate to save s.e.’s of the fitted values from each analysis; default `sefittedvalues` |

`SUMMARY` = pointers |
Identifier of pointer to save the summary analysis-of-variance (or deviance) from each analysis; default `summary` |

`ACCUMULATED` = pointers |
Identifier of pointer to save the accumulated analysis-of-variance (or deviance) from each analysis; default `accumulated` |

`OUTFILENAME` = texts |
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` |
estimates with the standard errors etc., |

`fittedvalues` |
fitted values, y-variate, residuals etc., and |

`accumulated` |
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, |
---|---|

`se` |
standard errors of estimates, |

`testimates` |
t-statistics of of estimates, and |

`prestimates` |
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, |
---|---|

`fittedvalues` |
fitted values, |

`residuals` |
residuals, |

`leverages` |
leverages, and |

`sefittedvalues` |
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.

### See also

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 READ Boil,Pressure 194.50 20.79 194.25 20.79 197.90 22.40 198.43 22.67 199.45 23.15 199.95 23.35 200.93 23.89 201.15 23.99 201.35 24.02 201.30 24.105 203.55 25.14 204.60 26.57 209.47 28.49 208.57 27.760 210.72 29.040 211.95 29.879 212.18 30.064 : CALCULATE LogPressure = 100*LOG10(Pressure) MODEL LogPressure FIT [PRINT=summary,accumulated,estimates,fittedvalues] Boil RSPREADSHEET