BookmarkSubscribeRSS Feed
SAS_BW
Calcite | Level 5

Hi friends,

I am trying to get the adjusted prevalence ratios for the use of e-cig use (vs non-users) by the exposure to poor mental health in the past 30 days. The outcome is QN35 (current e-cig use coded 1 for those used it in the past 30 days vs. 2 for non-users). The exposure variable is QN85 (mental health is poor in the past 30 days: 1 - yes, 2-no). I am trying to estimate the adjusted prevalence ratio (aPR) for the use of e-cig by poor mental health while adjusting for socio-demographic variables (listed in the CLASS statement). I am modeling the use of e-cig (QN35=1) but the aPR that I get does not make sense. I mean I am expecting the aPR to be above 1 (poor mental health is associated with higher risk to use e-cig) but I am getting an aPR below 1, which is not what expected and is contradicting the direction of the OR obtained from the logistic regression modeling. All estimates I got are in the opposite direction to what is expected. When I switch to (-1) in the ESTIMATE statement (instead of 1), then I get the expected aPR (above 1). I guess I am having trouble figuring out the coding in the ESTIMATE statement and how to correctly do that. The design variable output for the exposure variable (QN85) in SAS shows that 1 (Yes) is coded as 1 while 2 (No) is coded as 0. So, when I put 1 in the ESTIMATE statement, I guess 0 is the reference (aPR for Yes vs No) but if I switch to -1, then I am estimating the aPR for No vs Yes? I am completely confused and I have no idea how to fix the code to get appropriate aPR that make sense. Any help is appreciated. The code I am using is below. TIA.

 

 

PROC GENMOD DATA=NEW ;
CLASS PSU STRATUM QN85 (REF='2') Q2 (REF='Male') NEWRACE (REF='WHITE') NEWGRADE (REF='9TH GRADE') SEXORIENTATION (REF='HETEROSEXUAL') INSTRMDL (REF='Other')/PARAM=REF;
WEIGHT WEIGHT;
MODEL QN35(event='1') = QN85 Q2 NEWRACE NEWGRADE SEXORIENTATION INSTRMDL/ Dist=poisson Link=log type3;
ESTIMATE 'RR CURRENT MENTAL HEALTH NOT GOOD YES vs. NO' QN85 1/EXP;
REPEATED SUBJECT = PSU(STRATUM);
RUN;

1 REPLY 1
SAS_BW
Calcite | Level 5

I am attaching the SAS output below.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 411 views
  • 0 likes
  • 1 in conversation