BookmarkSubscribeRSS Feed
KrissyA
Calcite | Level 5

Hello, I am working with a small dataset of pregnant cannabis users.

 

I am using PROC GEE to examine the effect of preconception cannabis use (prepg_can_new, categorical 1-3) on current cannabis use (Candays, count data 0-30) across the prenatal period. Candays is a repeated measure, asked at each trimester (categorical 1-3). I am using link=log and a negative binomial distribution.

 

GOAL: I would like to exponentiate point estimates and 95% CLs so they are meaningful during interpretation (IRR).

 

When using GEE, it seems like I need to run a separate data step to do this. When I run the code below, it exponentiates betas but NOT CLs. How could I adjust this code to get exponentiated CLs?? Potential issue highlighted in red below.

 

PROC GEE DATA=RQ1_NEW;

CLASS BL_MARCH_ID TRIMESTER PREPG_CAN_NEW (ref='1');

MODEL CANDAYS = PREPG_CAN_NEW trimester PREPG_CAN_NEW*TRIMESTER /Dist=negbin LINK=log;

REPEATED SUBJECT=BL_MARCH_ID/WITHIN=TRIMESTER TYPE=EXCH;

STORE P1;

RUN;

 

ODS OUTPUT PARAMETERESTIMATES = EST;

PROC PLM SOURCE = P1;

SHOW PARAMETERS;

RUN;

 

data EST_EXP;

    set EST;

    if upcase(parameter) not in ('INTERCEPT') then do;

        IRR = exp(estimate); 

        IRR_LCL = exp(lclm); 

        IRR_UCL = exp(uclm);

    end;

run;

 

PROC PRINT DATA = EST_EXP; RUN;

1 REPLY 1
StatDave
SAS Super FREQ

What you want can be provided by adding the LSMEANS statement in your GEE step. Since your model involves the interaction of the two predictors, the effect of one of the predictors requires more than just exponentiating that predictor's main effect parameter. It must also involve parameters of the interaction. Also, since each predictor is categorical, there isn't a single estimate of its effect. A predictor's effect is assessed by a set of comparisons among its levels. This is automatically done for you by the LSMEANS statement. The following statement provides, in the Differences tables, the exponentiated comparisons among the levels of one predictor, averaged over the levels of the interacting predictor. The exponentiated estimates are ratios of mean counts. The  E option shows the combination of parameters that are involved in the computation that is exponentiated. The manner in which that averaging is done can be altered by additional options available in the LSMEANS statement - see the documentation of the LSMEANS statement.

lsmeans PREPG_CAN_NEW trimester / e diff exp cl;

 

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!

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
  • 261 views
  • 3 likes
  • 2 in conversation