Template Unified Latent Process Architecture for Bayesian Hierarchical Models


[Up] [Top]

Documentation for package ‘tulpa’ version 0.2.0

Help Pages

A B C D F G I L M N P R S T V W

-- A --

adjacency Construct a spatial adjacency graph for areal models
adjacency.data.frame Construct a spatial adjacency graph for areal models
adjacency.default Construct a spatial adjacency graph for areal models
adjacency.sf Construct a spatial adjacency graph for areal models
adjacency.SpatRaster Construct a spatial adjacency graph for areal models
adjacency.stars Construct a spatial adjacency graph for areal models
agq_fit Adaptive Gauss-Hermite quadrature for one-RE GLMMs
as_draws Posterior draws in the posterior package's format
as_draws.tulpa_fit Posterior draws in the posterior package's format
as_draws_array Posterior draws in the posterior package's format
as_draws_array.tulpa_fit Posterior draws in the posterior package's format
as_draws_df Posterior draws in the posterior package's format
as_draws_df.tulpa_fit Posterior draws in the posterior package's format
as_draws_matrix Posterior draws in the posterior package's format
as_draws_matrix.tulpa_fit Posterior draws in the posterior package's format
as_draws_rvars Posterior draws in the posterior package's format
as_draws_rvars.tulpa_fit Posterior draws in the posterior package's format
auto_grid Mark an outer-grid setting as a default rather than a pin

-- B --

bayes_R2 Bayesian R-squared
bayes_R2.tulpa_fit Bayesian R-squared
bridge_sampling Bridge sampling for marginal likelihood

-- C --

check_adjacency Validate a spatial adjacency matrix
check_diagnostics Quick convergence check
check_model Diagnostic panel plot
check_model.default Diagnostic panel plot
coef.tulpa_fit Fixed-effect coefficients
compare_models Compare models by information criteria
confint.tulpa_fit Credible intervals for the fixed effects
cpo DIC and CPO
cpo.default DIC and CPO
criteria_doors DIC and CPO

-- D --

diagnostics Posterior diagnostics for a fitted model
diagnostics.default Posterior diagnostics for a fitted model
diagnostics.sbc Posterior diagnostics for a fitted model
diagnostic_summary Comprehensive Diagnostic Summary
dic DIC and CPO
dic.default DIC and CPO
durbin_watson Durbin-Watson test for temporal autocorrelation

-- F --

fitted.tulpa_fit Fitted values (population level)
fit_spde Fit a Spatial Model using SPDE Laplace Approximation
fit_st_nested Fit an additive spatiotemporal GLM by nested Laplace
fixef Fixed-effect coefficients (lme4-compatible)
fixef.tulpa_fit Fixed-effect coefficients (lme4-compatible)

-- G --

geweke_test Geweke Convergence Test
glance.tulpa_fit Model-level summary statistics (broom-compatible)

-- I --

imh_laplace Independence Metropolis-Hastings with Laplace proposal
inference_mode_info Print inference mode information
is_auto_grid Is an outer-grid setting marked as a default?

-- L --

laplace_diagnostics Approximation-reliability diagnostics for a deterministic nested-Laplace fit
latent Mark an expression as a latent block in a tulpa formula
latent_factor Create a latent factor specification
latent_factors Extract latent factor posteriors from fit
logLik.tulpa_fit Log-likelihood at the posterior mean

-- M --

mala Metropolis-Adjusted Langevin Algorithm (MALA)
mcmc_draws MCMC chain draws from a fit
model_average Model-averaged predictions
moran_i Moran's I test for spatial autocorrelation in residuals

-- N --

nobs.tulpa_fit Number of observations in a tulpa fit
node_index Map cell identifiers to graph node indices
n_divergent Number of divergent transitions

-- P --

