This is a utility function, used in opsr and should not be used directly.
Tow-step estimation procedure to generate reasonable starting values.
opsr_2step(W, Xs, Z, Ys)Named vector with starting values passed to opsr.fit.
matrix with explanatory variables for selection process.
list of matrices with expalanatory varialbes for outcome process for each regime.
vector with ordinal outcomes (in integer increasing fashion).
list of vectors with continuous outcomes for each regime.
Since the Heckman two-step estimator includes an estimate in the second step regression, the resulting OLS standard errors and heteroskedasticity-robust standard errors are incorrect Greene:2002OPSR.
These estimates can be retrieved by specifying .get2step = TRUE in opsr.
Greene:2002OPSR
opsr.fit, opsr_prepare_coefs