plot.summary_fitsae function

Plot Method for a summary_fitsae Object

Plot Method for a summary_fitsae Object

The generic method plot() provides, in a grid (default) or sequence, (a) a scatterplot of direct estimates versus model-based estimates, visually capturing the shrinking process, (b) a Bayesian P-values histogram, (c) a boxplot of standard deviation reduction values, and, if areas sample sizes are provided as input in fit_sae(), (d) a scatterplot of model residuals versus sample sizes, in order to check for design-consistency i.e., as long as sizes increase residuals should converge to zero.

## S3 method for class 'summary_fitsae' plot( x, size = 2.5, alpha = 0.8, n_bins = 15, grid = TRUE, label_names = NULL, ... )

Arguments

  • x: Object of class summary_fitsae.
  • size: Aesthetic option denoting the size of scatterplots points, see geom_point documentation.
  • alpha: Aesthetic option denoting the opacity of scatterplots points, see geom_point documentation.
  • n_bins: Denoting the number of bins used for histogram.
  • grid: Logical indicating whether plots are displayed in a grid (TRUE) or in sequence (FALSE).
  • label_names: Character string indicating the model name to display in boxplot x-axis label.
  • ...: Currently unused.

Returns

Four ggplot2 objects in a grid.

Examples

library(tipsae) # loading toy dataset data("emilia_cs") # fitting a model fit_beta <- fit_sae(formula_fixed = hcr ~ x, data = emilia_cs, domains = "id", type_disp = "var", disp_direct = "vars", domain_size = "n", # MCMC setting to obtain a fast example. Remove next line for reliable results. chains = 1, iter = 150, seed = 0) # check model diagnostics summ_beta <- summary(fit_beta) # visualize diagnostics via plot() method plot(summ_beta)

See Also

summary.fitsae to produce the input object.

  • Maintainer: Silvia De Nicolò
  • License: GPL-3
  • Last published: 2024-09-13

Useful links