全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
6779 1
2010-09-04
SAS中GLM过程,为什么程序运行后sex的lsmeans显示Non-est?如果我把class变量变成两个,比如class sex  DHABIT;
或class sex age_g  ;程序运行后均能正常显示sex的lsmeans,可是三个class变量反而不行,请高手指教!!!

proc glm data=a;
class sex age_g  DHABIT;
model ADJ_BPAL=SEX AGE_G  DHABIT CREATI_1 AGE_G*SEX AGE_G*DHABIT SEX * DHABIT
AGE_G * SEX * DHABIT/solution;
means AGE_G SEX DHABIT;
lsmeans SEX AGE_G  DHABIT AGE_G*SEX AGE_G*DHABIT SEX * DHABIT
AGE_G * SEX * DHABIT/ stderr pdiff cl tdiff   ;
run;quit;
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2010-9-5 01:29:17
1# previal

The problem should be from non-estimable L matrix. That is, SAS finds that least square means are not estimable.
Putting a variable in CLASS statement has two consequences. The one is checking its availability even if it is not in the fitting model, and the other is treating as a categorical variable instead of continuous one. In your case, adding one more variable in the CLASS statement will tell if the added variable is classification-modelled. Obviously, 3 categorical variables will further thin or shrink the cells where to hold the events than two categorical variables. That is, the singularity may incur in the thinned cells more often; and thus a more likely resulting singular matrix will prevent SAS from calculating the estimates, here are LS means. This singularity also can result from the collinearity between variables. I would suggest that, to table the three variables and see if there are zero cells (you are in 3-way interaction, i.e., A*B*C).
Maybe more relevant way for your case to solve the problem is to enlarge the value of the option of singular= in LSMEANS statement. The default is 1E-4. However, the remedy may not work at all and thus eventually the more attention should go to your data even that works.
only my 2-cents. JingJu
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群