First, a latent outcome is generated as follows:
$$Y_i^* = g ( X_i ) + \epsilon_i$$
with:
$$g ( X_i ) = X_i^T \beta$$
$$X_i := (X_{i, 1}, X_{i, 2}, X_{i, 3}, X_{i, 4}, X_{i, 5}, X_{i, 6})$$
$$X_{i, 1}, X_{i, 3}, X_{i, 5} \sim \mathcal{N} \left( 0, 1 \right)$$
$$X_{i, 2}, X_{i, 4}, X_{i, 6} \sim \textit{Bernoulli} \left( 0, 1 \right)$$
$$\beta = \left( 1, 1, 1/2, 1/2, 0, 0 \right)$$
$$\epsilon_i \sim logistic (0, 1)$$
Second, the observed outcomes are obtained by discretizing the latent outcome into three classes using uniformly spaced threshold parameters.
Third, the conditional probabilities and the covariates' marginal effects at the mean are generated using standard textbook formulas. Marginal
effects are approximated using a sample of 1,000,000 observations.