Learn R Programming

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

mcmcsae (version 0.6.0)

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

License

GPL-3

Maintainer

Harm Jan Boonstra

Last Published

January 20th, 2021

Functions in mcmcsae (0.6.0)

ac_fft

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

Return Metropolis-Hastings acceptance rates
combine_iters

Combine multiple draws objects to a single one by combining their draws
MCMC-object-conversion

Convert a draws component object to another format
aggrMatrix

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

Compute MCMC diagnostic measures
combine_chains

Combine multiple draws objects to a single one by combining their chains
MCMCsim

Run a Markov Chain Monte Carlo simulation
anyNA,tabMatrix-method

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

Correlation structures
create_TMVN_sampler

Set up a sampler object for sampling from a possibly truncated and degenerate multivariate normal distribution
nchains-ndraws-nvars

Get the number of chains, samples per chain or the number of variables in a simulation object
Matrix-methods

S4 methods for products of matrix objects
generate_data

Generate a data vector according to a model
glreg

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

Compute list of design matrices for all terms in a model formula
mec

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

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

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

Extract a list of parameter values for a single draw
model-information-criteria

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

Compute possibly sparse model matrix
labels

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

Get the parameter names from a draws object
create_sampler

Create a sampler object
mcmcsae-family

Functions for specifying a sampling distribution and link function
plot.dc

Trace, density and autocorrelation plots for (parameters of a) draws component object
gen

Create a model component object for a generic random effects component in the linear predictor
mcmcsae-package

MCMC Small Area Estimation
pr_invwishart

Create an object containing information about an inverse Wishart prior, possibly with modeled scale matrix
pr_gig

Create an object containing information about Generalized Inverse Gaussian (GIG) prior distributions
posterior-moments

Get means or standard deviations of parameters from the MCMC output in a draws object
plot_coef

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

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

Trace, density and autocorrelation plots
residuals-fitted-values

Extract draws of fitted values or residuals from a draws object
matrix-vector

Fast matrix-vector multiplications
maximize_llh

Maximize log-likelihood defined inside a sampler function
pr_exp

Create an object containing information about exponential prior distributions
weights.draws

Extract weights from a draws object
predict.draws

Generate draws from the predictive distribution
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
subset.dc

Select a subset of chains, samples and parameters from a draws component
set_opts

Set global options relating to computational details
summary.draws

Summarize a draws object
read_draws

Read MCMC draws from a file
reg

Create a model component object for a regression (fixed effects) component in the linear predictor
tabMatrix-indexing

S4 method for row and column subsetting a 'tabMatrix'
print.dc_summary

Display a summary of a dc object
summary.dc

Summarize a draws component object
print.draws_summary

Print a summary of MCMC simulation results
setup_cluster

Set up a cluster for parallel computing
stop_cluster

Stop a cluster
transform_dc

Transform one or more draws components 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