plot.iptw: Plots for 'iptw' objects

View source: R/plot.iptw.R

plot.iptwR Documentation

Plots for iptw objects

Description

This function produces a collection of diagnostic plots for iptw objects.

Usage

## S3 method for class 'iptw'
plot(
  x,
  plots = "optimize",
  subset = NULL,
  color = TRUE,
  timePeriods = NULL,
  multiPage = FALSE,
  figureRows = NULL,
  hline = c(0.1, 0.5, 0.8),
  ...
)

Arguments

x

An iptw object.

plots

An indicator of which type of plot is desired. The options are

  • ⁠"optimize" or 1⁠ A plot of the balance criteria as a function of the GBM iteration.

  • ⁠"boxplot" or 2⁠ Boxplots of the propensity scores for the treatment and control cases

  • ⁠"es" or 3⁠ Plots of the standardized effect size of the pre-treatment variables before and after reweighing

  • ⁠"t" or 4⁠ Plots of the p-values from t-statistics comparing means of treated and control subjects for pretreatment variables, before and after weighting.

  • ⁠"ks" or 5⁠ Plots of the p-values from Kolmogorov-Smirnov statistics comparing distributions of pretreatment variables of treated and control subjects, before and after weighting.

subset

Used to restrict which of the stop.methods will be used in the figure. For example subset = c(1,3) would indicate that the first and third stop.methods (in alphabetical order of those specified in the original call to iptw) should be included in the figure.

color

If color = FALSE, figures will be gray scale. Default: TRUE.

timePeriods

The number of distinct time points. If NULL, this is assumed to be the number of ps objects (i.e., the number of distinct time points).

multiPage

When multiple frames of a figure are produced, multiPage = TRUE will print each frame on a different page. This is intended for situations where the graphical output is being saved to a file. Default: FALSE.

figureRows

The figure rows, passed to displayPlots. Default: NULL.

hline

Arguments passed to panel.abline.

...

Additional arguments.

Details

This function produces lattice-style graphics of diagnostic plots.

References

Dan McCaffrey, G. Ridgeway, Andrew Morral (2004). "Propensity Score Estimation with Boosted Regression for Evaluating Adolescent Substance Abuse Treatment", Psychological Methods 9(4):403-425.

See Also

iptw


twang documentation built on Sept. 11, 2024, 8:47 p.m.