Simulate Data from an OPSR Process
Simulates data from an ordinal probit process and separate (for each regime) OLS process where the errors follow a multivariate normal distribution.
opsr_simulate(nobs = 1000, sigma = NULL)
nobs
sigma
Named list: - params: ground truth parameters.
data: simulated data (as observed by the researcher). See also 'Details' section.
errors: error draws from the multivariate normal (as used in the latent process).
sigma: assumed covariance matrix (to generate errors).
errors
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.
W
X
W == X
ys
xs
data
yo
xo
Useful links