panaceapan
我的数据是这样子的:
id group phase week variable1
1 1 1 1 xxx
1 1 1 2 xxx
1 1 1 3 xxx
1 1 2 1 xxx
1 1 2 2 xxx
1 1 2 3 xxx
2 2 1 1 xxx
2 2 1 2 xxx
2 2 1 3 xxx
2 2 2 1 xxx
2 2 2 2 xxx
2 2 2 3 xxx
3 1 1 1 xxx
3 1 1 2 xxx
3 1 1 3 xxx
3 1 2 1 xxx
3 1 2 2 xxx
3 1 2 3 xxx
总结一下:若干subject, 2个 treatment group, 2 个 phase, 每个phase 3个week。
我贴一下我写的code:
proc mixed data= XXX empirical covtest;
class id group week phase;
model variable1=group week phase phase*group week*group
week*phase*group;
repeated week/ subject=id grp= group type = cs;
lsmeans phase|week|group;
ods output lsmeans=lsmeans_model1;
run;
解不出来啊,log里显示的是:
An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for ID 1。
大俠们帮我看看是咋回事吧,我的数据的格式有啥问题不?还是我不能把phase价进来,我不加phase,只有week的时候,这个model是好的。哭呀,懂得太少了。。。
谢谢。
Statsfu
group week phase phase*group week*group
week*phase*group;
应该是这里面的问题,是不是太多了? R 是指 fixed effect部分, 停止的话,因为 rank=0
探讨一下,我其实也没有好好做过。
rtist
模型太大。
另见置顶贴链接,proc mixed里面专门有一篇讲运算问题的。
Statsfu
不太明白。
An infinite likelihood during the iteration process means that the Newton-
Raphson algorithm has stepped into a region where either the R or V matrix is
nonpositive definite. This is usually no cause for concern as long as iterations
continue. If PROC MIXED stops because of an infinite likelihood, recheck
your model to make sure that no observations from the same subject are producing
identical rows in R or V and that you have enough data to estimate
the particular covariance structure you have selected. Any time that the final
estimated likelihood is infinite, subsequent results should be interpreted with
caution.
Statsfu
去掉 group=group好像可以,rlist能好好解释一下子吗?
huadli
换另一种协方差结构 type = cs type=un 或AR(1) 或去掉grp= group
另外 你必须给出你选择协方差结构和数据不均匀的理由
panaceapan
大俠们,果然,把grp=group去掉就可以解除来了。
但是换一种方差结构貌似没有作用。不大明白的说,大家有啥经验不?