# Beta-Binomial probabilities of ordinal responses, with feeling and overdispersion parameters for each observation

### Description

Compute the Beta-Binomial probabilities of ordinal responses, given feeling and overdispersion parameters for each observation.

### Usage

1 | ```
betabinomial(m, ordinal, csivett, phivett)
``` |

### Arguments

`m` |
Number of ordinal categories |

`ordinal` |
Vector of ordinal responses |

`csivett` |
Vector of feeling parameters of the Beta-Binomial distribution for the given ordinal responses |

`phivett` |
Vector of overdispersion parameters of the Beta-Binomial distribution for the given ordinal responses |

### Details

The Beta-Binomial distribution is the Binomial distribution in which the probability of success at each trial is not fixed but random and follows the Beta distribution. It is frequently used in Bayesian statistics, empirical Bayes methods and classical statistics as an overdispersed binomial distribution.

### Value

A vector of the same length as ordinal, containing the Beta-Binomial probability of each observation, for the corresponding feeling and overdispersion parameters.

### References

Iannario, M. (2014). Modelling Uncertainty and Overdispersion in Ordinal Data,
*Communications in Statistics - Theory and Methods*, **43**, 771–786

### See Also

`betar`

, `betabinomialcsi`

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 | ```
data(relgoods)
m<-10
ordinal<-relgoods[,37]
age<-2014-relgoods[,4]
lage<-log(age)-mean(log(age))
nona<-na.omit(cbind(ordinal,lage))
ordinal<-nona[,1]
gama<-c(-0.6, -0.3)
csivett<-logis(lage,gama)
alpha<-c(-2.3,0.92)
phivett<-1/(-1+1/(logis(lage,alpha)))
pr<-betabinomial(m, ordinal, csivett, phivett)
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.