Hi all,
I have a time series data with rate of blood cultures per 1000 pts for 34 months (before and after intervention, indicated by Variable "Intervention" - 0=before intervention, 1= after intervention). Month variable is recorded from Jan 2015 through Oct 2017. I want to see if intervention made a difference in rate of blood cultures (i.e. decrease in the blood culture rate). How do I test this to show a significant difference (with p-value)? Also please explain me how to get the % change in Y-axis for the blood culture rates and slope.
I have no clue how to test this in SAS. Any help with is much appreciated. I am attaching the data (excel sheet) below with the variables.
Data Variables:
1. Cult_Per_1000pts
2. Month (jan2015 to Oct 2017)
3. Intervention (0/ 1 - 0 for months before intervention, 1 for months after intervention)
4. Time (1- 34, indication months in order from beginning (jan2015) to end (oct2017)
Thank you very much in advance!
I don't know if this is exactly what you're looking for.
ods graphics on;
proc ucm data=Culture_Rates_for_SAS;
irregular;
slope plot=smooth;
level plot=smooth;
model cult_per_1000pts=intervention;
estimate;
run;
This will show a negative, significant effect of intervention. But that does not get at a change in the slope.
If you remove "=intervention", and then examine the slope plot, the slope doesn't change. Perhaps there is not a significant change in the slope, but the intervention is successful in achieving a one-time drop in the level.
To address the % change question:
data Culture_Rates_for_SAS;
set Culture_Rates_for_SAS;
log_cult=log(cult_per_1000pts);
ods graphics on;
proc ucm data=Culture_Rates_for_SAS;
irregular;
slope plot=smooth;
level plot=smooth;
model log_cult=intervention;
estimate;
run;
If you log the culture variable, your interpretation of the intervention coefficient and the slope are now % change. Rather than a decrease of 4 units, intervention is -16.7% and the slope is about -2.2%. This would imply that the slope is getting flatter: 2.2% decreases will be of smaller nominal value as the culture level approaches zero.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.