SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 34686: ESTIMATE and LSMEANS table changes in PROC GENMOD beginning in SAS 9.2

DetailsAboutRate It

In SAS 9.2 TS1M0, the tables produced by the ESTIMATE and LSMEANS statements in PROC GENMOD were changed to accommodate the addition of estimates on the scale of the response mean and to provide common LSMEANS and ESTIMATE statements available across several procedures. Prior to SAS 9.2, only estimates of the linear combination of parameters (L'β) were given. Note that the L'β estimate is on the scale of the link function, not the original scale of the data. For instance, in a logistic model, the Lβ estimate is an estimated logit (log odds). The new Mean Estimate column provides estimates on the scale of the original data. Again in the case of a logistic model, the Mean Estimate is an estimated probability.

The column labeled Estimate in these tables prior to SAS 9.2 was the L'β estimate, and in SAS 9.2 releases is labeled LBeta or LBetaEstimate. The new Mean Estimate column in SAS 9.2 releases is labeled Mean or MeanEstimate and gives the estimated quantity on the scale of the response by applying the inverse link function. For example, in a log-linked Poisson model, values in the Mean Estimate column are computed as exp(L'β).

Beginning in SAS 9.2 TS2M3, the LSMEANS table no longer contains the Mean Estimate column by default. However, this can be requested by specifying the ILINK option in the LSMEANS statement. The tables from the ESTIMATE statement statement remain unchanged from earlier 9.2 releases.


Example

The following statements are used to illustrate the changes in the displayed tables and in the data sets that can be created from those tables using an ODS OUTPUT statement. The ODS OUTPUT statement saves the tables produced by the ESTIMATE and LSMEANS statements to data sets which are then displayed by the two PROC PRINT steps.

      ods output estimates=est lsmeans=lsm;
      ods select estimates lsmeans;
      proc genmod;
        class trt;
        model pain=trt age / dist=binomial;
        estimate 'age' age 1 /exp;
        lsmeans trt / cl;
        run;
      
      proc print data=lsm noobs;
        title 'LSMEANS table';
        run;
      proc print data=est noobs;
        title 'ESTIMATE table';
        run;
Tables from SAS releases prior to SAS 9.2

Following are the tables displayed by the ESTIMATE and LSMEANS statements prior to SAS 9.2.

Least Squares Means
Effect TRT Estimate Standard Error DF Chi-Square Pr > ChiSq Alpha Confidence Limits
TRT A 1.1575 0.5791 1 4.00 0.0456 0.05 0.0225 2.2924
TRT B 1.7301 0.6761 1 6.55 0.0105 0.05 0.4051 3.0552
TRT P -1.5252 0.6201 1 6.05 0.0139 0.05 -2.7406 -0.3097

Contrast Estimate Results
Label Estimate Standard Error Alpha Confidence Limits Chi-Square Pr > ChiSq
age -0.2581 0.0878 0.05 -0.4303 -0.0860 8.64 0.0033
Exp(age) 0.7725 0.0679 0.05 0.6503 0.9176    

Below are the data sets created by the ODS OUTPUT statement showing the variable names used prior to SAS 9.2.

LSMEANS table

Effect TRT Estimate StdErr DF ChiSq ProbChiSq Alpha LowerCL UpperCL
TRT A 1.1575 0.5791 1 4.00 0.0456 0.05 0.0225 2.2924
TRT B 1.7301 0.6761 1 6.55 0.0105 0.05 0.4051 3.0552
TRT P -1.5252 0.6201 1 6.05 0.0139 0.05 -2.7406 -0.3097

ESTIMATE table

Label Estimate StdErr Alpha LowerCL UpperCL ChiSq ProbChiSq
age -0.2581 0.0878 0.05 -0.4303 -0.0860 8.64 0.0033
Exp(age) 0.7725 0.0679 0.05 0.6503 0.9176 _ _


Tables from SAS 9.2 releases prior to SAS 9.2 TS2M3

Following are the tables displayed by the ESTIMATE and LSMEANS statements in SAS 9.2 releases prior to SAS 9.2 TS2M3.

Least Squares Means
Effect trt Estimate Standard Error DF Chi-Square Pr > ChiSq Alpha  
Mean L'Beta Confidence Limits
trt A 0.7609 1.1575 0.5791 1 4.00 0.0456 0.05 0.0225 2.2924
trt B 0.8494 1.7301 0.6761 1 6.55 0.0105 0.05 0.4051 3.0552
trt P 0.1787 -1.5252 0.6201 1 6.05 0.0139 0.05 -2.7406 -0.3097

