View source: R/benchmark_bayesest.R
benchmark_bayesest | R Documentation |
Benchmarks draws from a distribution using the method described in the paper "Bayesian benchmarking with applications to small area estimation" by G.S. Datta, M. Ghosh, R. Steorts, and J. Maples. Takes in a matrix of posterior draws, and national-level benchmark data.
benchmark_bayesest(
posterior_samps,
nregion = NA,
ntime = 1,
natl,
pop_weights = NA
)
posterior_samps |
a matrix containing posterior draws at the area-level. Rows should be arranged in order arrange(region, time), with each column containing an independent draw from the posterior. |
nregion |
the number of regions you have estimates for. Defaults to the number of rows
in |
ntime |
the number of time points you have estimates for. Defaults to 1. |
natl |
a vector of national level estimates, arranged in order of time if you have multiple time points in your data. |
pop_weights |
a vector of population weights for use in the benchmarking constraint. Must sum to one at each time point, and be in order arrange(region, time) |
A matrix of benchmarked samples in order arrange(region, time)
Taylor Okonek
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.