Learn R Programming

⚠️There's a newer version (0.7.8) of this package.Take me there.

mcmcsae (version 0.7.6)

Markov Chain Monte Carlo Small Area Estimation

Description

Fit multi-level models with possibly correlated random effects using Markov Chain Monte Carlo simulation. Such models allow smoothing over space and time and are useful in, for example, small area estimation.

Copy Link

Version

Install

install.packages('mcmcsae')

Monthly Downloads

238

Version

0.7.6

License

GPL-3

Maintainer

Harm Jan Boonstra

Last Published

December 2nd, 2023

Functions in mcmcsae (0.7.6)

MCMCsim

Run a Markov Chain Monte Carlo simulation
CG_control

Set options for the conjugate gradient (CG) sampler
compute_GMRF_matrices

Compute (I)GMRF incidence, precision and restriction matrices corresponding to a generic model component
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
chol_control

Set options for Cholesky decomposition
correlation

Correlation structures
anyNA,tabMatrix-method

S4 method for generic 'anyNA' and signature 'tabMatrix'
bart

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

Combine multiple mcdraws objects into a single one by combining their draws
combine_chains

Combine multiple mcdraws objects into a single one by combining their chains
labels

Get and set the variable labels of a draws component object for a vector-valued parameter
computeDesignMatrix

Compute a list of design matrices for all terms in a model formula, or based on a sampler environment
gen

Create a model component object for a generic random effects component in the linear predictor
get_draw

Extract a list of parameter values for a single draw
maximize_log_lh_p

Maximize the log-likelihood or log-posterior as defined by a sampler closure
mcmcsae-family

Functions for specifying a sampling distribution and link function
mcmcsae-package

Markov Chain Monte Carlo Small Area Estimation
glreg

Create a model object for group-level regression effects within a generic random effects component.
matrix-vector

Fast matrix-vector multiplications
nchains-ndraws-nvars

Get the number of chains, samples per chain or the number of variables in a simulation object
generate_data

Generate a data vector according to a model
mcmcsae-TMVN-method

Functions for specifying the method and corresponding options for sampling from a possibly truncated and degenerate multivariate normal distribution
model_matrix

Compute possibly sparse model matrix
model-information-criteria

Compute DIC, WAIC and leave-one-out cross-validation model measures
par_names

Get the parameter names from an mcdraws object
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
posterior-moments

Get means or standard deviations of parameters from the MCMC output in an mcdraws object
plot_coef

Plot a set of model coefficients or predictions with uncertainty intervals based on summaries of simulation results or other objects.
mcmcsae_example

Generate artificial data according to an additive spatio-temporal model
pr_invwishart

Create an object representing an inverse Wishart prior, possibly with modeled scale matrix
pr_normal

Create an object representing a possibly multivariate normal prior distribution
stop_cluster

Stop a cluster
setup_cluster

Set up a cluster for parallel computing
pr_exp

Create an object representing exponential prior distributions
mec

Create a model component object for a regression (fixed effects) component in the linear predictor with measurement errors in quantitative covariates
pr_MLiG

Create an object representing a Multivariate Log inverse Gamma (MLiG) prior distribution
plot.dc

Trace, density and autocorrelation plots for (parameters of a) draws component (dc) object
plot.mcdraws

Trace, density and autocorrelation plots
pr_invchisq

Create an object representing inverse chi-squared priors with possibly modeled degrees of freedom and scale parameters
pr_gig

Create an object representing Generalized Inverse Gaussian (GIG) prior distributions
summary.mcdraws

Summarize an mcdraws object
print.mcdraws_summary

Print a summary of MCMC simulation results
read_draws

Read MCMC draws from a file
tabMatrix-indexing

S4 method for row and column subsetting a 'tabMatrix'
weights.mcdraws

Extract weights from an mcdraws object
sampler_control

Set computational options for the sampling algorithms
vreg

Create a model component object for a regression component in the variance function of a gaussian sampling distribution
reg

Create a model component object for a regression (fixed effects) component in the linear predictor
predict.mcdraws

Generate draws from the predictive distribution
print.dc_summary

Display a summary of a dc object
subset.dc

Select a subset of chains, samples and parameters from a draws component (dc) object
summary.dc

Summarize a draws component (dc) object
transform_dc

Transform one or more draws component objects into a new one by applying a function
vfac

Create a model component object for a variance factor component in the variance function of a gaussian sampling distribution
setup_CG_sampler

Set up conjugate gradient sampler
residuals-fitted-values

Extract draws of fitted values or residuals from an mcdraws object
acceptance_rates

Return Metropolis-Hastings acceptance rates
CG

Solve Ax=b by preconditioned conjugate gradients
MCMC-diagnostics

Compute MCMC diagnostic measures
MCMC-object-conversion

Convert a draws component object to another format
aggrMatrix

Utility function to construct a sparse aggregation matrix from a factor
ac_fft

Compute autocovariance or autocorrelation function via Wiener-Khinchin theorem using Fast Fourier Transform
Matrix-methods

S4 methods for products of matrix objects
SBC_test

Simulation based calibration