Skip to contents

Overlays the real and synthetic marginal distribution of each variable (density for numeric, side-by-side bars for categorical) using base graphics.

Usage

# S3 method for class 'flexsynth_diagnostics'
plot(x, vars = NULL, max_panels = 12L, ...)

Arguments

x

A flexsynth_diagnostics object from diagnose().

vars

Optional subset of variables to plot.

max_panels

Maximum number of variables to draw (default 12).

...

Passed to the underlying plotting calls.

Value

x, invisibly.

Examples

df <- data.frame(id = 1:30, x = rnorm(30))
res <- synth(df, ~ id, method = "sample", seed = 1)
d <- diagnose(df, res, vars = "x")
plot(d)