opsr_simulate function

Simulate Data from an OPSR Process

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)

Arguments

  • nobs: number of observations to simulate.
  • sigma: the covariance matrix of the multivariate normal.

Returns

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).

Details

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.

  • Maintainer: Daniel Heimgartner
  • License: GPL (>= 3)
  • Last published: 2024-11-01