PROC GLM does not have an option, like the STB option in PROC REG, to compute standardized parameter estimates. However, beginning with SAS 9.1 you can obtain standardized estimates using the STB option in PROC GLMSELECT for any linear, fixed effects model.
Alternatively, you can use the STB option in PROC REG if there are no categorical variables in your model. If your model contains any categorical variables, then you can use PROC GLMMOD, PROC TRANSREG, or PROC LOGISTIC to write the design matrix to a data set. You can then fit the model in PROC REG by specifying the individual design variables in the MODEL statement. The standardized estimates are produced by specifying the STB option.
If you use PROC STANDARD to standardize the response and design variables, you can use PROC GLM to fit the model to the standardized data, which results in standardized estimates.
The following sample program demonstrates the three methods described above:
data plants; input type $ @; do block=1 to 3; input stemleng @; output; end; datalines; clarion 32.7 32.3 31.5 clinton 32.1 29.7 29.1 knox 35.7 35.9 33.1 o'neill 36.0 34.2 31.2 compost 31.8 28.0 29.2 wabash 38.2 37.8 31.9 webster 32.5 31.1 29.7 ;
PROC GLM can only compute the unstandardized estimates from the raw data. The SOLUTION option displays the estimates:
title 'GLM: unstandardized estimates'; ods select ParameterEstimates; proc glm data=plants; class type block; model stemleng = type block / solution; run; quit;
GLM: unstandardized estimates The GLM Procedure Dependent Variable: stemleng Standard Parameter Estimate Error t Value Pr > |t| Intercept 29.35714286 B 0.83970354 34.96 <.0001 type clarion 1.06666667 B 1.04729432 1.02 0.3285 type clinton -0.80000000 B 1.04729432 -0.76 0.4597 type compost -1.43333333 B 1.04729432 -1.37 0.1962 type knox 3.80000000 B 1.04729432 3.63 0.0035 type o'neill 2.70000000 B 1.04729432 2.58 0.0242 type wabash 4.86666667 B 1.04729432 4.65 0.0006 type webster 0.00000000 B . . . block 1 3.32857143 B 0.68561507 4.85 0.0004 block 2 1.90000000 B 0.68561507 2.77 0.0169 block 3 0.00000000 B . . . |
The STB option in PROC GLMSELECT allows computation of both the unstandardized and standardized estimates:
title 'GLMSELECT: unstandardized and standardized estimates'; ods select ParameterEstimates; proc glmselect data=plants; class type block; model stemleng = type block / selection=none stb showpvalues; run;
GLMSELECT: unstandardized and standardized estimates The GLMSELECT Procedure Least Squares Model (No Selection) Parameter Estimates Standardized Standard Parameter DF Estimate Estimate Error t Value Pr > |t| Intercept 1 29.357143 0 0.839704 34.96 <.0001 type clarion 1 1.066667 0.134416 1.047294 1.02 0.3285 type clinton 1 -0.800000 -0.100812 1.047294 -0.76 0.4597 type compost 1 -1.433333 -0.180621 1.047294 -1.37 0.1962 type knox 1 3.800000 0.478856 1.047294 3.63 0.0035 type o'neill 1 2.700000 0.340240 1.047294 2.58 0.0242 type wabash 1 4.866667 0.613272 1.047294 4.65 0.0006 type webster 0 0 0 . . . block 1 1 3.328571 0.565061 0.685615 4.85 0.0004 block 2 1 1.900000 0.322546 0.685615 2.77 0.0169 block 3 0 0 0 . . . |
The design matrix can be written to a data set by specifying the same model in PROC GLMMOD and including the OUTDESIGN= option:
proc glmmod data=plants noprint outdesign=design (rename=(col2=clarion col3=clinton col4=compost col5=knox col6=oneill col7=wabash col9=block1 col10=block2)); class type block; model stemleng = type block; run;
The model can now be fit in PROC REG by specifying the list of design variables, omitting the last one for each categorical variable to avoid redundancy. The STB option provides the standardized estimates:
title 'REG: unstandardized and standardized estimates'; ods select ParameterEstimates; proc reg data=design; model stemleng = clarion clinton compost knox oneill wabash block1 block2 / stb; run; quit;
REG: unstandardized and standardized estimates The REG Procedure Model: MODEL1 Dependent Variable: stemleng Parameter Estimates Parameter Standard Standardized Variable Label DF Estimate Error t Value Pr > |t| Estimate Intercept Intercept 1 29.35714 0.83970 34.96 <.0001 0 clarion type clarion 1 1.06667 1.04729 1.02 0.3285 0.13442 clinton type clinton 1 -0.80000 1.04729 -0.76 0.4597 -0.10081 compost type compost 1 -1.43333 1.04729 -1.37 0.1962 -0.18062 knox type knox 1 3.80000 1.04729 3.63 0.0035 0.47886 oneill type o'neill 1 2.70000 1.04729 2.58 0.0242 0.34024 wabash type wabash 1 4.86667 1.04729 4.65 0.0006 0.61327 block1 block 1 1 3.32857 0.68562 4.85 0.0004 0.56506 block2 block 2 1 1.90000 0.68562 2.77 0.0169 0.32255 |
The M=0 and S=1 options in PROC STANDARD standardize the variables to have mean zero and unit standard deviation.
proc standard data=design out=new mean=0 std=1; run;
Fitting the model in PROC GLM using standardized data results in standardized estimates:
title 'GLM: standardized estimates'; ods select ParameterEstimates; proc glm data=new; model stemleng=clarion clinton compost knox oneill wabash block1 block2; run; quit;
GLM: standardized estimates The GLM Procedure Dependent Variable: stemleng Standard Parameter Estimate Error t Value Pr > |t| Intercept 0.0000000000 0.09836807 0.00 1.0000 clarion 0.1344158190 0.13197462 1.02 0.3285 clinton -.1008118642 0.13197462 -0.76 0.4597 compost -.1806212568 0.13197462 -1.37 0.1962 knox 0.4788563551 0.13197462 3.63 0.0035 oneill 0.3402400418 0.13197462 2.58 0.0242 wabash 0.6132721741 0.13197462 4.65 0.0006 block1 0.5650614738 0.11639067 4.85 0.0004 block2 0.3225458198 0.11639067 2.77 0.0169 |
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | SAS/STAT | All | n/a |
Type: | Usage Note |
Priority: | low |
Topic: | SAS Reference ==> Procedures ==> REG Analytics ==> Regression Analytics ==> Longitudinal Analysis SAS Reference ==> Procedures ==> GLM SAS Reference ==> Procedures ==> GLMMOD Analytics ==> Multivariate Analysis |
Date Modified: | 2017-02-06 14:54:30 |
Date Created: | 2002-12-16 10:56:38 |