Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
efwelsh
Calcite | Level 5

Hi everyone! I am fairly new to SAS and am looking for some help debugging my code. For background, I have a dataset of 102 subjects. I am running a log-binomial regression to determine prevalence ratios. My outcome variable is 'comfort' which is binary, with the outcome of interest being 'comfortable=1'. My predictor variables is race/ethnicity and is nominal, coded as 1, 2, 3, and 4 (for different race/ethnicities). I am looking to get estimates of the PR and 95% CI for each group of the predictor variable compared to the referent group. 

 

I am using the following code, however, the table of 'Contrast Estimate Results' returns a result of 'Non-est' for each estimate statement. Note, due to convergence issues I am using a poisson distribution with the repeated subject line. 

proc genmod data=final;
class id race_eth_grp(ref='1');
model vagina_comfort_bin(event='1')= race_eth_grp
/ dist=poisson link=log;
repeated subject=id / type=unstr;
estimate 'PR: race_eth_grp 2 vs. 1' race_eth_grp 0 1 0 0 / exp;
estimate 'PR: race_eth_grp 3 vs. 1' race_eth_grp 0 0 1 0 / exp;
estimate 'PR: race_eth_grp 4 vs. 1' race_eth_grp 0 0 0 1 / exp;
run;

 

Screen Shot 2023-03-30 at 10.27.00 PM.png

 

 

 

 

 

 

 

 

 

 

I'm not sure what I am doing wrong and would gladly appreciate any insight. It may be important to note the skewed distribution among groups for 'race_eth_grp', with race_eth_grp=1 having 84 subjects, race_eth_grp=2 having 5 subjects, race_eth_grp=3 having 5 subjects, and race_eth_grp=4 having 8 subjects (*note this is the overall count, not the prevalence that responded comfortable to the outcome). I've tried the Firth method as well using proc logistic, however I am still running in to issues. Please let me know if any additional information is needed to help answer this! Thank you!!

1 REPLY 1
StatDave
SAS Super FREQ

You cannot compare prevalences (risks) by estimating their difference or their ratio. Neither can be done using ESTIMATE statements. You can do this as described in this note on estimating the risk difference or this note on estimating the risk ratio.  As shown, either can be done using PROC LOGISTIC followed by the NLMeans macro. The LSMEANS statement can provide the individual risks.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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