BookmarkSubscribeRSS Feed
AudreyM
Calcite | Level 5

When i run my Proc Genmod, i have the message "ERROR: Floating Point Zero Divide". 

 

PROC GENMOD DATA = _1;
  CLASS TRTP1-TRTP3 country1-country21 NEXTGR11-NEXTGR12 FEVPGR11-FEVPGR13;
  MODEL AVAL = TRTP1-TRTP3 country1-country21 NEXTGR11-NEXTGR12 FEVPGR11-FEVPGR13 /
  OFFSET=LNFUDUR2 DIST=negbin LINK=log;
  BAYES SEED=22022021 COEFFPRIOR=uniform THIN=100 OUTPOST= dataset2 NMC=100000;
RUN;

 

i am trying to find solutions and i have seen that if i modify AVAL values by AVAL+1 then the model runs (it means that instead of having a range of values between 0 and 5, it is now between 1 and 6).

 

Is that an acceptable solution (i have tried and a small number of data and i have a slight variation of results)?

 

Thanks

2 REPLIES 2
Ksharp
Super User
I saw you used "OFFSET=LNFUDUR2" , if AVAL is a count variable(or Poisson distribution),
you can't have 0 be the value of AVAL ,it must be a positive integer number.
StatDave
SAS Super FREQ

You might try adding the NOLOGNB option in the MODEL statement. If that, or your solution, results in an estimated negative binomial dispersion parameter near zero, then you probably should just use the Poisson distribution. Or, if you don't need a Bayesian analysis, you could try PROC GLIMMIX instead. By the way, if your groups of same-named predictors are dummy variables that you created to represent multi-level categorical variables, then you can instead simply put the individual multi-level variable names in both the CLASS statement and the MODEL statement. For a variable in both statements, the CLASS statement creates dummy variables for you and puts them in the model.

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