opsr_simulate {OPSR}R Documentation

Simulate Data from an OPSR Process

Description

Simulates data from an ordinal probit process and separate (for each regime) OLS process where the errors follow a multivariate normal distribution.

Usage

opsr_simulate(nobs = 1000, sigma = NULL)

Arguments

nobs

number of observations to simulate.

sigma

the covariance matrix of the multivariate normal.

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.

Value

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


[Package OPSR version 0.1.2 Index]