Learn R Programming

CUB (version 1.1.5)

simihg: Simulation routine for IHG models

Description

Generate \(n\) pseudo-random observations following the given IHG distribution.

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