Learn R Programming

PSW (version 1.1-3)

psw.mirror.hist: Mirror histogram

Description

psw.mirror.hist is used to plot the mirror histogram that visualizes the propensity score distributions in both treatment groups.

Usage

psw.mirror.hist(data, form.ps, weight, add.weight = FALSE, nclass = 50,
  K = 4)

Arguments

data

data frame to be used.

form.ps

propensity score model.

weight

weighting method to be used. Available methods are "ATE", "ATT", "ATC", "MW", "OVERLAP", and "TRAPEZOIDAL".

add.weight

add propensity score weights to the mirror histogram, add.weight=FALSE by default and it is not available for weight="ATE", "ATT" or "ATC".

nclass

number of breaks in the mirror histogram.

K

value of \(K\) in \(\omega(e_i) = min(1, K min(e_i, 1-e_i)) \) for "TRAPEZOIDAL" weight.

Value

NULL.

Details

See psw.

See Also

psw

Examples

Run this code
# NOT RUN {
# Load the test data set
data(test_data);
# Propensity score model
form.ps <- "Z ~ X1 + X2 + X3 + X4";
tmp <- psw.mirror.hist( data = test_data, weight = "MW", form.ps = form.ps,
add.weight = TRUE );

# }

Run the code above in your browser using DataLab