causalModel {causalGel} | R Documentation |
"causalModel"
classesIt builds the object of class "functionModel"
, but with a
specific function that depends on the type of causality.
causalModel(g, balm, data,theta0=NULL, momType=c("ACE","ACT","ACC", "uncondBal"), popMom = NULL, ACTmom=1L, orthoBases=FALSE)
g |
A formula that links the outcome variable to the treatment indicators. |
balm |
A formula or a matrix with balancing covariates |
data |
A data.frame or a matrix with column names. |
theta0 |
A vector of starting values (optional). If not provided, the least squares method is use to generate them |
momType |
How the moments of the covariates should be balanced. By default, it is balanced using the sample mean of the covariates, which corresponds to the ACE. Alternatively, to the sample moments of the treated group (ACT), the control group (ACC), or to a known population mean. The option 'uncondBal' means that it is unconditionally balanced. |
popMom |
A vector of population moments to use for balancing. It can be used if those moments are available from a census, for example. When available, it greatly improves efficiency. |
ACTmom |
When |
orthoBases |
If |
It returns an object of class "causalModel"
.
data(nsw) balm <- ~age+ed+black+hisp:married+nodeg+re75+I(re75^2) g <- re78~treat model <- causalModel(g, balm, nsw)