Calculate error of stratified estimates

strat_error(sim)

Arguments

sim

Object from run_strat (includes simulated population and survey along with stratified analysis results)

Value

Adds details and summary stats of stratified estimate error to the sim list, ending with "_strat_error" or "_strat_error_stats". Error statistics includes mean absolute error ("MAE"), mean squared error ("MSE"), and root mean squared error ("RMSE")

Examples


# \donttest{
sim <- sim_abundance(ages = 1:5, years = 1:5,
                     R = sim_R(log_mean = log(1e+7)),
                     growth = sim_vonB(length_group = 1)) %>%
           sim_distribution(grid = make_grid(res = c(20, 20)),
                            ays_covar = sim_ays_covar(sd = 1)) %>%
           sim_survey(n_sims = 1, q = sim_logistic(k = 2, x0 = 3)) %>%
           run_strat() %>%
           strat_error()
# }