BayesRTMB Analysis Reference18 days ago
0. How To Read This Page | Goal-Oriented Quick Navigation | 1. Analysis Workflow | 1.1 Choosing An Estimation Method | 2. Function Overview | 2.1 Model Definition | 2.2 Wrapper Functions | 2.3 Estimation Methods | 3. Common Fit-Object Methods | 3.1 estimate(), EAP(), and MAP() | 3.2 pars And component | 4. MCMC_Fit | 4.1 Main Methods | 4.2 draws() | 4.3 summary() And diagnose() | 4.4 transformed_draws() And generated_quantities() | 4.5 Bridge Sampling And Bayes Factors | 4.6 WAIC | 5. MAP_Fit | 5.1 Main Methods | 5.2 num_estimate And The Best Run | 5.3 Using Optimization Results As Initial Or Fixed Values | 5.4 profile() | 5.5 WAIC For MAP Fits | 6. VB_Fit | 6.1 Main Methods | 6.2 num_estimate And Best Estimate | 6.3 Checking Convergence With plot_elbo() | 6.4 WAIC For VB Fits | 7. Classic_Fit | 7.1 Main Methods | 7.2 ANOVA | 7.3 AIC, BIC, And logLik | 7.4 robust_se() | 7.5 lsmeans() | 8. Model Comparison And Evaluation Criteria | 8.1 Bayes Factor | 8.2 WAIC | 8.3 AIC/BIC | 8.4 ELBO | 9. Fixing Parameters With fixed | 9.1 Checking Parameter Names | 9.2 Internal Handling Of fixed | 9.3 Limitations Of fixed | 9.4 Using Optimization Results As Fixed Values | 9.5 Using MCMC Results As Fixed Values | 9.6 fixed And Bayes Factors | 10. rtmb_code() Blocks | 10.1 What Belongs In setup | 10.2 What Belongs In transform | 10.3 What Belongs In generate | 10.4 Choosing Between transform And generate | 11. Parameter Declarations And Types | 11.1 Dimensions | 11.2 Constraints | 11.3 random = TRUE | 12. Distribution Overview | 12.1 Continuous Distributions | 12.2 Discrete Distributions | 12.3 Multivariate And Matrix Distributions | 12.4 Mixtures And Special Distributions | 13. Math And Stabilization Functions | 14. AD Taping And Performance | 14.1 Use setup | 14.2 Prefer Vectorization | 14.3 Avoid apply-Style Functions In AD Code | 14.4 Notes On if And ifelse | 14.5 rtmb_vector() And rtmb_array() | 14.6 Taping Time And AD Evaluation Speed | 14.7 Patterns To Avoid Inside AD Tapes | 15. Common Recipes | 15.1 Get Only Estimates From MCMC | 15.2 Use MAP Initial Values For MCMC | 15.3 Extract Only Generated Quantities | 15.4 Extract Draws Including Random Effects | 15.5 Check VB Convergence | 15.6 Compare Models With Classic Estimation | 15.7 Compare Coefficient Inclusion With A Bayes Factor | 15.8 Build A Fixed Model Explicitly | 15.9 Upgrade An Old Fit Object | 15.10 Run MCMC In Parallel | 16. Caveats
BayesRTMB 0.2.3Hiroshi Shimizu analysis_reference.Rmd