ps_trunc_meta: Extract truncation metadata from a 'ps_trunc' object

View source: R/ps_trunc.R

ps_trunc_metaR Documentation

Extract truncation metadata from a ps_trunc object

Description

Returns the metadata list attached to a ps_trunc object. The list includes fields such as method, lower_bound, upper_bound, and truncated_idx.

Usage

ps_trunc_meta(x)

Arguments

x

A ps_trunc object created by ps_trunc().

Value

A named list with truncation metadata, including:

  • method – the truncation method used ("ps", "pctl", or "cr")

  • lower_bound, upper_bound – the applied bounds

  • truncated_idx – integer positions of values that were winsorized

See Also

ps_trunc(), is_ps_truncated(), is_unit_truncated()

Examples

ps <- c(0.02, 0.3, 0.5, 0.7, 0.98)
ps_t <- ps_trunc(ps, method = "ps", lower = 0.05, upper = 0.95)
ps_trunc_meta(ps_t)


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