Hi, I have been asked to analyse a survey taken of ~1500 persons at two time points (baseline and baseline + 24 mths) as part of a cohort study. It is unbalanced due to dropout and top up and the waves are unevenly spaced: both T1 and T2 surveys were collected over a 6 month period. The outcome is binary and represents attendance or otherwise at a support service. There are four kinds of support services and respondents can attend any or all of them. My job is to simply determine whether there were differences in attendance by group (race, district) and if the likelihood of attendance of a service in T2 was greater than in T1. Control variables include age and existinghealthissue (yes/no)
I am fairly new to this type of modelling having only done various types of survival analysis and clean repeated measures designs to date, so I'm unsure how to specify this in SAS. I understand that PROC GLIMMIX is able to specify binary logistic repeated measures but I get stuck specifying the random effects part and then get confused about whether this is the correct way to answer the question. I have also looked at GEE models which seem more intuitively simple as I have a policy background, however I don't think they will answer the second of my questions. I also wonder whether GLIMMIX is overkill.
SAS version 9.4
Example data:
ID Time Race District Age existinghealthissue AttSvc1
ID1 T1 1 2 19 1 0
ID1 T2 1 2 19 1 1
ID2 T1 2 1 25 1 1
ID3 T1 1 1 29 0 1
ID3 T2 1 1 29 0 1
Could you use ESTIMATE , CONTRAST statement in proc genmod or proc gee ? check the PROC GENMOD: Example 44.5: GEE for Binary Data with Logit Link Function
That's a similar approach to the one I was taking before thinking I needed to go down the random effects path which has greatly confused me.
The code I have written for GEE follows the example you provided, however the key difference between my data and the example is that there are no treatments per se, nor is there a control group which makes me confused about how to specify the model when looking at that example.
Here is the code I have previously written - I am unsure whether the repeated measures block is specified correctly. I am also unsure how to interpret the results of this model given the example does not provide an indication that the link is logit.
proc genmod data = survey;
class
id
time (ref = "T2")
race (ref = "0")
district (ref = "0")
existingcond (ref = "0")
/param = ref;
model attsvc1 = time race district age existingcond / dist = bin;
repeated subject = id / corr = unstr corrw;
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.