Hello, I'm using the margins macro in SAS 9.4 to calculate risk differences. My model is looking at changes in pre-pregnancy overweight and obesity (ovob) over time (time) as a function of rurality status (rural). The outcome of pre-pregnancy overweight and obesity (ovob) is dichotomous, rurality status (rural) is also dichotomous, and the time variable has 4 levels. I am currently able to get risk differences for the main effects of rurality status and time by listing them separately in the "margins" statement. However, I'm not sure how to get risk differences for the interaction time (rural*time). Any guidance would be much appreciated! I've copied my code below. %Margins(data = wicmarg, class = rural time, response = ovob, roptions = event='1' , model = rural time rural*time, dist = binomial, margins = rural, options = atmeans cl diff reverse); run;
... View more