Learn R Programming

sandwichr (version 1.0.4)

autoplot: Plot prediction results

Description

Plot the estimated mean and standard error for each reporting unit.

Usage

# S3 method for sandwich.model
autoplot(
  object,
  titles = c("Mean", "Standard Error"),
  labels = c("", ""),
  border_color = "darkgray",
  poly_fill_mean = c("white", "red"),
  poly_fill_se = c("white", "blue"),
  ...
)

Value

A list of ggplot objects.

Arguments

object

A sandwich.model object generated by sandwich.model.

titles

A list of texts for the titles.

labels

A list of texts for the legend labels.

border_color

Color for outlines of the polygons.

poly_fill_mean

A list of colors for low and high ends of the gradient in the mapping of means.

poly_fill_se

A list of colors for low and high ends of the gradient in the mapping of standard errors.

...

Ignored.

References

Wang, J. F., Haining, R., Liu, T. J., Li, L. F., & Jiang, C. S. (2013). Sandwich estimation for multi-unit reporting on a stratified heterogeneous surface. Environment and Planning A, 45(10), 2515-2534.

See Also

sandwich.model

Examples

Run this code
library(ggplot2)
data(sim.data)
sim.sw <- sandwich.model(object=sim.data, sampling.attr="Value", type="shp")
ggplot2::autoplot(object=sim.sw)


Run the code above in your browser using DataLab