ps_trim_meta: Extract trimming metadata from a 'ps_trim' object

View source: R/ps_trim.R

ps_trim_metaR Documentation

Extract trimming metadata from a ps_trim object

Description

ps_trim_meta() returns the metadata list attached to a ps_trim object by ps_trim().

Usage

ps_trim_meta(x)

Arguments

x

A ps_trim object.

Value

A named list with elements:

method

Character string indicating the trimming method used.

keep_idx

Integer vector of retained observation indices.

trimmed_idx

Integer vector of trimmed observation indices.

lower, upper

Numeric cutoffs, when applicable.

refit

Logical, TRUE if the model was refit via ps_refit().

Additional method-specific elements (e.g. cutoff, delta, lambda) may also be present.

See Also

ps_trim() for trimming propensity scores, is_ps_trimmed() and is_unit_trimmed() for predicate queries.

Examples

ps <- c(0.05, 0.3, 0.6, 0.95)
trimmed <- ps_trim(ps, method = "ps", lower = 0.1, upper = 0.9)

ps_trim_meta(trimmed)


propensity documentation built on March 3, 2026, 1:06 a.m.