CAFE

Before, After (continuous)

작성자안재형|작성시간09.12.12|조회수374 목록 댓글 0

 

첨부파일 mcnemar.csv

proc import datafile="C:/research/McNemar/mcnemar.csv" out=mcnemar dbms=csv replace;
run;

 

/* Method 1: ANCOVA */
proc mixed data=mcnemar;
  class group;
  model after = before group / s;
*  repeated / group=group;
run;

Cov Parm     Estimate

Residual       2.9548


           Fit Statistics

-2 Res Log Likelihood           788.6
AIC (smaller is better)         790.6
AICC (smaller is better)        790.6
BIC (smaller is better)         793.9


                           Solution for Fixed Effects

                                               Standard
Effect       group           Estimate    Error      DF    t Value    Pr > |t|

Intercept                      3.3828      0.5799     197       5.83      <.0001
before                         0.7123      0.05526    197      12.89      <.0001
group                   1     -0.6364     0.2433     197      -2.62      0.0096
group                   2           0           .       .        .         .


        Type 3 Tests of Fixed Effects

              Num     Den
Effect         DF      DF    F Value    Pr > F

before          1     197     166.16    <.0001
group           1     197       6.84     0.0096

 

 

/* GEE와 LMM을 위한 데이타 변형 */

proc sql;
  create table mcnemar_long as
  select group, id, 1 as period, before as y from mcnemar union
  select group, id, 2 as period, after as y from mcnemar
;quit;

  

/* Method 2: GEE */

 proc genmod data=mcnemar_long;
  class group period id;
  model y = group | period / type3;
  repeated subject=id / type=cs;
run;

    Exchangeable Working
          Correlation

Correlation    0.6824097989
 

                                  Chi-
Source              DF     Square    Pr > ChiSq

group                1        2.76        0.0968
period               1        2.62        0.1058
group*period      1        4.94        0.0263

 

 

/* Method 3: Repeated Measure ANOVA */
proc mixed data=mcnemar_long;
  class group period id;
  model y = group | period;
  random id;
run;

Cov Parm     Estimate

id                 3.4813
Residual       1.6722

          Type 3 Tests of Fixed Effects

                  Num    Den
Effect            DF      DF    F Value  Pr > F

group              1     198       2.77    0.0978
period             1     198       2.62    0.1068
group*period    1     198       5.01    0.0263

 

다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