BookmarkSubscribeRSS Feed
cmc_NYC
Fluorite | Level 6

cmc_NYC_0-1641925432361.png

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: 

this might work to share.png

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!

 

1 REPLY 1
rapheal21
Calcite | Level 5
hey, I am a newcomer and this is really interesting, can I get some more details about it so that I can completely learn these. thanks!

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 610 views
  • 0 likes
  • 2 in conversation