Running examples in 'tipsae-Ex.R' failed
The error most likely occurred in:

> ### Name: map
> ### Title: Map Relevant Quantities from a Small Area Model
> ### Aliases: map
> 
> ### ** 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 = 300, seed = 0)

SAMPLING FOR MODEL 'global' NOW (CHAIN 1).
Chain 1: 
Chain 1: Gradient evaluation took 0.000138 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 1.38 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1: 
Chain 1: 
Chain 1: Iteration:   1 / 300 [  0%]  (Warmup)
Chain 1: Iteration:  30 / 300 [ 10%]  (Warmup)
Chain 1: Iteration:  60 / 300 [ 20%]  (Warmup)
Chain 1: Iteration:  90 / 300 [ 30%]  (Warmup)
Chain 1: Iteration: 120 / 300 [ 40%]  (Warmup)
Chain 1: Iteration: 150 / 300 [ 50%]  (Warmup)
Chain 1: Iteration: 151 / 300 [ 50%]  (Sampling)
Chain 1: Iteration: 180 / 300 [ 60%]  (Sampling)
Chain 1: Iteration: 210 / 300 [ 70%]  (Sampling)
Chain 1: Iteration: 240 / 300 [ 80%]  (Sampling)
Chain 1: Iteration: 270 / 300 [ 90%]  (Sampling)
Chain 1: Iteration: 300 / 300 [100%]  (Sampling)
Chain 1: 
Chain 1:  Elapsed Time: 1.505 seconds (Warm-up)
Chain 1:                0.399 seconds (Sampling)
Chain 1:                1.904 seconds (Total)
Chain 1: 
Warning: The largest R-hat is 1.12, indicating chains have not mixed.
Running the chains for more iterations may help. See
https://mc-stan.org/misc/warnings.html#r-hat
Warning: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
Running the chains for more iterations may help. See
https://mc-stan.org/misc/warnings.html#bulk-ess
Warning: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable.
Running the chains for more iterations may help. See
https://mc-stan.org/misc/warnings.html#tail-ess
> 
> # check model diagnostics
> summ_beta <- summary(fit_beta)
Warning: Some Pareto k diagnostic values are too high. See help('pareto-k-diagnostic') for details.

> 
> # load shapefile of concerned areas
> data("emilia_shp")
> 
> # plot the map using model diagnostics and areas shapefile
> map(x = summ_beta,
+    spatial_df = emilia_shp,
+    spatial_id_domains = "NAME_DISTRICT")
Loading required package: sp
The legacy packages maptools, rgdal, and rgeos, underpinning this package
will retire shortly. Please refer to R-spatial evolution reports on
https://r-spatial.org/r/2023/05/15/evolution4.html for details.
This package is now running under evolution status 0 
Warning: `tidy.SpatialPolygonsDataFrame()` was deprecated in broom 1.0.4.
ℹ Please use functions from the sf package, namely `sf::st_as_sf()`, in favor
  of sp tidiers.
ℹ The deprecated feature was likely used in the tipsae package.
  Please report the issue to the authors.
Error:
! The `region` argument of `tidy.SpatialPolygonsDataFrame()` was
  deprecated in broom 1.0.5 and is now defunct.
Backtrace:
    ▆
 1. └─tipsae::map(x = summ_beta, spatial_df = emilia_shp, spatial_id_domains = "NAME_DISTRICT")
 2.   ├─broom::tidy(spatial_df, region = spatial_id_domains)
 3.   └─broom:::tidy.SpatialPolygonsDataFrame(spatial_df, region = spatial_id_domains)
 4.     └─lifecycle::deprecate_stop(when = "1.0.5", what = "tidy.SpatialPolygonsDataFrame(region)")
 5.       └─lifecycle:::deprecate_stop0(msg)
 6.         └─rlang::cnd_signal(...)
Execution halted