BookmarkSubscribeRSS Feed
maciulei
Fluorite | Level 6

Hi all, 

 

I working on conducting mediation analysis (linear, logistic, multinomial, and ordinal) using NHANES data that requires inputing survey weights, cluster, and strata. So far, I've been using the code (with macro) from Linda Valeri and Tyler J. VanderWeele, 2013. However, that code doesn't allow me to include the weight, cluster, and strata, and I can only run linear and logistic models. I've been searching for other codes and found the paper by May, Ha, and Soulakova 2019 that can handle survey adjustments, but I am having a hard time learning how to use it, particularly the Fay method that's indicated (code attached). Has anyone dealt with this before or has better suggestions?

 

Thank you,

P.S. I am using SAS 9.4 

2 REPLIES 2
katblack
Fluorite | Level 6

Here's some information that might be helpful for you about the survey analysis features available in SAS https://www.lexjansen.com/nesug/nesug08/sa/sa06.pdf

This provides info for info for logistic and linear regression. 

 

 

 

This resource may also be helpful, and some of their examples use NHANES data

https://stats.idre.ucla.edu/sas/seminars/sas-survey/

 

maciulei
Fluorite | Level 6

Thanks for the resources, but I am familiar with how to do linear and logistic regressions using the survey specifications. My issue is running a mediation code with macros and adding those survey specifications. 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 2 replies
  • 1453 views
  • 2 likes
  • 2 in conversation