Chapter 14, Section 14.7

 

 

Clinical Trial of Contracepting Women

 

 

 

Random Effects Logistic Regression Model

 

 

data amen;
     infile 'amenorrhea.dat';
     input id trt time y;

ctime=time;
time2=time*time;

title1 Random Effects Logistic Regression Model for Odds of Amenorrhea;
title2 Clinical Trial of Contracepting Women;

proc glimmix method=quad(qpoints=50) noclprint;

     nloptions gconv=1E-12;

     class id;

     model y = time time2 trt*time trt*time2 / dist=binomial link=logit solution;

     random intercept / subject=id g;   

     contrast '2 df Test of Trt X Time Interaction' trt*time 1, trt*time2 1 / chisq;
run;

<Selected Output>

 

 

Marginal Logistic Regression Model 

 


title1 Marginal Logistic Regression Model for Odds of Amenorrhea;
title2 Clinical Trial of Contracepting Women;

proc genmod  descending;
    class id ctime;
    model y = time  time2 trt*time trt*time2  / d=binomial link=logit;
    repeated  subject=id / withinsubject=ctime logor=fullclust;
run;

<Selected Output>

 

 

Conditional Logistic Regression Model 

 


title1 Conditional Logistic Regression Model for Odds of Amenorrhea;
title2 Clinical Trial of Contracepting Women;

proc logistic  descending;

    strata id;

    model y = time  time2 trt*time trt*time2; 

run;

<Selected Output>

 

 

 

Clinical Trial of Epileptic Patients

 

 

Random Effects Log-Linear Regression Model

 

 

data seizure;
     infile 'epilepsy.dat';
     input id trt age y0 y1 y2 y3 y4;
          y=y0; visit=0; output;
          y=y1; visit=1; output;
          y=y2; visit=2; output;
          y=y3; visit=3; output;
          y=y4; visit=4; output;
          drop y0-y4;


proc sort;
by id visit;

data seizure;
     set seizure;
     if visit=0 then do; 
          time=0; 
          ltime=log(8); 
     end;
     else do; 
          time=1; 
          ltime=log(2); 
     end;


title1 Mixed Effects Log-linear Regression Model (Random Intercept and Slope);
title2 Clinical Trial of Epileptic Patients;

proc glimmix method=quad(qpoints=50);

     class id;

     model y = time trt trt*time / dist=poisson link=log offset=ltime solution;

     random intercept time / subject=id type=un g;   
run;

<Selected Output>

 

 

****************************************************************************;

*   Remove Subject ID 49, a potential outlier, from the analysis   *;

****************************************************************************;
data seizure;
     set seizure;
     if (id ne 49);

title1 Mixed Effects Log-linear Regression Model (Random Intercept and Slope);
title2 Analysis Excluding Patient 49 (Potential Outlier);
title3 Clinical Trial of Epileptic Patients;

proc glimmix method=quad(qpoints=50);

     class id;

     model y = time trt trt*time / dist=poisson link=log offset=ltime solution;

     random intercept time / subject=id type=un g;   
run;

<Selected Output>

 

 

title1 Mixed Effects Negative Binomial Regression Model (Random Intercept and Slope);
title2 Analysis Excluding Patient 49 (Potential Outlier);
title3 Clinical Trial of Epileptic Patients;

proc glimmix method=quad(qpoints=50);

     class id;

     model y = time trt trt*time / dist=negbin link=log offset=ltime solution;

     random intercept time / subject=id type=vc g;   
run;

 

<Selected Output>

 

 

 

Arthritis Clinical Trial

 

 

Random Effects Proportional Odds (Ordinal) Regression Model

 

 

data arthritis;
     infile 'arthritis.dat';
     input id trt age y1 y2 y3 y4;

data arthritis;
     set arthritis;
     y=y1; month=0; output;
     y=y2; month=2; output;

     y=y3; month=4; output;
     y=y4; month=6; output;
run;

 

data arthritis;

     set arthritis;

     if y=. then delete;

**********************************************************;
*   Transform  month = square-root(month)            *;
**********************************************************;
sqrtmonth=month**0.5;


title1 Random effects proportional odds regression model for global impression scale;
title2 Arthritis Clinical Trial;

proc glimmix method=quad(qpoints=30) noclprint;

     nloptions gconv=1E-12;

     class id;

     model y = trt sqrtmonth trt*sqrtmonth / d=mult link=cumlogit solution;

     random intercept sqrtmonth / subject=id type=un g;  

     parms (1 to 5 by 0.5) (-.5 to .5 by .1) (0.1 to 1 by 0.1);
run;

<Selected Output>