plot.auto_strata | R Documentation |
auto_strata
objectGenerates diagnostic plots for the product of a stratification by
auto_stratify
. There are four plot types:
"SR"
(default) - produces a scatter plot of strata by size and
treat:control ratio
"hist"
- produces a histogram of propensity
scores within a stratum
"AC"
- produces a Assignment-Control
plot of individuals within a stratum
"residual"
- produces a
residual plot for the prognostic model
## S3 method for class 'auto_strata' plot( x, type = "SR", label = FALSE, stratum = "all", strata_lines = TRUE, jitter_prognosis, jitter_propensity, propensity, ... )
x |
an |
type |
string giving the plot type (default = |
label |
ignored unless |
stratum |
ignored unless |
strata_lines |
default = |
jitter_prognosis |
ignored unless |
jitter_propensity |
ignored unless |
propensity |
ignored unless |
... |
other arguments |
Aikens, Greaves, and Baiocchi (2020) in Statistics in Medicine, Section 3.2 for an explaination of Assignment-Control plots (formerly "Fisher-Mill" plots).
plot.manual_strata
dat <- make_sample_data() a.strat <- auto_stratify(dat, "treat", outcome ~ X1 + X2) plot(a.strat) # makes size-ratio scatter plot plot(a.strat, type = "hist", propensity = treat ~ X1, stratum = 1) plot(a.strat, type = "AC", propensity = treat ~ X1, stratum = 1) plot(a.strat, type = "residual")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.