Learn R Programming

CUB (version 0.1)

cushforsim: Simulation routine for CUSH models without covariates

Description

Fit CUSH models without covariates to given ordinal data. It is useful for simulation experiments since it performs the same steps as CUSH, but with no printed output.

Usage

cushforsim(m, ordinal, shelter)

Arguments

m
Number of ordinal categories
ordinal
Vector of ordinal responses
shelter
Category corresponding to the shelter choice

Value

An object of the class "CUSH", with null output for $BIC since the routine is only for simulation purposes

See Also

CUSH

Examples

Run this code
data(relgoods)
m<-10
ordinal<-na.omit(relgoods[,45])
shelter<-1
simul<-cushforsim(m, ordinal, shelter)
simul$estimates
simul$loglik
simul$varmat

Run the code above in your browser using DataLab