SAS中文论坛

标题: proc genmod repeated measurement 問題^^ [打印本页]

作者: shiyiming    时间: 2012-3-15 11:00
标题: proc genmod repeated measurement 問題^^
我現在想要計算的是有無服用抗生素對是否細菌有抗藥性的影響

0是沒有用 1是有用

我在sas 說明 裡面 有找到

用 estimate "xcc" xcc -1 1 /exp; 這樣可以把 OR值算出來

我想請問的是這樣的話是 有用的人比沒用的人的OR值嗎?

先謝過^^

我的程式是


proc genmod data=aa1 desc;
class id1 xcc/ref=first param=ref;
model group2=  age gender day xcc/d=bin link=logit;
repeated subject=id1/type=cs;
estimate "xcc" xcc -1 1 /exp;

run;
作者: shiyiming    时间: 2012-3-15 11:26
标题: Re: proc genmod repeated measurement 問題^^
应该是0 vs. 1.比较简单的验证的方法是:如果xxc的系数大于0, 那么estimate里的值在此处应该小于1. 因为model里的系数是说1 VS. 0, 和estimate的方向相反。如果不是这样的,那么我说错了。因为model里的系数的理解肯定是对的。
京剧
作者: shiyiming    时间: 2012-3-15 11:50
标题: Re: proc genmod repeated measurement 問題^^
[quote="jingju11":yo7q35cc]应该是0 vs. 1.比较简单的验证的方法是:如果xxc的系数大于0, 那么estimate里的值在此处应该小于1. 因为model里的系数是说1 VS. 0, 和estimate的方向相反。如果不是这样的,那么我说错了。因为model里的系数的理解肯定是对的。
京剧[/quote:yo7q35cc]

parameter的estimate

XCC  1  1.6115

exp (XCC) 0.1996 (0,0585-0.6803)

所以這樣就是說  恩...  0比上1 風險是 0.1996倍囉?

先謝過京劇大^^
作者: shiyiming    时间: 2012-3-15 21:40
标题: Re: proc genmod repeated measurement 問題^^
Yeah...
But ESTIMATE may be questionable; what about as the following code?

[code:1o4wy5fu]estimate 'xcc 0 vs. 1' xcc -1/exp;[/code:1o4wy5fu]
The reason is, you are using reference coding in CLASS statement but GLM coding ESTIMATE;

the identical code is

[code:1o4wy5fu]proc genmod data=a;
class xcc;
---;
estimate 'xcc 0 vs. 1' xcc 1 -1/exp;
run;[/code:1o4wy5fu]
By the way, you need to look at L'Beta estimate and its CI in ESTIMATE/CONTRAST part.

JingJu




欢迎光临 SAS中文论坛 (http://www.mysas.net/forum/) Powered by Discuz! X3.2