BookmarkSubscribeRSS Feed
berylsky1
Fluorite | Level 6

Hello,

 

I'm new to proc surveylogistic and am trying to figure out what kind of statement I need to use for stratified analysis.

I would like to stratify by nativity (1=US born, 2=foreign born) but I am not sure how to do. 

 

/*Model1*/
PROC SURVEYLOGISTIC DATA=vaccine2;
weight WEIGHTS_A7; 
domain Nativity;
Model vaxhesitant=PHD_R1;
strata Nativity; 
run;

Question #1 : what statement should I use between domain and strata for stratified analyses? If these statements are not correct, could anyone please provide the right statement and how to use it?

Question #2 : In addition to the stratified analysis, I need to run the subpopulation analyses as well. In this case, what statement do I need to use? When googling the subpopulation analysis in SAS, it says I can use "domain" statement but I am confused whether I can use "domain" statement for stratified and subpopulation analyses. 

 

Thank you for your assistance!

1 REPLY 1
ballardw
Super User

DOMAIN is the statement for doing Subpopulation analysis. If you have multiple subpopulations then they go on the domain statement. You sample design did not include Nativity then that is a subpopulation, not a stratification variable.

 

Did you actually run the code you show? Did it not provide

 

STRATA are sample design in the survey procedures. I don't think that you are using "stratified" in a sample description but if that is your intent that would be STRATA statement with the strata variables from the sample design. Strata have effects on how variability is used in weighting. Due to a quirk in the implementation of the SAS survey procedures you cannot also use a Strata variable as an analysis level. You would have to add a second variable with the same value as the strata and include in either the Model statement or Domain statement, depending on actual use.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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