R/treatReg.R

Defines functions treatReg

Documented in treatReg

treatReg <- function(selection, outcome,
                     data=sys.frame(sys.parent()),
                     mfs=TRUE, mfo=TRUE,
                      ...) {
   ## Heckman-style treatment effect models
   ## selection:   formula
   ##              LHS: must be convertable to two-level factor (e.g. 0-1, 1-2, "A"-"B")
   ##              RHS: ordinary formula as in lm()
   ## outcome:     formula
   ##              should include selection outcome
   ## ys, xs, yo, xo, mfs, mfo: whether to return the response, model matrix or
   ##              the model frame of outcome and selection equation(s)
   ## First the consistency checks
   ## ...          additional arguments for tobit2fit and tobit5fit
   res <- selection(selection, outcome, data=data,
                    type="treatment",
                    mfs=mfs, mfo=mfo,
                    ...)
   return(res)
}

Try the sampleSelection package in your browser

Any scripts or data that you put into this service are public.

sampleSelection documentation built on Dec. 15, 2020, 3:01 a.m.