Programming the statistical procedures from SAS

Proc surveyreg - how to compare the differences in means for groupings

Reply
Contributor
Posts: 70

Proc surveyreg - how to compare the differences in means for groupings

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!

 

 

Super User
Posts: 10,875

Re: Proc surveyreg - how to compare the differences in means for groupings

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

 

Contributor
Posts: 70

Re: Proc surveyreg - how to compare the differences in means for groupings

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

Ask a Question
Discussion stats
  • 2 replies
  • 206 views
  • 0 likes
  • 2 in conversation