Simulates data from an ordered probit process and separate (for each regime) OLS process where the errors follow a multivariate normal distribution.
opsr_simulate(nobs = 1000, sigma = NULL, seed = NULL)Named list:
ground truth parameters.
simulated data (as observed by the researcher). See also 'Details' section.
error draws from the multivariate normal (as used in the latent process).
assumed covariance matrix (to generate errors).
number of observations to simulate.
the covariance matrix of the multivariate normal.
a single value, interpreted as an integer, or NULL passed to
set.seed.
Three ordinal outcomes are simulated and the distinct design matrices (W and
X) are used (if W == X the model is poorely identified). Variables ys and
xs in data correspond to the selection process and yo, xo to the outcome
process.