Generate simulated data sets designed to illustrate various model misspecifications and diagnostics for ordinal regression models, as described in Liu and Zhang (2017).
Usage
sim_data(
n = 2000,
type = c("quadratic", "heteroscedastic", "gumbel", "proportionality", "interaction"),
...
)Arguments
- n
Integer specifying the number of observations to simulate. Default is
2000.- type
Character string specifying the type of data/model to simulate. Default is
"quadratic"(linear relation with a quadratic trend). Other options include:"heteroscedastic"(non-constant variance),"gumbel"(Gumbel error distribution),"proportionality"(non-proportional hazards), and"interaction"(interaction effect).- ...
Additional optional arguments (currently ignored).
Value
A data frame containing the simulated predictor(s) and the ordered
factor response variable y.