SAS 中Logistic回归中对于三分类以上分类变量采用class设定分类变量时,偶然会出现“
Invalid reference value error if REF='level' ”的提示,不清楚具体是什么原因。
SAS针对该问题只是提出重新将参考水平设定成first或last的方法来解决,但是这种做法太不方便,尤其当变量太多时,不仅容易出错,更容易导致结果阅读的混乱。不知道哪位知道具体原因是什么,有没有更方便的解决办法。
SAS针对该问题的说明如下:
http://support.sas.com/kb/13/510.html
Problem Note 13510: Invalid reference value error if REF='level' used for two or more variables
If, for two or more CLASS variables, you specify the REF= variable
option in the CLASS statement to identify particular reference levels
for the variables, then the following error will appear:
   ERROR: Invalid reference value for xxxxxxx.
where xxxxxxx is the name of a CLASS variable.  For example, this
statement will generate the error:
   class a(ref='1') b(ref='1');
To avoid the problem, remove the REF= options, or use REF=FIRST or LAST
instead of specifying particular values.  If you recode the variables or
assign formats so that the intended reference levels have the highest
sorted values, then you can remove the REF= options and get the desired
coding.
A fix for SAS 9.1.3 (9.1 TS1M3) for this issue is available at:
http://www.sas.com/techsup/download/hotfix/e9_sbcs_prod_list.html#013510