plot.sae: Plot method for objects of class sae.

View source: R/output.R

plot.saeR Documentation

Plot method for objects of class sae.

Description

This function plots small area estimates with error bars. Multiple sets of estimates can be compared. The default ordering of the estimates is by their area population sizes. This method uses a plot function that is adapted from function coefplot.default of package arm.

Usage

## S3 method for class 'sae'
plot(
  ...,
  n.se = 1,
  est.names,
  sort.by = NULL,
  decreasing = FALSE,
  index = NULL,
  maxrows = 50L,
  maxcols = 6L,
  type = "sae",
  offset = 0.1,
  cex.var = 0.8,
  mar = c(0.1, 2.1, 5.1, 0.1)
)

Arguments

...

sae objects, dc_summary objects (output by the summary method for simulation objects of package mcmcsae), or lists. The first object must be a sae object. In case of a list the components used are those with name est for point estimates, se for standard error based intervals or lower and upper for custom intervals. Instead of dc_summary objects matrix objects are also supported as long as they contain columns named "Mean" and "SD" as do dc_summary objects. Named parameters of other types that do not match any other argument names are passed to lower-level plot functions.

n.se

number of standard errors below and above the point estimates to use for error bars. By default equal to 1. This only refers to the objects of class dc_summary and sae.

est.names

labels to use in the legend for the components of the ... argument

sort.by

vector by which to sort the coefficients, referring to the first object passed.

decreasing

if TRUE, sort in decreasing order (default).

index

vector of names or indices of the selected areas to be plotted.

maxrows

maximum number of rows in a column.

maxcols

maximum number of columns of estimates on a page.

type

"sae" for small area estimates (default), "coef" for coefficients, "raneff" for random effects.

offset

space used between plots of multiple estimates for the same area.

cex.var

the fontsize of the variable names, default=0.8.

mar

a numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot.


hbsae documentation built on March 18, 2022, 6:34 p.m.