BookmarkSubscribeRSS Feed
jvaugh20
Calcite | Level 5

Using SAS 9.4, I'm attempting to run a log-binomial regression model to generate prevalence ratios for the association between two variables ("race_gender," a 6-level categorical variable and "no_HIV_provider," a binary variable) adjusted for several covariates.  All covariates are binary variables except for "rel_status" and "employed," each of which are 3-level categorical variables.  The reference level = 0 for all variables.  I understand that with so many variables in the model, it is likely that the model may not converge.

 

When I ran the code below, I received the output attached, including the error message: "ERROR: The mean parameter is either invalid or at a limit of its range for some observations."  Does this mean that the model did not converge, or is there an error in my code that I need to fix?

 

If you need more information, please let me know.  Thanks for your guidance!

 

Jocelyn

 

proc genmod data = hiv.hrsaall86 descending;
class race_gender (ref='0') rel_status (ref='0') employed (ref='0')/param=ref;
model no_HIV_provider = race_gender age_at_intake homosexual ART_appropriate hs_grad rel_status homeless food_insecurity employed time_since_dx/ link=log dist=bin type3;
estimate "PR NHB male vs. NHW male" race_gender 1 0 0 0 0/exp;
estimate "PR Hisp male vs. NHW male" race_gender 0 1 0 0 0/exp;
estimate "PR NHW female vs. NHW male" race_gender 0 0 1 0 0/exp;
estimate "PR NHB female vs. NHW male" race_gender 0 0 0 1 0/exp;
estimate "PR Hisp female vs. NHW male" race_gender 0 0 0 0 1/exp;
estimate "PR age at intake" age_at_intake 1/exp;
estimate "PR homosexual vs. not homosexual" homosexual 1/exp;
estimate "PR ART appropriate vs. not" ART_appropriate 1/exp;
estimate "PR for divorced vs. single" rel_status 1 0/exp;
estimate "PR for married vs. single" rel_status 0 1/exp;

estimate "PR disabled/retired/controlled env vs. unemployed" employed 1 0/exp;
estimate "PR employed vs. unemployed" employed 0 1/exp;

estimate "PR HS grad vs. not" hs_grad 1/exp;

estimate "PR homeless vs. not" homeless 1/exp;
estimate "PR food insecure vs. not" food_insecurity 1/exp;
estimate "PR dx-ed > 2 years ago vs. not" time_since_dx 1/exp;
run;

 

1 REPLY 1
StatDave
SAS Super FREQ

That error is common when using the log link which doesn't assure that the predicted values are valid probabilities. This, and better alternatives, are discussed in this note. Probably better to simply fit a logistic model in PROC LOGISTIC or PROC GENMOD and then use the NLMeans macro as shown there.  

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1754 views
  • 0 likes
  • 2 in conversation