Package: mcmcsae 0.7.7

mcmcsae: Markov Chain Monte Carlo Small Area Estimation

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.

Authors:Harm Jan Boonstra [aut, cre], Grzegorz Baltissen [ctb]

mcmcsae_0.7.7.tar.gz
mcmcsae_0.7.7.zip(r-4.5)mcmcsae_0.7.7.zip(r-4.4)mcmcsae_0.7.7.zip(r-4.3)
mcmcsae_0.7.7.tgz(r-4.4-x86_64)mcmcsae_0.7.7.tgz(r-4.4-arm64)mcmcsae_0.7.7.tgz(r-4.3-x86_64)mcmcsae_0.7.7.tgz(r-4.3-arm64)
mcmcsae_0.7.7.tar.gz(r-4.5-noble)mcmcsae_0.7.7.tar.gz(r-4.4-noble)
mcmcsae_0.7.7.tgz(r-4.4-emscripten)mcmcsae_0.7.7.tgz(r-4.3-emscripten)
mcmcsae.pdf |mcmcsae.html
mcmcsae/json (API)
NEWS

# Install 'mcmcsae' in R:
install.packages('mcmcsae', repos = c('https://hjboonstra.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

2.78 score 8 scripts 228 downloads 75 exports 26 dependencies

Last updated 8 months agofrom:748b910733. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 25 2024
R-4.5-win-x86_64OKOct 25 2024
R-4.5-linux-x86_64OKOct 25 2024
R-4.4-win-x86_64OKOct 25 2024
R-4.4-mac-x86_64OKOct 25 2024
R-4.4-mac-aarch64OKOct 25 2024
R-4.3-win-x86_64OKOct 25 2024
R-4.3-mac-x86_64OKOct 25 2024
R-4.3-mac-aarch64OKOct 25 2024

Exports:%m*v%acceptance_ratesaggrMatrixAR1brtCGCG_controlchol_controlcombine_chainscombine_iterscompute_DICcompute_GMRF_matricescompute_WAICcomputeDesignMatrixcreate_samplercreate_TMVN_samplercrossprod_mvcustomf_binomialf_gammaf_gaussianf_gaussian_gammaf_multinomialf_negbinomialf_poissongengen_controlgenerate_dataget_drawget_meansget_sdsglregiidlabels<-m_directm_Gibbsm_HMCm_HMCZigZagm_softTMVNmaximize_log_lh_pmcmcsae_exampleMCMCsimmecmodel_matrixn_effnchainsndrawsnvarspar_namesplot_coefpr_exppr_fixedpr_gammapr_gigpr_invchisqpr_invwishartpr_MLiGpr_normalR_hatread_drawsregRW1RW2sampler_controlSBC_testseasonsetup_clusterspatialsplinestop_clusterto_draws_arrayto_mcmctransform_dcvfacvreg

Dependencies:abindbackportscheckmateclidistributionalfansigenericsGIGrvggluelatticelifecycleloomagrittrMatrixmatrixStatsnumDerivpillarpkgconfigposteriorRcppRcppEigenrlangtensorAtibbleutf8vctrs

Basic area-level model

Rendered fromarea_level.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2023-12-03
Started: 2020-09-01

Basic unit-level models

Rendered fromunit_level.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2023-12-03
Started: 2020-09-01

Linear regression, prediction, and survey weighting

Rendered fromlinear_weighting.Rmdusingknitr::rmarkdownon Oct 25 2024.

Last update: 2023-10-10
Started: 2020-09-01

Readme and manuals

Help Manual

Help pageTopics
Markov Chain Monte Carlo Small Area Estimationmcmcsae-package mcmcsae
Return Metropolis-Hastings acceptance ratesacceptance_rates
Utility function to construct a sparse aggregation matrix from a factoraggrMatrix
Create a model component object for a BART (Bayesian Additive Regression Trees) component in the linear predictorbrt
Set options for the conjugate gradient (CG) samplerCG_control
Set options for Cholesky decompositionchol_control
Combine multiple mcdraws objects into a single one by combining their chainscombine_chains
Combine multiple mcdraws objects into a single one by combining their drawscombine_iters
Compute (I)GMRF incidence, precision and restriction matrices corresponding to a generic model componentcompute_GMRF_matrices
Compute a list of design matrices for all terms in a model formula, or based on a sampler environmentcomputeDesignMatrix
Correlation factor structures in generic model componentsAR1 correlation custom iid RW1 RW2 season spatial spline
Create a sampler objectcreate_sampler
Set up a sampler object for sampling from a possibly truncated and degenerate multivariate normal distributioncreate_TMVN_sampler
Create a model component object for a generic random effects component in the linear predictorgen
Set computational options for the sampling algorithms used for a 'gen' model componentgen_control
Generate a data vector according to a modelgenerate_data
Extract a list of parameter values for a single drawget_draw
Create a model object for group-level regression effects within a generic random effects component.glreg
Get and set the variable labels of a draws component object for a vector-valued parameterlabels labels.dc labels<-
Fast matrix-vector multiplications%m*v% crossprod_mv matrix-vector
Maximize the log-likelihood or log-posterior as defined by a sampler closuremaximize_log_lh_p
Compute MCMC diagnostic measuresMCMC-diagnostics n_eff R_hat
Convert a draws component object to another formatas.array.dc as.matrix.dc MCMC-object-conversion to_draws_array to_mcmc
Generate artificial data according to an additive spatio-temporal modelmcmcsae_example
Functions for specifying a sampling distribution and link functionf_binomial f_gamma f_gaussian f_gaussian_gamma f_multinomial f_negbinomial f_poisson mcmcsae-family
Run a Markov Chain Monte Carlo simulationMCMCsim
Create a model component object for a regression (fixed effects) component in the linear predictor with measurement errors in quantitative covariatesmec
Compute possibly sparse model matrixmodel_matrix
Compute DIC, WAIC and leave-one-out cross-validation model measurescompute_DIC compute_WAIC loo.mcdraws model-information-criteria waic.mcdraws
Get the number of chains, samples per chain or the number of variables in a simulation objectnchains nchains-ndraws-nvars ndraws nvars
Get the parameter names from an mcdraws objectpar_names
Plot a set of model coefficients or predictions with uncertainty intervals based on summaries of simulation results or other objects.plot_coef
Trace, density and autocorrelation plots for (parameters of a) draws component (dc) objectplot.dc
Trace, density and autocorrelation plotsplot.mcdraws
Get means or standard deviations of parameters from the MCMC output in an mcdraws objectget_means get_sds posterior-moments
Create an object representing exponential prior distributionspr_exp
Create an object representing a degenerate prior fixing a parameter (vector) to a fixed valuepr_fixed
Create an object representing gamma prior distributionspr_gamma
Create an object representing Generalized Inverse Gaussian (GIG) prior distributionspr_gig
Create an object representing inverse chi-squared priors with possibly modeled degrees of freedom and scale parameterspr_invchisq
Create an object representing an inverse Wishart prior, possibly with modeled scale matrixpr_invwishart
Create an object representing a Multivariate Log inverse Gamma (MLiG) prior distributionpr_MLiG
Create an object representing a possibly multivariate normal prior distributionpr_normal
Generate draws from the predictive distributionpredict.mcdraws
Display a summary of a 'dc' objectprint.dc_summary
Print a summary of MCMC simulation resultsprint.mcdraws_summary
Read MCMC draws from a fileread_draws
Create a model component object for a regression (fixed effects) component in the linear predictorreg
Extract draws of fitted values or residuals from an mcdraws objectfitted.mcdraws residuals-fitted-values residuals.mcdraws
Set computational options for the sampling algorithmssampler_control
Simulation based calibrationSBC_test
Set up a cluster for parallel computingsetup_cluster
Stop a clusterstop_cluster
Select a subset of chains, samples and parameters from a draws component (dc) objectsubset.dc
Summarize a draws component (dc) objectsummary.dc
Summarize an mcdraws objectsummary.mcdraws
Functions for specifying the method and corresponding options for sampling from a possibly truncated and degenerate multivariate normal distributionm_direct m_Gibbs m_HMC m_HMCZigZag m_softTMVN TMVN-methods
Transform one or more draws component objects into a new one by applying a functiontransform_dc
Create a model component object for a variance factor component in the variance function of a gaussian sampling distributionvfac
Create a model component object for a regression component in the variance function of a gaussian sampling distributionvreg
Extract weights from an mcdraws objectweights.mcdraws