Takes a ps_trim
object and the original model
used to calculate the propensity score, then:
Retrieves data from the model (or from
.df
argument if provided)Subsets rows to the non‐trimmed indices
Refits the model
Predicts new propensity scores for all rows (trimmed rows ->
NA
)Returns a new
ps_trim
object withrefit = TRUE
.
Arguments
- trimmed_ps
A
ps_trim
object (same length as data, NAs for trimmed).- model
The fitted model used to get the original PS (e.g. a glm).
- .df
Optional. A data frame. If
NULL
, we try to retrieve frommodel
.- ...
Additional arguments passed to
update()
.