These functions do the actual fitting of tobit-2
(sample selection), tobit-5 (switching regression) and
normal-disturbance treatment effect
models by the 2-step Heckman (heckit) estimation.
They are called by selection
or
heckit
and
they are intended for sampleSelection
internal use.
heckit2fit( selection, outcome, data=sys.frame(sys.parent()),
weights = NULL, inst = NULL,
printLevel=print.level, print.level = 0,
maxMethod = "Newton-Raphson" )heckit5fit( selection, outcome1, outcome2, data = sys.frame(sys.parent()),
ys = FALSE, yo = FALSE, xs = FALSE, xo = FALSE, mfs = FALSE,
mfo = FALSE,
printLevel=print.level, print.level = 0, maxMethod = "Newton-Raphson", ... )
heckitTfit(selection, outcome, data=sys.frame(sys.parent()),
ys=FALSE, yo=FALSE, xs=FALSE, xo=FALSE, mfs=FALSE, mfo=FALSE,
printLevel=0, maxMethod="Newton-Raphson", ... )
formula for the probit estimation (1st step)
(see selection
).
formula to be estimated (2nd step). In case of treatment effect model, it may include the response indicator from selection equation.
formula, the first outcome equation.
formula, the second outcome equation.
a data frame containing the data.
an optional vector of ‘prior weights’ to be used in the fitting process. Should be NULL or a numeric vector. Weights are currently only supported in type-2 models.
an optional one-sided formula specifying instrumental variables for a 2SLS/IV estimation on the 2nd step.
logicals. If true, the response (y
),
model matrix (x
) or the model frame (mf
)
of the selection (s
) or outcome
(o
) equation(s) are returned.
numeric, values greater than 0 will produce increasingly more debugging information.
character string,
a maximisation method supported by maxLik
that is used for estimating the probit model (1st stage).
currently not used.
see selection
.
see selection
.