is_refit() tests whether x is a ps_trim object whose propensity
model has been refit on the retained (non-trimmed) observations via
ps_refit().
Arguments
- x
An object to test (typically a ps_trim vector).
Details
On a psw vector built from trimmed propensity scores, the answer comes from
the trimming record carried on the weights. is_refit() reads a single flag
out of that record rather than a position, so unlike is_unit_trimmed() it
answers from any record present, whatever length the weights have since taken
on. It raises an error of class propensity_missing_meta_error only when
weights marked as trimmed carry no record at all, which is what a subset of
such weights leaves behind. Weights that were never trimmed have nothing
missing and return FALSE.
See also
ps_refit() to refit a propensity model after trimming,
ps_trim() to trim propensity scores.
