The method density() provides, in a grid (default) or sequence, the density plot of direct estimates versus HB model estimates and the density plot of standardized posterior means of the random effects versus standard normal.
## S3 method for class 'summary_fitsae'density(x, grid =TRUE,...)
Arguments
x: Object of class summary_fitsae.
grid: Logical indicating whether plots are displayed in a grid (TRUE) or in sequence (FALSE).
...: Currently unused.
Returns
Two ggplot2 objects in a grid or in sequence.
Examples
library(tipsae)# loading toy datasetdata("emilia_cs")# fitting a modelfit_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 diagnosticssumm_beta <- summary(fit_beta)# visualize estimates and random effect densities via density() functiondensity(summ_beta)