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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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