options ls=72 ps=72; /*------------------------------------------------------*/ /* */ /* Proc Genmod to fit population average (marginal) */ /* model using GEE approach for the indonesian children */ /* infection disease data */ /* */ /*------------------------------------------------------*/ data indon; infile "indon.dat"; input id infect intercep age xero cosv sinv sex height stunted visit baseage season visitsq; time = age-baseage; run; data indon; set indon; nobs = _n_; run; title "Print the first 20 observations"; proc print data=indon (obs=20); var id infect season xero age sex height visit; run; title "Model 1: independence working correlation"; proc genmod descending; class id; model infect = season xero baseage time sex height / dist=bin link=logit scale=pearson aggregate=nobs; repeated subject=id / type=ind; run; title "Model 2: Use exchangeable working correlation"; proc genmod descending; class id; model infect = season xero baseage time sex height / dist=bin link=logit scale=pearson aggregate=nobs; repeated subject=id / type=exch corrw; run; title "Model 3: Use AR(1) working correlation"; proc genmod descending; class id visit; model infect = season xero baseage time sex height / dist=bin link=logit scale=pearson aggregate=nobs; repeated subject=id / type=ar within=visit corrw; run; title "Model 4: Use unstructured working correlation"; proc genmod descending; class id visit; model infect = season xero baseage time sex height / dist=bin link=logit scale=pearson aggregate=nobs; repeated subject=id / type=un within=visit corrw; run;