prop2weight: Convert propensity to weight

Description Usage Arguments Value

Description

Takes a vector of propensity scores for a sample and converts them into propensity weights using their odds. By default, it assumes that the propensities represent the probability than an observation comes from the sample rather than the reference dataset. If the propensity is the probability of being from the reference dataset, set p_denom = FALSE.

Usage

1
prop2weight(p, p_denom = TRUE)

Arguments

p

A vector of propensity scores

p_denom

If TRUE, indicates that the weights should be calculated as wt = (1 - p)/p. Otherwise wt = p/(1 - p)

Value

A vector of propensity weights


awmercer/bestimate documentation built on May 22, 2019, 8:50 p.m.