SAS中文论坛

 找回密码
 立即注册

扫一扫,访问微社区

查看: 620|回复: 0
打印 上一主题 下一主题

weight statement in proc logistic or proc genmod

[复制链接]

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
楼主
 楼主| 发表于 2009-2-8 16:33:32 | 只看该作者

weight statement in proc logistic or proc genmod

weight statement in proc logistic or proc genmod

Hi,

I got confused about when we should include the weight statement in the two procedures for a binomial response.

From the SAS help document example for Proc logistic, it doesn't use the weight statement for the events/trials "model" specification.

But under GLM framework, "For the binomial distribution, the response is the binomial proportion Y = events/ trials (y=r/n). VAR(Y) = u*(1-u)/n. The variance function is v(u) = u*(1-u), and the binomial trials parameter n is regarded as a weight w." This means that we should use the trials (n) as the weight. This makes sense since variance of the response varies by n (number of trials).

But if I use the "weight" statement in the procedure, the parameter estimates are quite different.

  proc logistic data=ingots;
    model r/n=Heat Soak;
    weigth n;
  run;

Could someone please help me explain this? Whether or when should I use weight for binomial response?

Thanks a lot!


Original example from SAS help document.
-------------------------------
  data ingots;
    input Heat Soak r n @@;
    datalines;
  7 1.0 0 10 14 1.0 0 31 27 1.0 1 56 51 1.0 3 13
  7 1.7 0 17 14 1.7 0 43 27 1.7 4 44 51 1.7 0 1
  7 2.2 0 7 14 2.2 2 33 27 2.2 0 21 51 2.2 0 1
  7 2.8 0 12 14 2.8 0 31 27 2.8 1 22 51 4.0 0 1
  7 4.0 0 9 14 4.0 0 19 27 4.0 1 16
  ;

  proc logistic data=ingots;
    model r/n=Heat Soak;
  run;
-------------------------------
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|小黑屋|手机版|Archiver|SAS中文论坛  

GMT+8, 2026-2-5 10:26 , Processed in 0.095626 second(s), 23 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表