Statistical Procedures

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

Hello -

 

I have been looking and can't find out how to fit a beta-binomial model with random effects (subject).

 

In FFM there is a beta-binomial model but looks like no random effects.

 

In glimmix there is binomial with random effects but no over-dispersed binomial (beta-binomial). 

 

Anyone had experience fitting this model in SAS?

 

5 REPLIES 5
SteveDenham
Jade | Level 19

If you know the formulas for the log-likelihood, you can, with no small amount of effort, write the supporting code to fit a beta-binomial in NLMIXED or in MCMC, where you make the binomial parameter a function of the beta distribution. Mr. Google might be of some assistance here. I suppose I am saying I know what might work, but I sure don't know how to do it.

 

SteveDenham

StatDave
SAS Super FREQ

The log likelihood for the beta-binomial is shown in "Log-Likelihood Functions for Response Distributions" in the Details section of the FMM documentation. As suggested, you can use PROC NLMIXED to fit a model specifying this log likelihood and adding a RANDOM statement if desired. You can see examples of fitting a model with specified log likelihood function in this note showing this using the log likelihood for the truncated Poisson and negative binomial distributions and in this note where the zero-inflated Poisson and negative binomial are specified.

blf
Calcite | Level 5 blf
Calcite | Level 5

Hello - 

 

Thank you for this suggestion. I have the NLMIXED model working for a beta-binomial  with random effects (intercept) but for some datasets where the N is large (>150) it is failing to compute I think due to the factorial and beta functions in the beta-binomial distribution. 

 

The non-random effects Beta-binomial models works in PROC FMM but not in PROC NLMIXED (no random effects) when counts (N) are large. I have tried different optimization methods and nothing works. 

 

Any suggestions ?

 

StatDave
SAS Super FREQ

When you coded the log likelihood, this might result if you used LOG(GAMMA(...)) instead of the LGAMMA function as shown in the examples I referred to earlier.

Season
Barite | Level 11

I have no idea on the solution to this specific question, but would like to recommend the only monograph I have found on building overdispersion models with SAS: Amazon.com: Overdispersion Models in SAS: 9781607648819: Morel PhD, Jorge G., Neerchal PhD, Nagaraj:.... I have read part of it and am not sure whether it contains the answer to your specific question. But I am sure it is a good monograph for those who wish to have a systematic understanding on this field.

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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
  • 5 replies
  • 1121 views
  • 3 likes
  • 4 in conversation