loglikcuben | R Documentation |
Compute the log-likelihood function of a CUBE model without covariates for ordinal responses, possibly with different vectors of parameters for each observation.
loglikcuben(m, ordinal, assepai, assecsi, assephi)
m |
Number of ordinal categories |
ordinal |
Vector of ordinal responses |
assepai |
Vector of uncertainty parameters for the given observations (with the same length as ordinal) |
assecsi |
Vector of feeling parameters for the given observations (with the same length as ordinal) |
assephi |
Vector of overdispersion parameters for the given observations (with the same length as ordinal) |
loglikCUBE
m<-8
n0<-230; n1<-270
bet<-c(-1.5,1.2)
gama<-c(0.5,-1.2)
alpha<-c(-1.2,-0.5)
pai0<-1/(1+exp(-bet[1])); csi0<-1/(1+exp(-gama[1])); phi0<-exp(alpha[1])
ordinal0<-simcube(n0,m,pai0,csi0,phi0)
pai1<-1/(1+exp(-sum(bet))); csi1<-1/(1+exp(-sum(gama))); phi1<-exp(sum(alpha))
ordinal1<-simcube(n1,m,pai1,csi1,phi1)
ordinal<-c(ordinal0,ordinal1)
assepai<-c(rep(pai0,n0),rep(pai1,n1))
assecsi<-c(rep(csi0,n0),rep(csi1,n1))
assephi<-c(rep(phi0,n0),rep(phi1,n1))
lli<-loglikcuben(m,ordinal,assepai,assecsi,assephi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.