Functions to create and manipulate psw
objects, which are specialized
vectors for propensity score weights with optional estimand
attributes.
Most users should use wt_ate()
and friends, but these functions can help
extend the functionality of psw
objects.
Usage
new_psw(
x = double(),
estimand = NULL,
stabilized = FALSE,
trimmed = FALSE,
truncated = FALSE,
...
)
psw(
x = double(),
estimand = NULL,
stabilized = FALSE,
trimmed = FALSE,
truncated = FALSE
)
is_psw(x)
is_stabilized(wt)
is_causal_wt(x)
as_psw(x, estimand = NULL)
estimand(wt)
estimand(wt) <- value
Arguments
- x
A numeric vector (default:
double()
).- estimand
A character string representing the estimand (e.g., "ate", "att", "ato"). Default is
NULL
.- stabilized
A logical
TRUE
- trimmed
Logical, whether these weights came from a trimmed PS.
- truncated
Logical, whether these weights came from a truncated PS.
- ...
Additional attributes to track in the weights.
- wt
An object to check or convert.
- value
The value to add to the attribute.