Gary King Homepage Previous: R Function Reference Up: R Function Reference Next: Usage

Function whatif()

This function evaluates your counterfactuals. Specifically, it:

  1. Determines if your counterfactuals are in the convex hull of the observed covariate data and are therefore interpolations or if they instead lie outside of it and are therefore extrapolations.
  2. Computes the distance from your counterfactuals to each of the $ n$ observed data points. The default distance function used is Gower's non-parametric measure.
  3. Computes a summary statistic for each counterfactual based on the distances in 2: the fraction of observed covariate data points with distances to your counterfactual less than a value you supply. By default, this value is taken to be the geometric variability of the observed data.
  4. Computes the cumulative frequency distribution of each counterfactual for the distances in 2 using values that you supply. By default, Gower distances from 0 to $ 1$ in increments of $ 0.05$ are used.
In other words, this function provides you with both qualitative and quantitative information about your counterfactuals, including two numeric summaries. You can then feed the output of this function either to plot to generate a graphical view or to summary to get a numerical summary of the results.



Subsections

Gary King 2010-08-12