Contrast Estimate Results
Label Mean Estimate Mean L'Beta Estimate Standard Error Alpha L'Beta Chi-Square Pr > ChiSq
Confidence Limits Confidence Limits
age 0.4358 0.3941 0.4785 -0.2581 0.0878 0.05 -0.4303 -0.0860 8.64 0.0033
Exp(age)       0.7725 0.0679 0.05 0.6503 0.9176    

Below are the data sets created by the ODS OUTPUT statement showing the variable names used in SAS 9.2 releases prior to SAS 9.2 TS2M3.

LSMEANS table

Effect trt Mean LBeta StdErr DF ChiSq ProbChiSq Alpha LowerCL UpperCL
trt A 0.7609 1.1575 0.5791 1 4.00 0.0456 0.05 0.0225 2.2924
trt B 0.8494 1.7301 0.6761 1 6.55 0.0105 0.05 0.4051 3.0552
trt P 0.1787 -1.5252 0.6201 1 6.05 0.0139 0.05 -2.7406 -0.3097

ESTIMATE table

Label MeanEstimate MeanLowerCL MeanUpperCL LBetaEstimate StdErr Alpha LBetaLowerCL LBetaUpperCL ChiSq ProbChiSq
age 0.4358 0.3941 0.4785 -0.2581 0.0878 0.05 -0.4303 -0.0860 8.64 0.0033
Exp(age) _ _ _ 0.7725 0.0679 0.05 0.6503 0.9176 _ _


Tables from SAS 9.2 TS2M3 and later releases

Following are the tables displayed by the ESTIMATE and LSMEANS statements in SAS 9.2 TS2M3 and later releases. Note that the ESTIMATE statement table and data set are unchanged from earlier 9.2 releases. Also, the Mean Estimate column in the LSMEANS table is not provided by default, but is available by specifying the ILINK option in the LSMEANS statement.

Contrast Estimate Results
Label Mean Estimate Mean L'Beta Estimate Standard Error Alpha L'Beta Chi-Square Pr > ChiSq
Confidence Limits Confidence Limits
age 0.4358 0.3941 0.4785 -0.2581 0.0878 0.05 -0.4303 -0.0860 8.64 0.0033
Exp(age)       0.7725 0.0679 0.05 0.6503 0.9176    

trt Least Squares Means
trt Estimate Standard Error z Value Pr > |z| Alpha Lower Upper
A 1.1575 0.5791 2.00 0.0456 0.05 0.02253 2.2924
B 1.7301 0.6761 2.56 0.0105 0.05 0.4051 3.0552
P -1.5252 0.6201 -2.46 0.0139 0.05 -2.7406 -0.3097

Below are the data sets created by the ODS OUTPUT statement showing the variable names used in SAS 9.2 TS2M3 and later releases.

LSMEANS table

StmtNo Effect trt Estimate StdErr zValue Probz Alpha Lower Upper
1 trt A 1.1575 0.5791 2.00 0.0456 0.05 0.02253 2.2924
1 trt B 1.7301 0.6761 2.56 0.0105 0.05 0.4051 3.0552
1 trt P -1.5252 0.6201 -2.46 0.0139 0.05 -2.7406 -0.3097

ESTIMATE table

Label MeanEstimate MeanLowerCL MeanUpperCL LBetaEstimate StdErr Alpha LBetaLowerCL LBetaUpperCL ChiSq ProbChiSq
age 0.4358 0.3941 0.4785 -0.2581 0.0878 0.05 -0.4303 -0.0860 8.64 0.0033
Exp(age) _ _ _ 0.7725 0.0679 0.05 0.6503 0.9176 _ _


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/STATz/OS9.2 TS1M0
Microsoft® Windows® for 64-Bit Itanium-based Systems9.2 TS1M0
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.2 TS1M0
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.2 TS1M0
Microsoft Windows XP 64-bit Edition9.2 TS1M0
Microsoft® Windows® for x649.2 TS1M0
Microsoft Windows Server 2003 Datacenter Edition9.2 TS1M0
Microsoft Windows Server 2003 Enterprise Edition9.2 TS1M0
Microsoft Windows Server 2003 Standard Edition9.2 TS1M0
Microsoft Windows XP Professional9.2 TS1M0
Windows Vista9.2 TS1M0
64-bit Enabled AIX9.2 TS1M0
64-bit Enabled HP-UX9.2 TS1M0
64-bit Enabled Solaris9.2 TS1M0
HP-UX IPF9.2 TS1M0
Linux9.2 TS1M0
Linux for x649.2 TS1M0
OpenVMS on HP Integrity9.2 TS1M0
Solaris for x649.2 TS1M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.