Hi All,
I'm using GLIMMIX for a repeated measures analysis and the code i have is below. I have ESTIMATE statements to obtain the mean values at each time point (time codes of 0,1, 2 and 3), for the two SSIP_Cohort groups. What i can't seem to wrap my head around is how to go about coding the ESTIMATE statement to determine whether the change in the outcome from time 2 to 3 is different for SSIP_Cohort=0 vs SSIP_Cohort=1. Essentially, year 3 represents the first year of a program for all schools (school_code), and those schools denoted as SSIP_Cohort=1 have received a more targeted 'dosage' of the program. I've attached a graph (png format) of the estimated means, where the gray, dashed line denotes end of the 'pre-test' period and time=3 is the first year of the 'post' period
**fixed effect of time and ssip_cohort;
proc glimmix data=sefel_train noclprint noitprint gradient pconv=.01;
class school_code ssip_cohort(ref="0");
model tch_mod17(event="1")=time time*time ssip_cohort time*ssip_cohort/link=logit dist=binary solution;
random intercept/subject=school_code type=un g gcorr;
random _residual_/subject=school_code type=ar(1) residual;
estimate "Comp Time 0" intercept 1 time 0 ssip_cohort 0 1 time*ssip_cohort 0 0 time*time 0/ilink cl;
estimate "Comp Time 1" intercept 1 time 1 ssip_cohort 0 1 time*ssip_cohort 0 1 time*time 1/ilink cl;
estimate "Comp Time 2" intercept 1 time 2 ssip_cohort 0 1 time*ssip_cohort 0 2 time*time 4/ilink cl;
estimate "Comp Time 3" intercept 1 time 3 ssip_cohort 0 1 time*ssip_cohort 0 3 time*time 9/ilink cl;
estimate "SSIP1 Time 0" intercept 1 time 0 ssip_cohort 1 0 time*ssip_cohort 0 0 time*time 0/ilink cl;
estimate "SSIP1 Time 1" intercept 1 time 1 ssip_cohort 1 0 time*ssip_cohort 1 0 time*time 1/ilink cl;
estimate "SSIP1 Time 2" intercept 1 time 2 ssip_cohort 1 0 time*ssip_cohort 2 0 time*time 4/ilink cl;
estimate "SSIP1 Time 3" intercept 1 time 3 ssip_cohort 1 0 time*ssip_cohort 3 0 time*time 9/ilink cl;
output out=predicted_tch17 predicted=eta predicted(ilink)=mu;
ods output estimates=tch17_est;
run;
Hi All,
Just as a follow-up to my post below, using the estimate statemets below you can achieve the mean values at each time point for the comparison (Comp) and treatment (SSIP) groups (the first four statements in each group). I particularly wanted to hone in on the change from time 2 to time 3. The statements below the first 4 in each group are set up to estimate the differences between various time points within each experimental group.
estimate "Comp Time 0" intercept 1 time 0 ssip_cohort 0 1 time*ssip_cohort 0 0 time*time 0 ssip_cohort*time*time[1, 0 0 2]/cl ilink;
estimate "Comp Time 1" intercept 1 time 1 ssip_cohort 0 1 time*ssip_cohort 0 1 time*time 1 ssip_cohort*time*time[1, 0 1 2]/cl ilink;
estimate "Comp Time 2" intercept 1 time 2 ssip_cohort 0 1 time*ssip_cohort 0 2 time*time 4 ssip_cohort*time*time[1, 0 2 2]/cl ilink;
estimate "Comp Time 3" intercept 1 time 3 ssip_cohort 0 1 time*ssip_cohort 0 3 time*time 9 ssip_cohort*time*time[1, 0 3 2]/cl ilink;
estimate "ssip=0, t1-t0" time 1 time*ssip_cohort 0 1 time*time 1 ssip_cohort*time*time[1, 0 1 2] /cl ilink e;
estimate "ssip=0, t2-t1" time 1 time*ssip_cohort 0 1 time*time 3 ssip_cohort*time*time[1, 0 2 2] [-1, 0 1 2]/cl ilink;
estimate "ssip=0, t3-t2" time 1 time*ssip_cohort 0 1 time*time 5 ssip_cohort*time*time[1, 0 3 2] [-1, 0 2 2]/cl ilink;
estimate "SSIP Time 0" intercept 1 time 0 ssip_cohort 1 0 time*ssip_cohort 0 0 time*time 0 ssip_cohort*time*time[1, 0 0 1]/cl ilink;
estimate "SSIP Time 1" intercept 1 time 1 ssip_cohort 1 0 time*ssip_cohort 1 0 time*time 1 ssip_cohort*time*time[1, 0 1 1]/cl ilink;
estimate "SSIP Time 2" intercept 1 time 2 ssip_cohort 1 0 time*ssip_cohort 2 0 time*time 4 ssip_cohort*time*time[1, 0 2 1]/cl ilink;
estimate "SSIP Time 3" intercept 1 time 3 ssip_cohort 1 0 time*ssip_cohort 3 0 time*time 9 ssip_cohort*time*time[1, 0 3 1]/cl ilink;
estimate "ssip=1, t1-t0" time 1 time*ssip_cohort 1 0 time*time 1 ssip_cohort*time*time[1, 0 1 1] /cl ilink;
estimate "ssip=1, t2-t1" time 1 time*ssip_cohort 1 0 time*time 3 ssip_cohort*time*time[1, 0 2 1] [-1, 0 1 1]/cl ilink;
estimate "ssip=1, t3-t2" time 1 time*ssip_cohort 1 0 time*time 5 ssip_cohort*time*time[1, 0 3 1] [-1, 0 2 1]/cl ilink;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.