data(relgoods)
m<-10
ordinal<-na.omit(relgoods[,41])
model<-IHG(ordinal,summary=TRUE)
theta<-model$estimates # ML estimates for the preference parameter theta
maxlik<-model$loglik
sqerrst<-model$varmat # Squared standard error of theta
BICIHG<-model$BIC
#################################
ordinal<-relgoods[,41]
gender<-relgoods[,9]
data<-na.omit(cbind(ordinal,gender))
modelcov<-IHG(data[,1],U=data[,2],summary=TRUE)
omega<-modelcov$estimates # ML estimates (intercept term: omega[1])
maxlik<-modelcov$loglik
varmat<-modelcov$varmat
BICcov<-modelcov$BIC
Run the code above in your browser using DataLab