This function estimates the control function for the endogenous variable based on the provided covariates. This function is called inside estimate.cmprsk.R.
estimate.cf(XandW, Z, Zbin, gammaest = NULL)
List containing the vector of values for the control function and the regression parameters of the first step.
Design matrix of exogenous covariates.
Endogenous covariate.
Boolean value indicating whether endogenous covariate is binary.
Vector of pre-estimated parameter vector. If NULL
,
this function will first estimate gammaest
. Default value is
gammaest = NULL
.