Closed vincentarelbundock closed 1 year ago
@ngreifer What do you think about this?
I've never liked transform_pre
since it feels opaque. Also, it's only used in comparisons()
and the parallel to transform_post
isn't clear.
Would also be similar to hypotheses(x, hypothesis = ...)
I can't come up with a good alternative for transform_pre
. The current version is not great, but at least it tells us when things happen.
transform_post
is long, but it's also nice to be explicit about the timing.
Since I can't think of excellent alternatives, there's no point in changing things just to change things.
In clarify
, I use the name contrast
to specify the contrast. In the causal inference literature, this is the language used. I am a fan of contrast
/comparison
and transform
. I think transform_pre
isn't a great name for avg_comparisons()
because the transformation occurs after the average predictions have been calculated, which I think is different from comparisons()
, where it occurs before any averaging (i.e., done by summary()
).
Sorry it took so long for me to see this.
Cool, thanks. I agree. Changed and merged.
I used comparison
because I think that in some contexts contrast
specifically means a linear combination which sums to 1. "Comparison" seems more generic, allowing for ratios, etc.
I agree. Again, it's a field-specific language thing (i.e., the idea of a "causal contrast" as more general than an average treatment effect). I know in psychology at least people who see the word "contrast" will indeed think of linear contrasts.
FYI, I set up a CI system to check revdep, so I can now make sure that MatchIt et al. don't break with changes like this. So far so good.
I want to move to 1.0.0 in the medium run, so this is starting to be close to the last chance to make some changes to the argument names. Of course, any change will preserve older arguments as aliases for backward compatibility.
Potential renames:
comparisons()
transform_pre
->comparison
transform_post
->transform