check_propensity: Check calibration and overlap assumptions via plot.

Description Usage Arguments Value Examples

View source: R/propensity.R

Description

Creates a Q-Q plot and a histogram to check calibration and overlap assumptions, respectively.

Usage

1
check_propensity(p, w, breaks = 20)

Arguments

p

a vector of propensity scores.

w

a vector of treatment indicators. Treatment must be specified as 0 and 1 or TRUE and FALSE.

breaks

an integer number of breaks for the histogram, default to 20.

Value

a plot object that graphically tests overlap assumption and calibration.

Examples

1
2
3
4
data(lalonde)
p <- propensity_score(lalonde, y = "re78", w = "treat", model = "logistic", plot = FALSE)
w <- lalonde$treat
check_propensity(p = p, w = w)

jackcollison/causality documentation built on Dec. 20, 2021, 8:05 p.m.