# Markov Chain Monte Carlo Small Area Estimation

## Documentation for package ‘mcmcsae’ version 0.7.7

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A B C F G I L M N P R S T V W misc

mcmcsae-package | Markov Chain Monte Carlo Small Area Estimation

## -- A --

acceptance_rates | Return Metropolis-Hastings acceptance rates
aggrMatrix | Utility function to construct a sparse aggregation matrix from a factor
AR1 | Correlation factor structures in generic model components
as.array.dc | Convert a draws component object to another format
as.matrix.dc | Convert a draws component object to another format

## -- B --

brt | Create a model component object for a BART (Bayesian Additive Regression Trees) component in the linear predictor

## -- C --

CG_control | Set options for the conjugate gradient (CG) sampler
chol_control | Set options for Cholesky decomposition
combine_chains | Combine multiple mcdraws objects into a single one by combining their chains
combine_iters | Combine multiple mcdraws objects into a single one by combining their draws
computeDesignMatrix | Compute a list of design matrices for all terms in a model formula, or based on a sampler environment
compute_DIC | Compute DIC, WAIC and leave-one-out cross-validation model measures
compute_GMRF_matrices | Compute (I)GMRF incidence, precision and restriction matrices corresponding to a generic model component
compute_WAIC | Compute DIC, WAIC and leave-one-out cross-validation model measures
correlation | Correlation factor structures in generic model components
create_sampler | Create a sampler object
create_TMVN_sampler | Set up a sampler object for sampling from a possibly truncated and degenerate multivariate normal distribution
crossprod_mv | Fast matrix-vector multiplications
custom | Correlation factor structures in generic model components

## -- F --

fitted.mcdraws | Extract draws of fitted values or residuals from an mcdraws object
f_binomial | Functions for specifying a sampling distribution and link function
f_gamma | Functions for specifying a sampling distribution and link function
f_gaussian | Functions for specifying a sampling distribution and link function
f_gaussian_gamma | Functions for specifying a sampling distribution and link function
f_multinomial | Functions for specifying a sampling distribution and link function
f_negbinomial | Functions for specifying a sampling distribution and link function
f_poisson | Functions for specifying a sampling distribution and link function

## -- G --

gen | Create a model component object for a generic random effects component in the linear predictor
generate_data | Generate a data vector according to a model
gen_control | Set computational options for the sampling algorithms used for a 'gen' model component
get_draw | Extract a list of parameter values for a single draw
get_means | Get means or standard deviations of parameters from the MCMC output in an mcdraws object
get_sds | Get means or standard deviations of parameters from the MCMC output in an mcdraws object
glreg | Create a model object for group-level regression effects within a generic random effects component.

## -- I --

iid | Correlation factor structures in generic model components

## -- L --

labels | Get and set the variable labels of a draws component object for a vector-valued parameter
labels.dc | Get and set the variable labels of a draws component object for a vector-valued parameter
labels<- | Get and set the variable labels of a draws component object for a vector-valued parameter
loo.mcdraws | Compute DIC, WAIC and leave-one-out cross-validation model measures

## -- M --

matrix-vector | Fast matrix-vector multiplications
maximize_log_lh_p | Maximize the log-likelihood or log-posterior as defined by a sampler closure
MCMC-diagnostics | Compute MCMC diagnostic measures
MCMC-object-conversion | Convert a draws component object to another format
mcmcsae | Markov Chain Monte Carlo Small Area Estimation
mcmcsae-family | Functions for specifying a sampling distribution and link function
mcmcsae_example | Generate artificial data according to an additive spatio-temporal model
MCMCsim | Run a Markov Chain Monte Carlo simulation
mec | Create a model component object for a regression (fixed effects) component in the linear predictor with measurement errors in quantitative covariates
model-information-criteria | Compute DIC, WAIC and leave-one-out cross-validation model measures
model_matrix | Compute possibly sparse model matrix
m_direct | Functions for specifying the method and corresponding options for sampling from a possibly truncated and degenerate multivariate normal distribution
m_Gibbs | Functions for specifying the method and corresponding options for sampling from a possibly truncated and degenerate multivariate normal distribution
m_HMC | Functions for specifying the method and corresponding options for sampling from a possibly truncated and degenerate multivariate normal distribution
m_HMCZigZag | Functions for specifying the method and corresponding options for sampling from a possibly truncated and degenerate multivariate normal distribution
m_softTMVN | Functions for specifying the method and corresponding options for sampling from a possibly truncated and degenerate multivariate normal distribution

