This function implements the two-step approach proposed by Heckman (1979) to estimate the parameters
of the classic sample selection model. It is particularly useful for obtaining initial values
for maximum likelihood estimation (MLE).
In the first step, a probit model is fitted to the selection equation to estimate the probability of selection.
The second step involves estimating a linear regression of the outcome equation for the observed (selected) data,
incorporating the inverse Mills ratio (IMR) as an additional regressor to correct for sample selection bias.
The function also estimates: