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 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 如果要比较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? 谢谢。
|
|