BookmarkSubscribeRSS Feed
einstein
Quartz | Level 8

I am trying to compare the % of adults who are uninsured with hypertension in 2013 vs. 2014 for democratic states and similarly for republican states.  See table below:

 

Hypertension
Democratic StatesDemocratic StatesRepublican StatesRepublican States
2013201420132014
12.4%10.0%18.7%14.0%

 

 

 

For this, I used the proc surveyreg procedure to get at the means and compare them to see if they were statistically significant.  However, what I really want to do is compare the difference in means between 2013 and 2014 for democratic states compared to republican states to see if its statistically significant.

 

So using the example data above, is a 2 percentage point difference for democratic states statistically different from the 4% percentage point difference for republican states.  Does anyone know how I can calculate that?

 

 

proc surveyreg data=one; 
strata strat_p; 
cluster psu_p; 
class srvy_yr dem_or_repub; 
model hypertension = srvy_yr*dem_or_repub/ vadjust=none; 
lsmeans srvy_yr dem_or_repub srvy_yr*dem_or_repub / diff; 
weight wtfa_sa; 
run;

 

Thanks!

 

 

2 REPLIES 2
ballardw
Super User

Why did you start with Surveyreg (other than you likely had a complex sample)?

 

einstein
Quartz | Level 8

Yes, that's correct its a complex survey design.

sas-innovate-2024.png

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.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 1571 views
  • 0 likes
  • 2 in conversation