全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
10230 7
2009-02-22

用nlmixed做了一个随机效应模型,运行完以后,sas给了下述警告:

The final Hessian matrix is not positive definite, and therefore the estimated covariance matrix is not full rank and
         may be unreliable.  The variance of some parameter estimates is zero or some parameters are linearly related to other parameters.

程序如下:

proc nlmixed data=mylib.quan8;
parms b0=0 b1age2=-0.2238 b2age3=-0.6074  b3age4=-0.8399
b4ind2=0.071 b5ind3=0.0915 b6ind4=0.0801 b7ind5=0.1386 b8ind6=0.1808
b9hh2=0.074 b10hh3=0.1408 b11hh4=0.1435  b12hh5=0.2304
b13edu1=0.0836 b14edu2=0.2339 b15edu3=0.2316 b16edu4=0.2262
b17gen=-0.123 b18insur=0.0679 b19res=0.1839 b20=0 b21=0 b22=0 b23=0
sd=1 i1=1 i2=1;
bounds i1>0,i2>0;
eta=b0+b1age2*age2+b2age3*age3+b3age4*age4
+b4ind2*indinc2+b5ind3*indinc3+b6ind4*indinc4+b7ind5*indinc5+b8ind6*indinc6
+b9hh2*hhinc2+b10hh3*hhinc3+b11hh4*hhinc4+b12hh5*hhinc5
+b13edu1*edu1+b14edu2*edu2+b15edu3*edu3+b16edu4*edu4+b17gen*female
+b18insur*insurance+b19res*resource+b20*time1+b21*time2+b22*time3+b23*time4+u;

if (u48a=1) then p=probnorm(-eta);else if (u48a=2) then
p=probnorm(i1-eta)-probnorm(-eta);
else if (u48a=3) then
p=probnorm(i1+i2-eta)-probnorm(i1-eta);
else p=1-probnorm(i1+i2-eta);
if (p>le-8) then ll=log(p);
else ll=-le100;
model u48a~general(ll);
random u ~ normal(0,sd*sd) subject=sample;

请问一般是什么问题才会出现上述情况?应该怎样解决?谢谢!

[此贴子已经被作者于2009-2-22 20:44:23编辑过]

二维码

扫码加我 拉你入群

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

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

全部回复
2009-2-22 23:33:00

你的模型选择出了问题,一般这种问题不是程序的问题,是你的数据

首先,应该去处相关性后在做把

二维码

扫码加我 拉你入群

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

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

2009-2-23 10:05:00
以下是引用爱萌在2009-2-22 23:33:00的发言:

你的模型选择出了问题,一般这种问题不是程序的问题,是你的数据

首先,应该去处相关性后在做把

谢谢楼上的回复。不过还是不太明白(刚刚开始接触,水平有限)。楼上的意思应该是说由于自变量间高度相关

才出现了这种问题吗?

我的自变量都是二元虚拟变量,该怎么去除相关性啊?

最好能把程序推荐一下,呵呵。

再次感谢!

二维码

扫码加我 拉你入群

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

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

2009-2-23 16:24:00

再问一下,我把自变量删除只剩下一个,还出现这种问题,是不是可以排除相关性的原因了?

还请高手解答,感激涕零!

二维码

扫码加我 拉你入群

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

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

2009-2-28 17:27:00

LZ,从 SAS 程序给出的警告信息看,是说 最后的 Hessian 矩阵非正定,因此所估计的 协方差矩阵 非满秩 阵,可能不太可靠 。一些参数估计值的方差为 0,而另有一些参数线性相关。

所以,LZ 不妨从 Hessian 矩阵非正定入手,解决所出现的问题

The final Hessian matrix is not positive definite, and therefore the estimated covariance matrix is not full rank and         

   may be unreliable.  The variance of some parameter estimates is zero or some parameters are linearly related to other parameters

二维码

扫码加我 拉你入群

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

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

2009-3-4 08:23:00

谢谢指教。我把自变量调整了一下,减了几个变量,不再出现问题了。虽然从理论上没有弄明白,但是先把活干完吧。

再次表示感谢。

[此贴子已经被作者于2009-3-4 8:24:10编辑过]

二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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