plot_microsynth ( sea1, file = file.path ( tempdir (), 'plots.pdf' ), sep = FALSE ) # Make plots for only one outcome, display, and save to a single file. plot_microsynth ( sea1 ) # Make plots, display, and save to a single file (plots.pdf). # Declare time-variant (outcome) and time-invariant variables for matching cov.var <- c ( 'TotalPop', 'BLACK', 'HISPANIC', 'Males_1521', 'HOUSEHOLDS', 'FAMILYHOUS', 'FEMALE_HOU', 'RENTER_HOU', 'VACANT_HOU' ) match.out <- c ( 'i_felony', 'i_misdemea', 'i_drugs', 'any_crime' ) set.seed ( 99199 ) # for reproducibility # Not run: # Perform matching and estimation, without permutations or jackknife # runtime: <1 min sea1 <- microsynth ( seattledmi, idvar = 'ID', timevar = 'time', intvar = 'Intervention', start.pre = 1, end.pre = 12, end.post = 16, match.out = match.out, var = cov.var, result.var = match.out, omnibus.var = match.out, test = 'lower', n.cores = min ( parallel :: detectCores (), 2 )) # Plot with default settings in the GUI. Only required input is a parameter ms which is a microsynth object. Overlaid to help illustrate statistical uncertainty. Intervention time periods and shown in terms of raw outcome values or Defaults to ''.Ĭharacter string giving the x-axis labels to be used for the second plotsĬharacter string giving the y-axis labels to be used for the first plotsĬharacter string giving the y-axis labels to be used for the second plots (that show differences between treatment and control).Ĭharacter string giving the x-axis labels to be used for the first plots
Defaults to plot.var.Ĭharacter string giving the title to be used for the second plots If NULL, a third curve showing the overall outcome levels isĪ scalar (or a vector of the same length as plot.var)Ĭharacter string giving the title to be used for the first plots Of the labels that will be marked at the times indicated by at inĪ scalar character string giving the unit name for cases. In ms (e.g., colnames(ms$Plot.Stats$Treatment)).Ī vector of the same length as at that gives the names The width of the graphics region (in inches)Ī vector that gives the location of user-specified x-axis labels.Īt should be a (numeric) subset of the named time points contained The height of the graphics region (in inches) The number of permutation groups to plot. Applicable only if plots are saved to file ( If sep = TRUE, separate plots will be generated for each When end.post = NULL (the default), it is resetĪ character string giving the name of file that will beĬreated in the home directory containing plots. If end.pre = NULL the end of the pre-intevention period will beĪn integer that gives final time point that will be plotted.
Which treatment and synthetic control will were matched to one another.įollowing end.pre are considered to be post-intervention and theīehavior of outcomes will be compared between the treatment and syntheticĬontrol groups across those time periods. When start.pre = NULL, it is reset to theĪn integer that gives the final time point of the The input result.var as used in the creation of ms canĪn integer indicating the time point that corresponds to theĮarliest time period that will be plotted.
If plot.var = NULL, all outcome variables thatĪre included in ms are plotted. Plot_microsynth ( ms, plot.var = NULL, start.pre = NULL, end.pre = NULL, end.post = NULL, file = NULL, sep = TRUE, plot.first = NULL, legend.spot = "bottomleft", height = NULL, width = NULL, at = NULL, labels = NULL, all = "cases", main.tc = NULL, main.diff = NULL, xlab.tc = NULL, xlab.diff = NULL, ylab.tc = NULL, ylab.diff = NULL )Ī vector of variable names giving the outcome variables thatĪre shown in plots.