plot.mimids: Plots a 'mimids' Class Object

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/plot.mimids.R

Description

The plot.mimids() function plots an object of the mimids class.

Usage

1
2
3
## S3 method for class 'mimids'
plot(x, n = 1, type = "QQ", discrete.cutoff = 5,
  numdraws = 5000, interactive = TRUE, which.xs = NULL, ...)

Arguments

x

This argument specifies an object of the mimids class.

n

This argument specifies the matched imputed dataset number, intended to plot its matching profile. The input must be a positive integer. The default is 1.

type

This argument specifies type of the plot. Currently, "QQ" (the empirical quantile-quantile plots of each covariate to check balance of marginal distributions), "jitter" (the jitter plots of the propensity score for control and treatment observations), and "hist" (the histograms of the propensity score in the original control and treatment groups and weighted histograms of the propensity score in the matched control and treatment groups) types are available. The default is "QQ".

discrete.cutoff

This argument specifies number of values of covariates that are jittered for visibility (for quantile-quantile plots). The input must be a positive integer. The default is 5, meaning that discrete covariates that take 5 or fewer values are jittered.

numdraws

This argument specifies number of observations that are sampled for plotting full or ratio matching (using weights). The input must be a positive integer. The default is 5000.

interactive

This argument specifies whether users can identify observations by clicking on the graph with the left mouse button and (when applicable) choose subclasses to plot. The input must be a logical value. The default is TRUE.

which.xs

This argument specifies particular covariate names in a character vector to plot only a subset of the covariates (for quantile-quantile plots). The default is "NULL".

...

Additional arguments to be passed to the plot.mimids() function.

Details

The matching profile of the mimids class objects is plotted.

Author(s)

Farhad Pishgar

References

Daniel Ho, Kosuke Imai, Gary King, and Elizabeth Stuart (2007). Matching as Nonparametric Preprocessing for Reducing Model Dependence in Parametric Causal Inference. Political Analysis, 15(3): 199-236. http://gking.harvard.edu/files/abs/matchp-abs.shtml

See Also

mimids

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Loading the 'dt.osa' dataset
data(dt.osa)

#Imputing missing data points in the'dt.osa' dataset
datasets <- mice(dt.osa, m = 5, maxit = 1,
                 method = c("", "", "mean", "", "polyreg", "logreg", "logreg"))

#Matching the imputed datasets, 'datasets'
matcheddatasets <- matchitmice(KOA ~ SEX + AGE + SMK, datasets,
                               approach = 'within', method = 'nearest')

#Plotting data of the first imputed dataset
plot.1 <- plot(matcheddatasets, n = 1)

MatchIt.mice documentation built on Aug. 28, 2019, 1:03 a.m.