Hi Yuki and Class,
*Questoin about 2(c)*
Could you tell me what you mean by "IMPORT is switched for all
observations"? I feel that can be the opposit combination of 0 and 1 in
IMPORTANT, i.e., counter$IMPORT is 0 1 0 0 0 1 1 1 1 0 when snct$IMPORT is
1 0 1 1 1 0 0 0 0 1, Am I right?
Yes, by IMPORT is switched we mean exactly that: 0s become 1s, and 1s
become 0s.
What do you mean by "what percentage of
counter-factuals are "near"
their factual counterpart, using geometric variability as the standard"? Is
it same as mean(whif$sum.stat)? R help explains "sum.stat" in
"WhatIf" as
"A numeric vector of length m, where m is the number of counterfactuals.
The mth element contains the summary statistic for the corresponding
counterfactual. This summary statistic is the fraction of data points with
Gower distances to the counterfactual less than the argument 'nearby',
which by default is the geometric variability of the covariates.", but I
can't understand it well.
Yes, we do mean using the sum.stat output. For a given observation, we
can compare it to every counter-factual, and determine how many of those
comparisons fall within the geometric variability. That's what we are
looking for--and what is captured by sum.stat.
Best,
Dan