Hi all, I'm trying to create a graphical display with similar notation to the one above (taken from Warton 2020) from an ITS analysis that was run for me. I have mean distress scores by year which I've graphed in the following:
Here's the code I used to generate graphic above:
Data AimII_Table2;
input TimeElapsed Year Distress Event $;
datalines;
0 2011 3.7339771 Before
1 2012 3.8688698 Before
2 2013 3.8669976 Before
3 2014 3.5876379 Before
4 2015 3.64495 Before
5 2016 3.4850532 Before
5 2017 3.4850532 Before
6 2017 3.6610487 After
7 2018 3.5467001 After
;
Proc sgplot data=AimII_Table2;
Xaxis Values=(2011 TO 2018);
Yaxis Values=(1 TO 25);
reg x=Year y=Distress/group=Event ;
refline 2017 / axis=x label='Event' Transparency = 0.5;
Title'Distress over Time';
run;
I also have coefficients from the ITS for time, exposure to event, and their interaction.
How does one code the notation showing:
1) counterfactual lines
2) the estimates for the betas for time, intervention, and interaction term?
Thank you!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.