pathfinder Pathfinder: variational warm-start via L-BFGS + ELBO scoring
pit_residuals PIT (Probability Integral Transform) residuals
pit_residuals.default PIT (Probability Integral Transform) residuals
plot.sbc Simulation-based calibration
plot.tulpa_fit Plot fixed-effect posteriors
plot.tulpa_prior_predict Plot method for tulpa_prior_predict
plot.tulpa_st_summary Plot method for spatiotemporal effects
plot.tulpa_svc_posterior Plot method for tulpa_svc_posterior
plot.tulpa_temporal_posterior Plot method for tulpa_temporal_posterior
plot.tulpa_tvc_posterior Plot method for tulpa_tvc_posterior
plot_acf Plot Autocorrelation Functions
plot_divergences Plot Divergent Transitions
plot_energy Plot Energy Diagnostic (E-BFMI)
plot_ess Plot Effective Sample Size Diagnostic
plot_map Plot spatial predictions as a map
plot_map_panel Plot multiple maps in a grid
plot_pairs Plot Bivariate Parameter Posteriors (Pairs Plot)
plot_rhat Plot Rhat Convergence Diagnostic
posterior_predict Posterior predictive replicates
posterior_predict.tulpa_fit Posterior predictive replicates
posterior_sample Posterior parameter sample from a fit
post_hoc_lm Fit a post-hoc linear model on estimated parameters
pp_check Posterior predictive check
pp_check.tulpa_fit Posterior predictive check
predict.tulpa_fit Predict at new covariate values (population level)
print.tulpa_diagnostic_summary Print method for diagnostic summary
print.tulpa_geweke Print method for Geweke test
print.tulpa_gp Print method for tulpa_gp
print.tulpa_hsgp Print method for tulpa_hsgp
print.tulpa_latent Print method for tulpa_latent
print.tulpa_multiscale Print method for tulpa_multiscale
print.tulpa_nested_laplace Print method for nested-Laplace fits
print.tulpa_prior Print method for tulpa_prior
print.tulpa_priors Print method for tulpa_priors
print.tulpa_prior_predict Print method for tulpa_prior_predict
print.tulpa_rsr Print method for tulpa_rsr
print.tulpa_simulate Print method for tulpa_simulate
print.tulpa_spatial Print method for tulpa_spatial
print.tulpa_svc Print method for tulpa_svc
print.tulpa_svc_posterior Print method for tulpa_svc_posterior
print.tulpa_temporal Print method for tulpa_temporal
print.tulpa_temporal_gp Print method for tulpa_temporal_gp
print.tulpa_temporal_multiscale Print method for tulpa_temporal_multiscale
print.tulpa_temporal_posterior Print method for tulpa_temporal_posterior
print.tulpa_tvc Print method for tulpa_tvc
print.tulpa_tvc_posterior Print method for tulpa_tvc_posterior
priors_default Show default priors for a tulpa family
prior_beta Beta prior
prior_exponential Exponential prior
prior_from_spec Build a 'prior' list for 'tulpa_nested_laplace()' from a tulpa spec object
prior_gamma Gamma prior
prior_half_cauchy Half-Cauchy prior
prior_half_normal Half-normal prior
prior_normal Normal prior
prior_pc Penalized complexity (PC) prior
prior_predict Prior predictive simulation

-- R --

ranef Random-effect summaries
ranef.tulpa_fit Random-effect summaries
residuals.tulpa_fit Residuals from a tulpa fit
re_cov_pc_lkj_prior PC + LKJ hyperprior for a random-effect covariance
rubins_pool Pool multiple imputation draws via Rubin's rules

-- S --

sbc Simulation-based calibration
sbc.character Simulation-based calibration
sbc.default Simulation-based calibration
sbc_discrete Predictive shapes an SBC fitter reports
sbc_draws Predictive shapes an SBC fitter reports
sbc_mixture Predictive shapes an SBC fitter reports
sbc_normal Predictive shapes an SBC fitter reports
sbc_predictive Predictive shapes an SBC fitter reports
sbc_rank Predictive shapes an SBC fitter reports
select_main_params Select the "main" model parameters for diagnostic display
simulate.tulpa_fit Simulate responses from a fitted tulpa model
smooth_effects Extract fitted covariate smooths
spatial Areal spatially varying coefficient field
spatial_bym2 BYM2 spatial structure
spatial_car CAR / ICAR spatial structure
spatial_car_proper Proper CAR spatial structure
spatial_gp Gaussian process spatial structure (NNGP)
spatial_multiscale Multi-Scale Gaussian Process spatial structure
spatial_range Extract spatial range and variance from a fitted spatial model
spatial_rsr Restricted Spatial Regression (RSR)
spatial_spde SPDE Spatial Field (Matern via Triangular Mesh)
spatial_spde_custom SPDE Spatial Field from Custom Matrices
spatial_svc Spatially varying coefficient structure
spatiotemporal Spatiotemporal interaction specifications for tulpa
spatiotemporal_effects Extract spatiotemporal effects from fitted model
spatiotemporal_effects.tulpa_fit Extract spatiotemporal effects from fitted model
spatiotemporal_gp Non-separable spatiotemporal GP
summary.sbc Simulation-based calibration
summary.tulpa_fit Posterior summary of the fixed effects
summary.tulpa_svc_posterior Summary method for tulpa_svc_posterior
summary.tulpa_temporal_posterior Summary method for tulpa_temporal_posterior
summary.tulpa_tvc_posterior Summary method for tulpa_tvc_posterior
svc Extract spatially-varying coefficients from a fitted model
svc.tulpa_fit Extract spatially-varying coefficients from a fitted model

-- T --

