Learn R Programming

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

mcmcsae (version 0.7.5)

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

744

Version

0.7.5

License

GPL-3

Maintainer

Harm Jan Boonstra

Last Published

October 10th, 2023

Functions in mcmcsae (0.7.5)

compute_GMRF_matrices

Compute (I)GMRF incidence, precision and restriction matrices corresponding to a generic model component
chol_control

Set options for Cholesky decomposition
mcmcsae-TMVN-method

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

Correlation structures
maximize_log_lh_p

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

Extract a list of parameter values for a single draw
mcmcsae-family

Functions for specifying a sampling distribution and link function
glreg

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

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

Fast matrix-vector multiplications
create_sampler

Create a sampler object
mcmcsae-package

Markov Chain Monte Carlo Small Area Estimation
gen

Create a model component object for a generic random effects component in the linear predictor
nchains-ndraws-nvars

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

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

Generate a data vector according to a model
combine_chains

Combine multiple mcdraws objects into a single one by combining their chains
model-information-criteria

Compute DIC, WAIC and leave-one-out cross-validation model measures
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
pr_fixed

Create an object representing a degenerate prior fixing a parameter (vector) to a fixed value
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.
model_matrix

Compute possibly sparse model matrix
predict.mcdraws

Generate draws from the predictive distribution
print.dc_summary

Display a summary of a dc object
mcmcsae_example

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

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

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

Trace, density and autocorrelation plots
residuals-fitted-values

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

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

Create a model component object for a regression (fixed effects) component in the linear predictor
pr_gamma

Create an object representing gamma prior distributions
summary.dc

Summarize a draws component (dc) object
pr_invwishart

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

Create a model component object for a regression component in the variance function of a gaussian sampling distribution
subset.dc

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

Set computational options for the sampling algorithms
pr_MLiG

Create an object representing a Multivariate Log inverse Gamma (MLiG) prior distribution
weights.mcdraws

Extract weights from an mcdraws object
pr_normal

Create an object representing a possibly multivariate normal prior distribution
setup_cluster

Set up a cluster for parallel computing
tabMatrix-indexing

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

Summarize an mcdraws object
stop_cluster

Stop a cluster
pr_exp

Create an object representing exponential prior distributions
print.mcdraws_summary

Print a summary of MCMC simulation results
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
read_draws

Read MCMC draws from a file
Matrix-methods

S4 methods for products of matrix objects
acceptance_rates

Return Metropolis-Hastings acceptance rates
MCMC-diagnostics

Compute MCMC diagnostic measures
aggrMatrix

Utility function to construct a sparse aggregation matrix from a factor
MCMC-object-conversion

Convert a draws component object to another format
MCMCsim

Run a Markov Chain Monte Carlo simulation
CG_control

Set options for the conjugate gradient (CG) sampler
SBC_test

Simulation based calibration
CG

Solve Ax=b by preconditioned conjugate gradients
ac_fft

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

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

Set up a sampler object for sampling from a possibly truncated and degenerate multivariate normal distribution
computeDesignMatrix

Compute a list of design matrices for all terms in a model formula, or based on a sampler environment
anyNA,tabMatrix-method

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