is_ps_calibrated() tests whether x was calibrated, rather than whether it
is still a ps_calib object: it is TRUE for a calibrated propensity score,
for weights derived from one, and for scores that were calibrated before
ps_trim() or ps_trunc() bounded them, each of which records the
calibration in its own metadata.
See also
ps_calibrate() to calibrate propensity scores.
Examples
ps <- runif(100)
exposure <- rbinom(100, 1, ps)
is_ps_calibrated(ps)
#> [1] FALSE
calibrated <- ps_calibrate(ps, exposure, smooth = FALSE)
is_ps_calibrated(calibrated)
#> [1] TRUE
