is_unit_truncated: Identify which units were truncated

View source: R/ps_trunc.R

is_unit_truncatedR Documentation

Identify which units were truncated

Description

is_unit_truncated() returns a logical vector indicating which observations had their propensity scores modified by truncation. Use is_ps_truncated() to test whether an object has been truncated at all.

Usage

is_unit_truncated(x)

Arguments

x

A ps_trunc object created by ps_trunc().

Value

A logical vector the same length as x (or number of rows for matrix input). TRUE marks observations whose values were winsorized.

See Also

ps_trunc(), is_ps_truncated(), ps_trunc_meta()

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)
is_unit_truncated(ps_t)


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