betabinomialcsi: Beta-Binomial probabilities of ordinal responses, given...

Description Usage Arguments Value References See Also Examples

View source: R/betabinomialcsi.R

Description

Compute the Beta-Binomial probabilities of given ordinal responses, with feeling parameter specified for each observation, and with the same overdispersion parameter for all the responses.

Usage

1
betabinomialcsi(m,ordinal,csivett,phi)

Arguments

m

Number of ordinal categories

ordinal

Vector of ordinal responses. Missing values are not allowed: they should be preliminarily deleted or imputed

csivett

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

phi

Overdispersion parameter of the Beta-Binomial distribution

Value

A vector of the same length as ordinal: each entry is the Beta-Binomial probability for the given 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
Piccolo D. (2015). Inferential issues for CUBE models with covariates. Communications in Statistics - Theory and Methods, 44(23), 771–786.

See Also

betar, betabinomial

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(relgoods)
m<-10
ordinal<-relgoods$Tv
age<-2014-relgoods$BirthYear
no_na<-na.omit(cbind(ordinal,age))
ordinal<-no_na[,1]; age<-no_na[,2]
lage<-log(age)-mean(log(age))
gama<-c(-0.61,-0.31)
phi<-0.16 
csivett<-logis(lage,gama)
pr<-betabinomialcsi(m,ordinal,csivett,phi)
plot(density(pr))

CUB documentation built on March 31, 2020, 5:14 p.m.