i trying find average change in score survey response pre post @ different levels of aggregation using 2 different methods. in method 1 called "raw method", calculate average of pre scores , average of post scores , take difference. in method 2 " genmod method", use pre , post categorical variable , estimate of interaction term (stage2*rso). why not estimate method 2 match average change in scores in method 1? dataset has multiple pre's , posts each patient (empi). simple problem need understanding. heres dataset , code:
empi provider rso score stage 1001 x 16.5 pre 1001 x 22.2 post 1001 x 14.3 pre 1001 x 23.4 post 111 x 25.6 pre 1002 b x 32.3 pre 1002 b x 12 post 1001 x 24.3 pre 1002 b x 15.6 pre 1002 b x 23.7 post 112 x 10.2 pre 1234 c y 13.5 pre 1234 c y 34.2 post 1234 c y 12.3 pre /** method 1 **/ proc sql; create table rsoscores select stage2, rso, avg(score) avg test1 group stage2, rso; quit; /** method 2 **/ proc genmod data=test1; class empi rso stage2; model score = stage2 rso stage2*rso; repeated subject = empi/ type=un corrw; ods output geeemppest = mygee_pes; run;
Comments
Post a Comment