Thank you for providing the information. If I want to take the ITS code for a two-group, one-stage design with a continuous response and modify it to a two-group, two-stage design, how should I change it? If I also want to include covariates (categorical variables), where in the syntax should I place those variables? /*two-group, one-stage, continuous response*/ data ITS.COST;
set VAR.COST;
if MO >= 4 then iv1 = 1; else iv1 = 0; *iv1:在第3個月介入;
if MO >= 6 then iv2 = 1; else iv2 = 0; *iv2:在第5個月介入;
month=MO;
y=cost;
expiv = catx('_', put(MCC, 1.), put(iv1, 1.));
ph = catx('_', put(MCC, 1.), put(iv1, 1.), put(iv2, 1.));
run;
proc gee data=ITS.COST;
class id expiv;
model y = expiv expiv*month / noint;
repeated subject=id;
effectplot slicefit(x=month sliceby=expiv) / extend=data clm;
estimate
'compare group slopes, pre' expiv*month -1 0 1 0,
'compare group slopes, post' expiv*month 0 -1 0 1,
'compare period slopes, unexposed' expiv*month -1 1 0 0,
'compare period slopes, exposed' expiv*month 0 0 -1 1,
'compare post-pre slope changes' expiv*month 1 -1 -1 1,
'1 month change unexposed' expiv -1 1 0 0 expiv*month -3 4 0 0,
'1 month change exposed' expiv 0 0 -1 1 expiv*month 0 0 -3 4,
'1 month change diff' expiv 1 -1 -1 1 expiv*month 3 -4 -3 4;
run; Likewise, for the ITS code for a two-group, one-stage design with a binary response, how would I convert it to a two-group, two-stage design and add covariates? /*two-group, one-stage, binary response*/ data ITS.poly; set VAR.poly; if MO >= 4 then iv1 = 1; else iv1 = 0; *iv1:在第3個月介入; if MO >= 6 then iv2 = 1; else iv2 = 0; *iv2:在第5個月介入; if MO<=3 then MO1 = MO; else if MO>=4 then MO1=MO-3; month=MO; y=poly; expiv = catx('_', put(MCC, 1.), put(iv1, 1.)); ph = catx('_', put(MCC, 1.), put(iv1, 1.), put(iv2, 1.)); run;
proc gee data= ITS.poly;
class id expiv;
model y(event="1") = expiv month expiv*month / dist=bin noint;
repeated subject=id;
run;
proc gee data=ITS.poly;
class id expiv;
model y(event="1") = expiv expiv*month / dist=bin noint;
repeated subject=id;
effectplot fit(x=month plotby(pack)=expiv) / clm;
effectplot fit(x=month plotby(pack)=expiv) / link clm;
estimate 'm3 log odds' expiv 1 0 expiv*month 3 0 / ilink;
estimate 'm4 log odds' expiv 0 1 expiv*month 0 1 / ilink;
estimate 'm3 to m4 odds ratio' expiv -1 1 expiv*month -3 1 / exp cl;
store gee;
run;
... View more