## -- N --

nchains | Get the number of chains, samples per chain or the number of variables in a simulation object
nchains-ndraws-nvars | Get the number of chains, samples per chain or the number of variables in a simulation object
ndraws | Get the number of chains, samples per chain or the number of variables in a simulation object
nvars | Get the number of chains, samples per chain or the number of variables in a simulation object
n_eff | Compute MCMC diagnostic measures

## -- P --

par_names | Get the parameter names from an mcdraws object
plot.dc | Trace, density and autocorrelation plots for (parameters of a) draws component (dc) object
plot.mcdraws | Trace, density and autocorrelation plots
plot_coef | Plot a set of model coefficients or predictions with uncertainty intervals based on summaries of simulation results or other objects.
posterior-moments | Get means or standard deviations of parameters from the MCMC output in an mcdraws object
predict.mcdraws | Generate draws from the predictive distribution
print.dc_summary | Display a summary of a 'dc' object
print.mcdraws_summary | Print a summary of MCMC simulation results
pr_exp | Create an object representing exponential prior distributions
pr_fixed | Create an object representing a degenerate prior fixing a parameter (vector) to a fixed value
pr_gamma | Create an object representing gamma prior distributions
pr_gig | Create an object representing Generalized Inverse Gaussian (GIG) prior distributions
pr_invchisq | Create an object representing inverse chi-squared priors with possibly modeled degrees of freedom and scale parameters
pr_invwishart | Create an object representing an inverse Wishart prior, possibly with modeled scale matrix
pr_MLiG | Create an object representing a Multivariate Log inverse Gamma (MLiG) prior distribution
pr_normal | Create an object representing a possibly multivariate normal prior distribution

## -- R --

read_draws | Read MCMC draws from a file
reg | Create a model component object for a regression (fixed effects) component in the linear predictor
residuals-fitted-values | Extract draws of fitted values or residuals from an mcdraws object
residuals.mcdraws | Extract draws of fitted values or residuals from an mcdraws object
RW1 | Correlation factor structures in generic model components
RW2 | Correlation factor structures in generic model components
R_hat | Compute MCMC diagnostic measures

## -- S --

sampler_control | Set computational options for the sampling algorithms
SBC_test | Simulation based calibration
season | Correlation factor structures in generic model components
setup_cluster | Set up a cluster for parallel computing
spatial | Correlation factor structures in generic model components
spline | Correlation factor structures in generic model components
stop_cluster | Stop a cluster
subset.dc | Select a subset of chains, samples and parameters from a draws component (dc) object
summary.dc | Summarize a draws component (dc) object
summary.mcdraws | Summarize an mcdraws object

## -- T --

TMVN-methods | Functions for specifying the method and corresponding options for sampling from a possibly truncated and degenerate multivariate normal distribution
to_draws_array | Convert a draws component object to another format
to_mcmc | Convert a draws component object to another format
transform_dc | Transform one or more draws component objects into a new one by applying a function

## -- V --

vfac | Create a model component object for a variance factor component in the variance function of a gaussian sampling distribution
vreg | Create a model component object for a regression component in the variance function of a gaussian sampling distribution

## -- W --

waic.mcdraws | Compute DIC, WAIC and leave-one-out cross-validation model measures
weights.mcdraws | Extract weights from an mcdraws object

## -- misc --

%m*v% | Fast matrix-vector multiplications