Printing and plotting methods for Theil's inequality index
# S3 method for theil
plot(
x,
style = c("mean_qi", "lines"),
M = 250,
col = "black",
fill = "black",
alpha,
lwd,
base_size = 14,
scale = 100,
labels = x$summary$time,
...
)
# S3 method for theil_list
plot(
x,
style = c("mean_qi", "lines"),
M = 250,
col = "black",
fill = "black",
alpha,
lwd,
between_title = "Between",
within_title = "Within",
total_title = "Total",
scale = 100,
plot = TRUE,
ncol = 3,
base_size = 14,
...
)
# S3 method for theil
print(x, scale = 100, digits = 3, ...)
# S3 method for theil_list
print(x, scale = 100, digits = 3, ...)An object of class thiel' or theil_list, as returned by calling theilon a list of fittedsurveil` models
If style = "mean_qi", then the posterior mean and 95 percent credible interval will be plotted; if style = "lines", then M samples from the joint probability distribution will be plotted.
If style = "lines", then M is the number of samples from the posterior distribution that will be plotted; the default is M = 250.
Line color
Fill color
For style = "mean_qi", this controls the transparency for the credible interval (passed to geom_ribbon) and defaults to alpha = 0.5; for style = "lines", this controls the transparency of the lines and defaults to alpha = 0.7.
Line width; for style = "mean_qi", the default is lwd = 1; for style = "lines", the default is lwd = 0.05.
Passed to theme_classic to control size of plot elements (e.g., text)
Scale Theil's index by scale
x-axis labels (time periods)
additional arguments
Plot title for the between geography component of Theil's T; defaults to "Between".
Plot title for the within geography component of Theil's T; defaults to "Within".
Plot title for Theil's index; defaults to "Total".
If FALSE, return a list of ggplots. Not used when style = "lines".
Number of columns for the plotting device. If ncol = 1, the three plots will be aligned vertically in one column; if ncol = 3 they will b aligned horizontally in one row.
number of digits to print (passed to print.data.frame)
If style = "lines", the plot method for theil_list objects returns a ggplot with facets for each component of inequality (between-areas, within-areas, and total). For style = "mean_qi", the plot method returns either a list of plots (all of class ggplot) or, when plot = TRUE, it will draw them to current plotting device using grid.arrange.