Learn R Programming

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

mcmcsae (version 0.7.4)

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.4

License

GPL-3

Maintainer

Harm Jan Boonstra

Last Published

June 29th, 2023

Functions in mcmcsae (0.7.4)

combine_chains

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

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

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

Create a sampler object
bart

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

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

Correlation structures
anyNA,tabMatrix-method

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

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

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

Extract a list of parameter values for a single draw
maximize_llh

Maximize log-likelihood defined inside a sampler function
matrix-vector

Fast matrix-vector multiplications
mcmcsae_example

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

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

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

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

Markov Chain Monte Carlo Small Area Estimation
generate_data

Generate a data vector according to a model
mcmcsae-family

Functions for specifying a sampling distribution and link function
mec

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

Create an object containing information about exponential prior distributions
nchains-ndraws-nvars

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

Get the parameter names from an mcdraws object
model-information-criteria

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

Compute possibly sparse model matrix
plot.dc

Trace, density and autocorrelation plots for (parameters of a) draws component (dc) object
posterior-moments

Get means or standard deviations of parameters from the MCMC output in an mcdraws 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.
pr_invchisq

Create an object containing information about inverse chi-squared priors with possibly modeled degrees of freedom and scale parameters
pr_fixed

Create an object containing information about a degenerate prior fixing a parameter to a fixed value
read_draws

Read MCMC draws from a file
predict.mcdraws

Generate draws from the predictive distribution
pr_invwishart

Create an object containing information about an inverse Wishart prior, possibly with modeled scale matrix
residuals-fitted-values

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

Create an object containing information about Generalized Inverse Gaussian (GIG) prior distributions
print.mcdraws_summary

Print a summary of MCMC simulation results
reg

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

Stop a cluster
subset.dc

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

Display a summary of a dc object
setup_cluster

Set up a cluster for parallel computing
setup_CG_sampler

Set up conjugate gradient sampler
transform_dc

Transform one or more draws component objects into a new one by applying a function
tabMatrix-indexing

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

Summarize an mcdraws object
weights.mcdraws

Extract weights from an mcdraws object
summary.dc

Summarize a draws component (dc) 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
vfac

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

Set global options relating to computational details
acceptance_rates

Return Metropolis-Hastings acceptance rates
Matrix-methods

S4 methods for products of matrix objects
MCMCsim

Run a Markov Chain Monte Carlo simulation
CG_control

Set options for the conjugate gradient (CG) sampler
aggrMatrix

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

Convert a draws component object to another format
MCMC-diagnostics

Compute MCMC diagnostic measures
ac_fft

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

Simulation based calibration
CG

Solve Ax=b by preconditioned conjugate gradients