Learn R Programming

twang (version 1.3-14)

sensitivity: Sensitivity analysis

Description

Produces a table to help the user assess the extent to which a hidden bias might remove any differences observed in the propensity score analysis.

Usage

sensitivity(ps1,
            data,
            outcome,
            order.by.importance = TRUE,
            verbose = TRUE)

Arguments

ps1
a ps object as returned from ps
data
the data frame used to fit ps1
outcome
a character string indicating the name of the variable in data to use as the outcome
order.by.importance
if TRUE then the variables are sorted by their relative influence in the gbm.object used to create ps1
verbose
if TRUE, lots of information will be printed to monitor the the progress of the fitting

Value

  • Returns a list where each component contains the sensitivity analysis for each stop.method used in fitting ps1. Each component contains a data frame with a row for each variable in the original propensity score model. The columns are
  • varthe name of the variable excluded from the model
  • E0the estimated $E(Y_0|t=1)$ with var excluded from the propensity score model
  • a.min,a.maxthe smallest and largest values of $a$ observed
  • a.corthe observed correlation between $a$ and $y$
  • a.mincor,a.maxcorthe smallest and largest values of $\rho$ possible
  • minE0,maxE0the smallest and largest values of estimated $E(Y_0|t=1)$ possible
  • breakeven.corthe break even correlation (see Details section)

Details

This function implements the sensitivity analysis described in Ridgeway (2006), Section 5.5. This analysis helps the user assess the extent to which a hidden bias might remove any differences observed in the propensity score analysis. If there is an important unobserved factor the odds than the correct propensity score weight is not $w(x_i)$, as the propensity score model predicts, but actually $w(x_i, z_i)$ where $z$ represents the unobserved factor. Let $a_i=w(x_i, z_i)/w(x_i)$. These $a_i$'s give an estimate of $g(a)$, the distribution of the multiplicative errors that we observe in the weights when excluding $z_i$. Changing the values of the $a_i$'s will affect the treatment effect estimate if $a$ is correlated with $y$, the outcome. The stronger the correlation the more sensitive the results will be to the hidden bias. sensitivity computes over control group subjects a modified estimate of $E(Y_0|t=1)$. $$\frac{\sum_C a_iw_iy_i}{\sum_C a_iw_i}$$ subject to the constraint that $a_i \sim g(a)$ and $cor(a_i, y_i) = \rho$. Several $g(a)$'s are considered by removing each variable from the propensity score model in turn and computing the ratio of the original weights to the weights with the variable removed. Several choices for $\rho$ are also considered, making $\rho$ as large as possible, as small as possible, and solving for the ``break even'' $\rho$, the $\rho$ that eliminates any treatment effect.

References

G. Ridgeway (2006). Assessing the effect of race bias in post-traffic stop outcomes using propensity scores, Journal of Quantitative Criminology 22(1):1-29.

See Also

See ps for an example