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
StatDave
SAS Super FREQ

The EVENT= option does not apply to a Poisson response. There should be a note about that in the log. More importantly, since your response is binary and you are using this Poisson approach to estimate the relative risk (prevalence ratio), your response needs to use values of 0 and 1, with 1 being the event, not 1 and 2. That is probably why the results seem backwards. Or, just use a logistic model and the NLMeans macro as shown in this note.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 1 reply
  • 445 views
  • 1 like
  • 2 in conversation