Purpose
Write the parameters in the current model to a file. The output includes the parameter estimates with standard errorsand, optionally, (AMFIT and GMBO only), stratum parameter estimates.
Syntax
PSAVE {TO fname} {LABEL text} {APPEND NOAPPEND} {STRATA} @
Arguments and Subcommands
TO fname
The name of the output file. The default filename is sessname.psv, where sessname is the current session name.
APPEND | NOAPPEND
Controls whether the new results should be appended to an existing file or whether the file should be overwritten. APPEND is the default.
STRATA
In AMFIT and GMBO the stratum parameters can also be written to the file.
Remarks
The output is a comma-separated value file that can contains information on the form of the model, the number of parameters, the deviance, parameter estimates, standard errors, and the parameter covariance matrix.
The file begins with two header records. The first header record contains a string describing the model. This string can be defined by the user using the LABEL subcommand. The second header record consists of a comma-separated list with the following items:
|
Field # |
Contents |
|
Record 1 | |
|
1 |
Model description |
|
Record 2 | |
|
1 |
Module name string: AMFIT – Poisson regression PEANUTS – Cox regression GMBO – Conditional or unconditional logistic / binomial regression |
|
2 |
Model form code: 1
– additive ERR model: 2
– RR model: 3
– Additive (EAR) model 5
– Multiplicative ERR model |
|
3 |
Total number of parameters, including fixed and aliased parameters (nparm) |
|
4 |
Number of free parameters |
|
5 |
Records used |
|
6 |
Number of strata parameters |
|
7 |
Degrees of freedom (Poisson and unconditional logistic/binomial regression) |
|
8 |
Deviance |
|
9 |
Number of risk sets (Cox and conditional logistic regression models) |
|
10 |
Number of informative risk sets (Cox and conditional logistic regression models) |
|
Records 3 to nparm+2 (one record per parameter) | |
|
1 |
Parameter number |
|
2 |
Term number (0 to 5) |
|
3 |
Subterm type: 0 – linear 1 – log-linear 2 – product linear |
|
4 |
Parameter name string (as in Epicure model summary) |
|
5 |
Parameter status 0 – Free (estimated) 1 – Fixed by user (not estimated) 2 – Aliased (not estimated since it is equivalent to a function of other covariates in the model) |
|
6 |
Parameter estimate |
|
7 |
Parameter standard error (coded as . for fixed or aliased parameters) |
|
8 to |
Covariance matrix row with elements (coded as . for fixed or aliased parameters |
Stratum parameter records (Poisson and logistic regression models only) if requested. Information on stratum number and parameter estimate for up to10 estimates per record.
Examples
a) Write parameter estimates to a file with the default name overwriting any previously created parameter save file with this session name. Then fit a new model and append the parameter estmates to the parameter save file created for the intial fit.
FIT@
PSAVE LABEL “Fist model” NOAPPEND
@
LOGL 1 + sex @
FIT @
PSAVE LABEL “Second model with sex as effect modifier”
@
b) Append the parameter estimates to the file param.csv with label Sample Model
PSAVE TO param.csv LABEL “Sample model” @