causalModel {causalGel}R Documentation

Constructor for "causalModel" classes

Description

It builds the object of class "functionModel", but with a specific function that depends on the type of causality.

Usage

causalModel(g, balm, data,theta0=NULL,
            momType=c("ACE","ACT","ACC", "uncondBal"),
            popMom = NULL, ACTmom=1L, orthoBases=FALSE) 

Arguments

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 momType is set to 'ACT', that integer indicates which treated group to use to balance the covariates.

orthoBases

If TRUE, the matrix of balancing moments is replaced by the matrix of orthogonal bases that span the same space. It is likely to be more stable and to prevent some balancing moments to be collinear.

Value

It returns an object of class "causalModel".

Examples

data(nsw)

balm <- ~age+ed+black+hisp:married+nodeg+re75+I(re75^2)
g <- re78~treat
           
model <- causalModel(g, balm, nsw)


[Package causalGel version 0.2 Index]