Learn R Programming

CUB (version 0.1)

simihg: Simulation routine for IHG models

Description

Generate n pseudo-random numbers according to the IHG distribution with given preference parameter $\theta$.

Usage

simihg(n, m, theta)

Arguments

n
Number of simulated observations
m
Number of ordinal categories
theta
Preference parameter

See Also

probihg

Examples

Run this code
n<-300
m<-9
theta<-0.4
simulation<-simihg(n, m, theta)
plot(table(simulation), xlab="Number of categories", ylab="Frequencies")

Run the code above in your browser using DataLab