diag.plot {twang}R Documentation

Create diagnostic plots

Description

Creates diagnostic plots of propensity scores including, a side-by-side boxplot of propensity scores, a histogram of propensity score weights, QQ plots of KS and t-statistic p-values, and a ``spaghetti" plot of absolute effect sizes

Usage

diag.plot(title=NULL,
          treat=NULL,
          p.s=NULL,
          w.ctrl=NULL,
          desc.unw=NULL,
          desc.w=NULL,
          plots="all")

## S3 method for class 'ps':
plot(x, label = "", ask=FALSE, plots="all", ...)
                  
## S3 method for class 'dxwts':
plot(x, label = "", ask=FALSE, plots="all", ...)

Arguments

title a title for the plots
treat a vector of 0/1 treatment indicators
p.s a vector of propensity scores (optional)
w.ctrl weights for the control subjects
desc.unw a list object containing the balance assessment without weights, usually the result of a call to desc.wts or the desc component of a ps object
desc.w a list object containing the weighted balance assessment
plots a character vector listing the plots to be created. The options are all (the default), optimize, ps boxplot, weight histogram, t pvalues, ks pvalues, spaghetti. Any other options (such as "none") will produce no plots
x a ps object, usually one returned from ps
label a character string for titling the plots
ask logical. If TRUE then the graphics window waits for a response from the user before showing the next graph
... other arguments passed to the plot function

Details

plot.ps and plot.dxwts are wrappers for diag.plot

The plots include

  • Boxplot of propensity scores
  • Histogram of comparison weights
  • P-value plots for unweighted and weighted t statistics, KS statistics, and standardized effect size
  • Change in effect size plot

    Value

    No returned objects

    See Also

    ps


    [Package twang version 0.6-4 Index]