# Bayesian Inference Using 'RTMB'

## Documentation for package ‘BayesRTMB’ version 0.1.1

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A B C D E F G I L M P Q R S T V

## -- A --

ADVI_method | Automatic Differentiation Variational Inference (ADVI)

## -- B --

bayes_factor | Calculate Bayes Factor
beverage | Beverage Preference Data
BigFive | Big Five Personality Traits Data

## -- C --

Classic_Fit | Classic fit object
conditional_effects | Calculate Conditional Effects
conditional_effects.mcmc_fit | Calculate conditional effects for MCMC fit objects

## -- D --

debate | Debate Simulation Data
Dim | Define parameter dimensions and types
distance | Euclidean distance
distributions | Probability Distributions for RTMB Models

## -- E --

ess_basic | Basic Effective Sample Size for a single chain or pooled chains
ess_bulk | Calculate Bulk Effective Sample Size
ess_tail95 | Calculate Tail Effective Sample Size (at 2.5% and 97.5% quantiles)

## -- F --

fabs | Smooth absolute value function

## -- G --

gaussian_process_lpdf | Gaussian Process Log-Density (Squared Exponential Kernel)
generate_random_init | Generate Random Initial Values

## -- I --

inv_logit | Inverse logit function
item_curve | Calculate Item Response Curve / Category Response Curve
item_curve.RTMB_Fit_Base | Item Response Curve for RTMB_Fit_Base
item_info | Calculate Item Information Function
item_info.RTMB_Fit_Base | Item Information Function for RTMB_Fit_Base

## -- L --

log1m | Log of one minus x
log1m_exp | Log of one minus exponential of x
log1p_exp | Log of one plus exponential of x
logit | Logit function
log_det_chol | Log determinant of a Cholesky factor
log_mix | Log mixture of two probabilities
log_softmax | Log-softmax function
log_sum_exp | Log-sum-exp function
log_sum_exp_matrix | Log-sum-exp function for matrices (row-wise)
lsmeans | Least Squares Means (Marginal Means)

## -- M --

make_bw_from_ydif | Make Best and Worst Responses from Best-Worst Pair Indices
make_glmer_re_terms | Prepare GLMM Formula Components
make_glmer_Z_matrix | Reconstruct an Observation-Level Random-Effect Design Matrix
make_init_mdu | Create Initial Values for Multidimensional Unfolding
make_ydif_from_bw | Make Best-Worst Pair Indices from Best and Worst Responses
map_est | Maximum A Posteriori (MAP) Estimate
MAP_Fit | MAP fit object
math_functions | Mathematical and Matrix Utility Functions for RTMB Models
MCMC_Fit | MCMC fit object
model_code | Model Code Wrapper for RTMB

## -- P --

parameters_code | Code block for parameter definitions
parameter_types | Parameter Types and Constraints in RTMB Models
plot.ce_rtmb | Plot method for ce_rtmb class (Base R)
plot.rtmb_lsmeans | Plot marginal means with error bars
plot_acf | Plot autocorrelation for one variable across chains
plot_conditional_effects | Plot conditional effects
plot_dens | Plot posterior densities for MCMC samples
plot_forest | Plot parameter estimates and credible intervals (Forest Plot)
plot_item_curve | Plot item/category response curves
plot_item_info | Plot item information functions
plot_lsmeans | Plot least-squares marginal means
plot_mdu | Plot Multidimensional Unfolding Configuration
plot_pairs | Plot pairs for posterior samples
plot_test_info | Plot test information function
plot_trace | Plot MCMC trace plots
print.bayes_factor | Print method for bayes_factor objects
print.bayes_factor_rtmb | Print method for bayes_factor_rtmb objects
print.ce_rtmb | Print method for ce_rtmb class (automatically calls plot)
print.ce_simple | Print simple effects
print.summary_BayesRTMB | print for summary_BayesRTMB class
prior_flat | Specify a flat prior
prior_jzs | Specify a JZS (Jeffrey-Zellner-Siow) prior for t-tests
prior_normal | Specify normal/exponential priors for MAP and Bayesian inference
prior_rhs | Specify a Regularized Horseshoe prior for continuous shrinkage
prior_ssp | Specify a Spike-and-Slab prior for variable selection
prior_uniform | Specify a flat prior
prior_weak | Specify a weakly informative prior

## -- Q --

quad_form_chol | Quadratic form using a Cholesky factor
quad_form_diag | Quadratic form with a diagonal matrix
quantile95 | Calculate 95% Quantiles

## -- R --

read_mcmc_csv | Restore MCMC Fit from CSV
restore_bw_from_ydif | Make Best and Worst Responses from Best-Worst Pair Indices
rtmb_code | Define an RTMB Model with Stan-like Syntax
rtmb_corr | Fit a Correlation Model using RTMB
rtmb_fa | RTMB-based Factor Analysis Wrapper
RTMB_Fit_Base | Base class for RTMB Fit objects
rtmb_glm | RTMB-based GLM wrapper function (no random effects)
rtmb_glmer | RTMB-based GLMM wrapper function
rtmb_irt | RTMB-based IRT (Item Response Theory) Wrapper
rtmb_lm | RTMB-based Linear Regression wrapper function
rtmb_lmer | RTMB-based Linear Mixed Model (LMM) wrapper function
rtmb_loglinear | RTMB-based Log-linear analysis (Poisson regression)
rtmb_lrt | Fit a Latent Rank Theory (LRT) Model
rtmb_mdu | RTMB-based Multidimensional Unfolding Wrapper
rtmb_mediation | RTMB-based Mediation Analysis Wrapper
rtmb_mixture | Mixture Model Wrapper for RTMB
RTMB_Model | RTMB model object
rtmb_model | Create an RTMB_Model Object
RTMB_Model-class | RTMB model object
rtmb_syntax | Guidelines for Writing RTMB-Compatible Code
rtmb_table | RTMB-based Contingency Table Analysis (Chi-squared Test)
rtmb_ttest | RTMB-based Bayesian two-sample t-test wrapper function
rtmb_wrappers | Common Features and Arguments of RTMB Wrapper Functions
r_hat | Calculate Rank-normalized Split-R-hat

## -- S --

safe_rtmb_model | Safe RTMB model construction (with error message translation)
simple_effects | Calculate Simple Effects
simple_effects.mcmc_fit | Simple effects for MCMC fit objects
softmax | Softmax function
sort_loadings | Sort and display factor loadings neatly
squared_distance | Squared Euclidean distance
stz_basis | stz basis function
summary.ce_rtmb | Summary method for ce_rtmb class
sum_to_zero | Sum-to-zero transformation

## -- T --

test_info | Calculate Test Information Function
to_centered_matrix | Vector to centered matrix (RTMB compatible)
to_centered_tri | Vector to centered triangular matrix (RTMB compatible)
to_long | Convert Wide Data to Long Format
to_lower_tri | Vector to lower triangular matrix (RTMB compatible)
to_wide | Convert Long Data to Wide Format
training | Social Skills Training Data
transform_code | Transformed Code Wrapper for RTMB

## -- V --

validate_data | Pre-validation of data and parameters
VB_Fit | VB fit object