![]() | ![]() | ![]() | ![]() |
If a format is specified that changes the internal order of levels of a CLASS variable in PROC SURVEYREG and either METHOD=JK or METHOD=BRR is specified, then the standard errors for estimated regression coefficients obtained with the SOLUTION option on the MODEL statement will be incorrect for the intercept and the reordered class variable.
For example, suppose the variable GENDER in the following code has the values 1 and 2, where 1 is for Male and 2 is for Female:
proc surveyreg data=dset method=jk; class gender; model y=gender / solution; run;
Since PROC SURVEYREG uses the GLM parameterization and sets the last level as the reference level, the reference level for GENDER will be 2 or Female. If you want 1 or Male to be the reference level instead, you would typically use a custom format such as this:
proc format; value genderfmt 1='Male' 2='Female'; run;
The order for character values is alphabetical, so by applying this format the class level order changes. In the following code, Female is now first and the reference level is Male.
proc surveyreg data= dset method=jk; format gender genderfmt.; class gender; model y=gender / solution; run;
This, however, results in incorrect standard errors for the Intercept and GENDER parameter estimates.
To circumvent the problem, create a new variable with the custom format and use the new variable in the model. For example:
data dset; set dset; group=put(gender, genderfmt.); run; proc surveyreg data= dset method=jk; class group; model y=group / solution; run;
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | SAS/STAT | z/OS | 9.2 TS1M0 | 9.2 TS2M3 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | 9.2 TS2M3 | ||
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M3 | ||
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M3 | ||
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | 9.2 TS2M3 | ||
Microsoft® Windows® for x64 | 9.2 TS1M0 | 9.2 TS2M3 | ||
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | 9.2 TS2M3 | ||
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | 9.2 TS2M3 | ||
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | 9.2 TS2M3 | ||
Microsoft Windows XP Professional | 9.2 TS1M0 | 9.2 TS2M3 | ||
Windows Vista | 9.2 TS1M0 | 9.2 TS2M3 | ||
64-bit Enabled AIX | 9.2 TS1M0 | 9.2 TS2M3 | ||
64-bit Enabled HP-UX | 9.2 TS1M0 | 9.2 TS2M3 | ||
64-bit Enabled Solaris | 9.2 TS1M0 | 9.2 TS2M3 | ||
HP-UX IPF | 9.2 TS1M0 | 9.2 TS2M3 | ||
Linux | 9.2 TS1M0 | 9.2 TS2M3 | ||
Linux for x64 | 9.2 TS1M0 | 9.2 TS2M3 | ||
OpenVMS on HP Integrity | 9.2 TS1M0 | 9.2 TS2M3 | ||
Solaris for x64 | 9.2 TS1M0 | 9.2 TS2M3 |