由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - 请教一下sas proc logistic里contrast statement的用法
相关主题
求高人给看一下我的contrast写的对吗?请问:如果Odds Ratio 小于1怎么办?
a question for odds ratio estimate for logistic regression.请问:Age 什么时候应该 ’分段', 什么时候不分呢?
问大牛一个proc glm的问题R 里面 logistic regression (glm)怎么样输出 Odds Ratio 的 confidence interval
Proc mixed contrast有人知道这是什么回事?proc genmod.
请教SAS proc logistic 的一个问题请问关于SAS做logistic reg的问题
怎么得到unadjusted odds ratio in proc logistic有关logistic里的woe
怎样得到estimated prob. of event in SAS Logistic Regquestions on case-control and cross-sectional studies
[合集] odds ratio >999.99新手请教proc IML里do loop的问题
相关话题的讨论汇总
话题: prog话题: vs话题: contrast话题: logistic话题: proc
进入Statistics版参与讨论
1 (共1页)
s*********o
发帖数: 42
1
如果要比较varialbe prog 的level 2 vs. level 3, 以及group 1 和 group 2 之间的
区别。prog 一共有3个level.
sas code如下:
proc logistic data = hsb2;
class prog/param=glm;
model hiwrite(event="1")=female read math prog;
contrast '1 vs 2 of prog' prog 1 -1 0/estimate;
run;
请问这里是怎样给prog做coding 的,为什么prog是1 -1 0, 为什么 contrast '1 vs 2
of prog' ,给出来的是1 vs 3 and 2 vs 3的odds ratio estimate? 谢谢。
q********i
发帖数: 795
2
You are looking at the wrong table from the output.
The odds ratios for 1 vs 3, 2 vs 3 is there because of your specification of
the design matrix.
You have a correct contract, to get the odds ratio of 1 vs 2, simply take
exponential of the estimate from the last table of the sas output.
Another way to get the or of 1 vs 2 or 3 vs 2 is to change the design matrix
, e.g
proc logistic data = hsb2;
class prog (ref='2')/param=ref;
model hiwrite(event="1")=female read math prog;
run;
which will set 2

【在 s*********o 的大作中提到】
: 如果要比较varialbe prog 的level 2 vs. level 3, 以及group 1 和 group 2 之间的
: 区别。prog 一共有3个level.
: sas code如下:
: proc logistic data = hsb2;
: class prog/param=glm;
: model hiwrite(event="1")=female read math prog;
: contrast '1 vs 2 of prog' prog 1 -1 0/estimate;
: run;
: 请问这里是怎样给prog做coding 的,为什么prog是1 -1 0, 为什么 contrast '1 vs 2
: of prog' ,给出来的是1 vs 3 and 2 vs 3的odds ratio estimate? 谢谢。

1 (共1页)
进入Statistics版参与讨论
相关主题
新手请教proc IML里do loop的问题请教SAS proc logistic 的一个问题
用proc glm 怎么看哪个trt better? 3个包子答谢!!!!!!怎么得到unadjusted odds ratio in proc logistic
请教:怎么能把Logistic regression的OR转化成probablity怎样得到estimated prob. of event in SAS Logistic Reg
请问个odds ratio 和 CI的问题[合集] odds ratio >999.99
求高人给看一下我的contrast写的对吗?请问:如果Odds Ratio 小于1怎么办?
a question for odds ratio estimate for logistic regression.请问:Age 什么时候应该 ’分段', 什么时候不分呢?
问大牛一个proc glm的问题R 里面 logistic regression (glm)怎么样输出 Odds Ratio 的 confidence interval
Proc mixed contrast有人知道这是什么回事?proc genmod.
相关话题的讨论汇总
话题: prog话题: vs话题: contrast话题: logistic话题: proc