BookmarkSubscribeRSS Feed
sms1891
Quartz | Level 8

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!

1 REPLY 1
cau83
Pyrite | Level 9

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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 918 views
  • 0 likes
  • 2 in conversation