Skip to contents

Compares truth to estimates at the district and precinct-level. Requires the truth argument in the ei object.

Usage

plot_truth(ei.object)

Arguments

ei.object

The output of ei()

Value

a ggplot object

Examples

data(matproii)
truth <- cbind(matproii$tb, matproii$tw)
suppressMessages({
  ei_res <- ei(formula = t ~ x, total = "n", truth = truth, data = matproii)
})
plot_truth(ei_res)
#> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
#>  Please use `linewidth` instead.
#>  The deprecated feature was likely used in the ei package.
#>   Please report the issue at <https://github.com/iqss-research/ei/issues>.