/* Fit a linear logistic model with a clinic-specific effect to a data set from a multi-center clinical trial. (1) Using a random-effect model (2) Using the conditional likelihood approach */ options ls=80 center pagesize=60 number label; data clin; input clinic trt $ fav unfav ; nij=fav+unfav; datalines; 1 drug 11 25 1 cntl 10 27 2 drug 16 4 2 cntl 22 10 3 drug 14 5 3 cntl 7 12 4 drug 2 14 4 cntl 1 16 5 drug 6 11 5 cntl 0 12 6 drug 1 10 6 cntl 0 10 7 drug 1 4 7 cntl 1 8 8 drug 4 2 8 cntl 6 1 ; %inc '/home/gopher/sasmacros/glimxv12.sas' / nosource; /* no convergence: %glimmix(data=clin, procopt=method=reml, stmts=%str( class clinic trt; model fav/nij = trt/ solution; random clinic / solution; ), error=binomial, link=logit, converge=1e-6, maxit=400 ) */ /* to increase convergence: */ data new; set clin; do i=1 to fav; y=1; output; end; do i=1 to unfav; y=0; output; end; %glimmix(data=new, procopt=method=reml, stmts=%str( class clinic trt; model y = trt/ solution; random clinic / solution; ), error=binomial, link=logit ) /* Conditional likelihood approach */ data new2; set new; dumbtime=2-y; if trt='drug' then isctl=0; else isctl=1; proc phreg data=new2; model dumbtime*y(0) = isctl / ties=discrete; strata clinic; title1 "Conditional likelihood"; *************Random-effects model: Cov Parm Estimate CLINIC 2.05663184 Parameter Estimates Effect TRT Estimate Std Error DF t Pr > |t| INTERCEPT -0.4243 0.5555 7 -0.76 0.4699 TRT cntl -0.7273 0.2882 264 -2.52 0.0122 TRT drug 0.0000 . . . . Random Effects Estimates Effect CLINIC Estimate SE Pred DF t Pr > |t| CLINIC 1 -0.1376 0.5788 264 -0.24 0.8122 CLINIC 2 1.8181 0.5968 264 3.05 0.0026 CLINIC 3 0.9581 0.6008 264 1.59 0.1120 CLINIC 4 -1.3470 0.6935 264 -1.94 0.0531 CLINIC 5 -0.5982 0.6495 264 -0.92 0.3579 CLINIC 6 -1.6712 0.7960 264 -2.10 0.0367 CLINIC 7 -0.7526 0.7653 264 -0.98 0.3263 CLINIC 8 1.7305 0.7192 264 2.41 0.0168 Tests of Fixed Effects Source NDF DDF Type III F Pr > F TRT 1 264 6.37 0.0122 ***************Conditional likelihood Testing Global Null Hypothesis: BETA=0 Without With Criterion Covariates Covariates Model Chi-Square -2 LOG L 257.398 250.907 6.491 with 1 DF (p=0.0108) Score . . 6.384 with 1 DF (p=0.0115) Wald . . 6.246 with 1 DF (p=0.0124) Analysis of Maximum Likelihood Estimates Parameter Standard Wald Pr > Risk Variable DF Estimate Error Chi-Square Chi-Square Ratio ISCTL 1 -0.756259 0.30259 6.24638 0.0124 0.469