pscore {micsr}R Documentation

Propensity scores

Description

Propensity scores estimation, using an algorithm that checks the balancing hypothesis using strata and enable the estimation of the treatment effect using stratification methods

Usage

pscore(formula, data, maxiter = 4, tol = 0.005, link = c("logit", "probit"))

## S3 method for class 'pscore'
summary(object, ...)

## S3 method for class 'pscore'
print(
  x,
  ...,
  digits = getOption("digits"),
  var_equal = c("none", "strata", "group", "both")
)

## S3 method for class 'summary.pscore'
print(
  x,
  ...,
  digits = getOption("digits"),
  format = c("rst", "pipe", "simple"),
  step = c("all", "strata", "covariates", "atet")
)

## S3 method for class 'pscore'
nobs(object, ..., smpl = c("total", "cs"))

## S3 method for class 'summary.pscore'
nobs(object, ..., smpl = c("total", "cs"))

rg(object, ...)

## S3 method for class 'pscore'
rg(object, ..., smpl = c("total", "cs"))

## S3 method for class 'summary.pscore'
rg(object, ..., smpl = c("total", "cs"))

stdev(object, ...)

## S3 method for class 'pscore'
mean(x, ..., var_equal = c("none", "strat", "group", "both"))

## S3 method for class 'summary.pscore'
mean(x, ...)

## S3 method for class 'pscore'
stdev(object, ..., var_equal = c("none", "strata", "group", "both"))

## S3 method for class 'summary.pscore'
stdev(object, ..., var_equal = c("none", "strata", "group", "both"))

Arguments

formula

a Formula object; the left-hand side should contain two variables (x1 + x2), where x1 is the group variable and x2 the outcome. The group variable can be either a dummy for treated individuals or a factor with levels "treated" and "control"

data

a data frame

maxiter

the maximum number of iterations

tol

stratas are cut in halves as long as the hypothesis of equal means is rejected at the tol level,

link

the link for the binomial glm estimation, either "logit" or "probit"

...

further arguments

x, object

a "pscore" or a "summary.pscore" object

digits

number of digits for the print methods

var_equal

to compute the variance of the ATET, variances can be computed at the class/group level (var_equal = "none"), at the class level (var_equal = "group"), at the group level (var_equal = "strata") or globally (var_equal = "both")

format

one of "rst" "pipe" and "simple", this argument is passed to knitr::kable

step

for the print.summary method, the step of the test to be printed: one of "all" (the default), strata, covariates and atet

smpl

the sample to use, either the whole sample (smpl = "total") or the sample with common support (smpl = "cs")

Value

an object of class "pscore", with the following elements:

References

Dehejia RH, Wahba S (2002). “Propensity Score-Matching Methods for Nonexperimental Causal Studies.” The Review of Economics and Statistics, 84(1), 151-161. ISSN 0034-6535, doi:10.1162/003465302317331982.

Becker SO, Ichino A (2002). “Estimation of average treatment effects based on propensity scores.” Stata Journal, 2(4), 358-377(20).

Examples

data_tuscany <- dplyr::mutate(dplyr::filter(twa, region == "Tuscany"),
  dist2 = dist ^ 2, livselfemp = I((city == "livorno") * (occup == "selfemp")),
  perm = ifelse(outcome == "perm", 1, 0))
formula_tuscany <- group | perm ~ city + sex + marital + age +
   loc + children + educ + pvoto + training +
   empstat + occup + sector + wage + hour + feduc + femp + fbluecol +
   dist + dist2 + livselfemp
pscore(formula_tuscany, data_tuscany)

[Package micsr version 0.1-1 Index]