options linesize=80 pagesize=60; data hivnet; infile 'HivnetIC-SAS.data'; input y visit ICgroup id month6 month12 post riskgp educ age cohort; run; proc genmod data=hivnet descending; class id riskgp; model y = ICgroup post month12 ICgroup*post ICgroup*month12 / dist=binomial link=logit; repeated subject=id / corrw type=un; run; proc nlmixed data=hivnet qpoints=20; parms B0 = 0.3000 B_ICgroup = 0.0000 B_post = 0.0000 B_month12 = 0.0000 B_IC_X_post = 0.0000 B_IC_X_month12 = 0.0000 sigma = 1.0; lp = B0 + B_ICgroup * ICgroup + B_post * post + B_month12 * month12 + B_IC_X_post * ICgroup*post + B_IC_X_month12 * ICgroup*month12; mu = exp( a + lp ) / (1 + exp( a + lp ) ); model y ~ binomial( 1, mu ); random a ~ normal( 0, sigma*sigma ) subject=id; run;