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;
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!!
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 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.