powered by
Return the shifted Binomial probabilities of ordinal responses where the feeling component is explained by covariates via a logistic link.
bitgama(m,ordinal,W,gama)
A vector of the same length as ordinal, where each entry is the shifted Binomial probability for the corresponding observation and feeling value.
ordinal
Number of ordinal categories
Vector of ordinal responses
Matrix of covariates for the feeling component
Vector of parameters for the feeling component, with length equal to NCOL(W)+1 to account for an intercept term (first entry of gama)
gama
logis, probcub0q, probcubpq
logis
probcub0q
probcubpq
n<-100 m<-7 W<-sample(c(0,1),n,replace=TRUE) gama<-c(0.2,-0.2) csivett<-logis(W,gama) ordinal<-rbinom(n,m-1,csivett)+1 pr<-bitgama(m,ordinal,W,gama)
Run the code above in your browser using DataLab