楼主: shfujim
11144 5

[问答] likelihood ratio test [推广有奖]

  • 2关注
  • 1粉丝

萝卜头

已卖:381份资源

博士生

46%

还不是VIP/贵宾

-

威望
0
论坛币
388 个
通用积分
5.4339
学术水平
0 点
热心指数
1 点
信用等级
0 点
经验
1369 点
帖子
194
精华
0
在线时间
261 小时
注册时间
2007-12-3
最后登录
2024-10-1

楼主
shfujim 发表于 2010-11-29 15:39:48 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
请教如何在SAS中进行LRT检验,在MIXED中么?是哪个选项阿?
先谢谢了
二维码

扫码加我 拉你入群

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

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

关键词:Likelihood ratio like test ATI test Likelihood ratio

回帖推荐

shfujim 发表于6楼  查看完整内容

自己搞明白了,如果有大虾有不同意见,请指正。我主要参考 http://support.sas.com/kb/24/447.html#ex4 Constructing a Likelihood Ratio Test Note that the two models above are considered nested because the main-effects model is just the saturated model with several parameters (the interaction parameters) set to zero. You can compare two nested models by computing a likelihood ratio (LR) test statistic ...

本帖被以下文库推荐

学生,很普通的学生

沙发
liyi3344520 发表于 2010-11-29 16:31:24
是在mixed model,

eg.proc mixed method=reml;
I must be strong and carry on'Cause I know I don't belong here in heaven...

藤椅
shfujim 发表于 2010-11-29 16:50:19
我的代码是这样的
DATA SPLIT;
  INPUT BLOCK A B Y @@;
  DATALINES;
  1 1 1 56  1 1 2 41
  1 2 1 50  1 2 2 36
  1 3 1 39  1 3 2 35
  2 1 1 30  2 1 2 25
  2 2 1 36  2 2 2 28
  3 1 1 32  3 1 2 24
  3 2 1 31  3 2 2 27
  3 3 1 15  3 3 2 19
  4 1 1 30  4 1 2 25
  4 2 1 35  4 2 2 30
  4 3 1 17  4 3 2 18
  ;
PROC MIXED METHOD=REML;
   CLASS A B BLOCK;
   MODEL Y=A B A*BLOCK;
   RANDOM BLOCK A*BLOCK;
RUN;
执行结果中没有列出Model Fitting Information for Y,这一结果,不明白为什么,请教大虾。
结果中并没有列出LRT的结果啊 ?
学生,很普通的学生

板凳
bobguy 发表于 2010-12-1 07:47:41
shfujim 发表于 2010-11-29 16:50
我的代码是这样的
DATA SPLIT;
  INPUT BLOCK A B Y @@;
  DATALINES;
  1 1 1 56  1 1 2 41
  1 2 1 50  1 2 2 36
  1 3 1 39  1 3 2 35
  2 1 1 30  2 1 2 25
  2 2 1 36  2 2 2 28
  3 1 1 32  3 1 2 24
  3 2 1 31  3 2 2 27
  3 3 1 15  3 3 2 19
  4 1 1 30  4 1 2 25
  4 2 1 35  4 2 2 30
  4 3 1 17  4 3 2 18
  ;
PROC MIXED METHOD=REML;
   CLASS A B BLOCK;
   MODEL Y=A B A*BLOCK;
   RANDOM BLOCK A*BLOCK;
RUN;
执行结果中没有列出Model Fitting Information for Y,这一结果,不明白为什么,请教大虾。
结果中并没有列出LRT的结果啊 ?
Add solution in the model statement as

MODEL Y=A B A*BLOCK/solution;

Hope this helps.

报纸
shfujim 发表于 2010-12-10 12:10:15
/solution选项好像不能打印出LRT吧,这个是打印出截距和自变量的系数的吧。我的是SAS8.2 版本的,这个是不是和版本也有关系的阿? 4# bobguy
我的目的是打印出和附件里面的图的效果,最后三行的检验结果如何打印呢?前面的几项都打印出来了的。

未命名.JPG (55.66 KB)

未命名.JPG

学生,很普通的学生

地板
shfujim 发表于 2010-12-10 14:57:12
自己搞明白了,如果有大虾有不同意见,请指正。我主要参考
http://support.sas.com/kb/24/447.html#ex4
Constructing a Likelihood Ratio Test
Note that the two models above are considered nested because the main-effects model is just the saturated model with several parameters (the interaction parameters) set to zero. You can compare two nested models by computing a likelihood ratio (LR) test statistic, which is twice the ratio of the models' likelihood values, or equivalently and more conveniently, twice the difference in their log likelihood values. For these models, twice the difference in their log likelihoods is 8.228. The LR statistic is chi-square distributed with degrees of freedom (DF) equal to the number of parameters being tested—seven in this case, because there are seven DF that are associated with the four interactions. To get a p-value for the LR statistic, use the PROBCHI function in the DATA step. The following statements produce a p-value for the LR test comparing the main-effects and saturated models:

data lrt;
   lr=2*(-682.2478 - -686.3618);
   df=7;
   p=1-probchi(lr,df);
   run;
proc print noobs;
   format p pvalue.;
   run;
The null hypothesis being tested is that the saturated and main-effects models are equivalent. For this to be true in this example, the interaction parameters must all be zero. So, the null hypothesis can be stated generally as model equivalency, or in this example it can be stated as lack of interaction. The results show that the null hypothesis cannot be rejected (p=.3129).
学生,很普通的学生

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-30 04:51