Gary King Homepage Previous: Inputs Up: Function whatif() Next: Function plot.whatif()

Value

An object of class ``whatif'', a list containing the following six or seven elements:

call
The original call to whatif.
inputs
A list with two elements, data and cfact. Only present if return.inputs was set equal to TRUE in the call to whatif. The first element is the processed observed covariate data matrix on which all whatif computations were performed. The second element is the processed counterfactual data matrix.
in.hull
A logical vector of length $ m$ , where $ m$ is the number of counterfactuals. Each element of the vector is TRUE if the corresponding counterfactual is in the convex hull and FALSE otherwise.
dist
An $ m \times n$ numeric matrix, where $ m$ is the number of counterfactuals and $ n$ is the number of data points (units). Only present if return.distance was set equal to TRUE in the call to whatif. The $ [i,j]$ th entry of the matrix contains the distance between the $ i$ th counterfactual and the $ j$ th data point.
geom.var
A scalar. The geometric variability of the observed covariate data.
sum.stat
A numeric vector of length $ m$ , where $ m$ is the number of counterfactuals. The $ m$ th element contains the summary statistic for the corresponding counterfactual. This summary statistic is the fraction of data points with distances to the counterfactual less than nearby*gv, which by default is the geometric variability of the covariates.
cum.freq
A numeric matrix. By default, the matrix has dimension $ m \times 21$ , where $ m$ is the number of counterfactuals; however, if you supplied your own frequencies via the argument freq, the matrix has dimension $ m \times f$ , where $ f$ is the length of freq. Each row of the matrix contains the cumulative frequency distribution for the corresponding counterfactual calculated using either the distance measure-specific default set of distance values or the set that you supplied (see the discussion under the argument freq). Hence, the $ [i,j]$ th entry of the matrix is the fraction of data points with distances to the $ i$ th counterfactual less than or equal to the value represented by the $ j$ th column. The column names contain these values.



Gary King 2010-08-12