temporal Extract temporal effects from a fitted model
temporal.tulpa_fit Extract temporal effects from a fitted model
temporal_ar AR(p) temporal latent field (general-order autoregressive)
temporal_ar1 AR1 temporal structure (First-order Autoregressive)
temporal_ar2 AR(2) temporal latent field (second-order autoregressive)
temporal_corr Extract temporal correlation parameters from a fitted model
temporal_gp Gaussian Process temporal structure
temporal_multiscale Multi-scale temporal structure
temporal_rtr Restricted temporal regression (RTR)
temporal_rw1 RW1 temporal structure (First-order Random Walk)
temporal_rw2 RW2 temporal structure (Second-order Random Walk)
temporal_tvc Time-varying coefficient structure
test_dispersion Test for over- or underdispersion
test_dispersion.default Test for over- or underdispersion
test_outliers Test for outliers (simulation envelope)
test_outliers.default Test for outliers (simulation envelope)
test_uniformity Test uniformity of PIT residuals
test_zero_inflation Test for zero inflation
test_zero_inflation.default Test for zero inflation
tgmrf User-defined GMRF latent block
tgmrf_cpp User-defined GMRF latent block, compiled C++ backend
tidy.tulpa_fit Tidy fixed-effect table (broom-compatible)
tulpa Fit a tulpa model
tulpa_bar_field_replicate Replicate an areal graph across the levels of a factor (replicated CAR)
tulpa_bar_field_specs Expand a varying-coefficient bar into per-column field specs
tulpa_cache_clear Remove compiled blocks from the tgmrf_cpp() cache
tulpa_cache_dir Default cache directory for 'tgmrf_cpp()'-compiled DLLs
tulpa_check_control Validate a 'control = list()' surface against its canonical key set
tulpa_criteria Model criteria from a pointwise log-likelihood
tulpa_diagnostics Simulation-Based Diagnostics for tulpa Models
tulpa_draws_array Posterior draws as a 3D array
tulpa_eb Empirical-Bayes random-effect covariances
tulpa_em_laplace Fit a latent-variable model via EM + Laplace approximation
tulpa_em_mc Generic Monte-Carlo EM driver
tulpa_ep Expectation-Propagation fit for a GLM
tulpa_family Construct a minimal tulpa_family for simulation
tulpa_formula Formula parsing for tulpa models
tulpa_gaussian Fit a Gaussian linear model via tulpa's generic engine
tulpa_gibbs Fit via Polya-Gamma Gibbs sampler
tulpa_hyper_grid Outer hyperparameter-grid integration with a user-supplied inner fit
tulpa_integrator Select the symplectic integrator for HMC and NUTS
tulpa_is_spatial_bar Recognize an inline varying-coefficient bar
tulpa_kfold K-fold cross-validation for a tulpa fit
tulpa_laplace Fit a model via Laplace approximation
tulpa_laplace_beta Fit a beta-regression model via Laplace, estimating the precision
tulpa_latent Latent Factor Specification for Unmeasured Confounders
tulpa_loglik Streaming pointwise log-likelihood
tulpa_multinomial Multinomial (nominal K-class) logistic regression via Laplace
tulpa_nested_laplace Nested Laplace approximation for latent Gaussian models
tulpa_nested_laplace_joint Joint multi-likelihood nested Laplace approximation
tulpa_nuts_beta Fit a beta-regression model via NUTS (joint sampling of beta + log_phi)
tulpa_nuts_spde Sample an SPDE GLM via NUTS, optionally jointly over Matern hypers
tulpa_ordinal Ordinal (ordered K-class) cumulative-logit regression via Laplace
tulpa_parse_formula Parse a mixed-model formula
tulpa_pit Probability integral transform from a predictive CDF
tulpa_posterior_draws Posterior draws from a nested-Laplace fit
tulpa_posterior_draws.tulpa_nested_laplace_joint Posterior draws from a joint nested-Laplace fit
tulpa_powerscale_sensitivity Power-scaling prior / likelihood sensitivity
tulpa_priors Prior specification for tulpa models
tulpa_profile Profile the inner Laplace solve by phase
tulpa_psis Pareto-smoothed importance sampling
tulpa_reloo Selective refit of high-Pareto-k observations (reloo)
tulpa_re_aghq Adaptive Gauss-Hermite refinement of a grouped random-effect covariance
tulpa_re_cov_gibbs Gibbs estimation of random-effect covariances (exact-target debias)
tulpa_re_cov_nested Nested-Laplace integration over random-effect covariances
tulpa_simulate Simulate data from a tulpa model
tulpa_spatial Spatial structure specifications for tulpa
tulpa_temporal Temporal structure specifications for tulpa
tulpa_tgmrf Fit a custom tgmrf latent block
tulpa_validate Posterior predictive checks for tulpa models
tulpa_variogram Empirical semivariogram of residuals
tvc Extract temporally-varying coefficients from a fitted model
tvc.tulpa_fit Extract temporally-varying coefficients from a fitted model

-- V --

validate_mode Validate that a fit used the expected mode
VarCorr Random-effect variances and correlations
VarCorr.tulpa_fit Random-effect variances and correlations
vcov.tulpa_fit Variance-covariance matrix of the fixed effects

-- W --

with_tulpa_integrator Run an expression under a chosen symplectic integrator