Saves estimates and other information about individual terms in a regression analysis.
||Limit on number of factors and variates in a model term; default 3|
||Response variate for which results are to be saved; default is the last response variate in the save structure|
||Provides the regression save structure for the analysis from which the estimates are to be saved; default
||Model terms for which information is required|
||Table or scalar to store the estimated regression coefficients for each term|
||Table or scalar to store the standard errors of the estimated regression coefficients|
||Table or scalar to store the variances and covariances between the estimates of each term|
||Number of degrees of freedom for each term|
||Positions of the estimates in the variate of estimates as saved from
RKESTIMATES allows you to save estimates and other information about terms in a regression or generalized linear model analysis into Genstat data structures. You do not need to declare the structures in advance; Genstat will declare them automatically to be of the correct type and size.
By default the results are saved from the most recent analysis, that is for the last y-variate in the most recent
MODEL statement. Alternatively, you can use the
SAVE option to specify the save structure from another analysis (see the
SAVE option of
MODEL). Again, the default is to save the information for the last y-variate, but you can use the
Y option to specify another one.
TERMS parameter specifies a model formula, which Genstat expands to form the series of model terms about which you wish to save information. As in
FACTORIAL option sets a limit on the number of factors and variates in each term. Any term containing more than that limit is deleted. The subsequent parameters allow you to specify identifiers of data structures to store the various types of information for each of the terms that you have specified. The
ESTIMATES parameter saves estimates for each term, in a table if the term involves factors or in a scalar if it involves only variates. Similarly the
SE parameter saves standard errors for the estimates. The
VCOVARIANCE parameter saves the variances and covariances between the estimates of each term, in a symmetric matrix if the term involves factors or in a scalar if it involves only variates. The
DF parameter saves the number of degrees of freedom for the terms, in scalars. Finally, the
POSITIONS parameter saves the positions where the estimates can be found in the variate of estimates that would be saved by the
ESTIMATES parameter of
RKEEP when its option
EXPAND=yes. (This allows you, for example, to obtain correlations between the estimates of different terms out of the variance-covariance matrix that can be saved by the
VCOVARIANCE parameter of
Commands for: Regression analysis.
" Examples 2:3.2, 2:3.2.1-6, 2:3.2.7a-b, 2:3.2.8 " " Multiple linear regression of the heat given out by setting cement on four chemical constituents. Data from Woods, Steinour & Starke (1932); analysed by Draper & Smith (1981) p.629." OPEN '%GENDIR%/Examples/GuidePart2/Cement.dat'; CHANNEL=2 READ [PRINT=data; CHANNEL=2] X[3,1,4,2],%gypsum,Heat " Analyse only those samples with 3.2% gypsum." RESTRICT Heat; %gypsum==3.2 MODEL Heat " Constituents are: X tricalcium aluminate X tricalcium silicate X tetracalcium aluminoferrite X beta-dicalcium silicate " FIT [FPROBABILITY=yes; TPROBABILITY=yes] X RDISPLAY [PRINT=accumulated; FPROBABILITY=yes] RKESTIMATES X; ESTIMATES=Est[1...4]; SE=se[1...4] PRINT Est,se,Est,se,Est,se,Est,se; FIELD=10,8 TERMS [PRINT=correlation] X ADD [PRINT=deviance,estimates; TPROBABILITY=yes] X[1,2,4] DROP [PRINT=deviance,estimates; TPROBABILITY=yes] X SWITCH [PRINT=estimates,accumulated; FPROBABILITY=yes;\ TPROBABILITY=yes] X[2,4] TRY X[2,3] FIT [FPROBABILITY=yes; TPROBABILITY=yes] X RWALD FIT [PRINT=*] X STEP [INRATIO=4; OUTRATIO=4; FPROBABILITY=yes; TPROBABILITY=yes] X[1...4] TERMS X STEP [PRINT=changes; INRATIO=4; OUTRATIO=4; MAXCYCLE=10] X RDISPLAY [FPROBABILITY=yes; TPROBABILITY=yes] RSEARCH [METHOD=allpossible] X[1...4] CLOSE 2