Below are the solutions to these exercises on “MCMC Using STAN – Visualization With The Shinystan Package.” #### Run the folowing lines before doing the exercises # ================================================================ ## Vector of packages to use in this report pkgs <- c(“shinystan”, “rstan”, “rstanarm”, “bayesplot”, “evd”) ## Install packages From CRAN if they are not installed. for […]

## MCMC Using STAN – Visualization With The Shinystan Package: Exercises

This final post about the STAN platform will specifically focus on data visualizations that can come from STAN models. In particular, we will explore these visualizations by hand with the popular shinystan package. As we already know, the STAN platform typically uses particular Markov Chain Monte Carlo (MCMC) algorithms: the Hamiltonian Monte Carlo (HMC) or […]

## MCMC Using STAN – Diagnostics With The Bayesplot Package: Solutions

Below are the solutions to these exercises on “MCMC Using STAN – Diagnostics With The Bayesplot Package: Exercises”. #### Run the folowing lines before doing the exercises # ================================================================ ## Vector of packages to use in this report pkgs <- c(“bayesplot”, “rstan”, “rstanarm”) ## Install packages From CRAN if they are not installed. for (p […]

## MCMC Using STAN – Diagnostics With The Bayesplot Package: Exercises

This exercise set will continue to present the STAN platform, but with another useful tool: the bayesplot package. This package is very useful to construct diagnostics that can be used to have insights on the convergence of the MCMC sampling since the convergence of the generated chains is the main issue in most STAN models. […]

## MCMC Using STAN – Introduction With The Rstanarm Package: Solutions

Below are the solutions to these exercises on “MCMC using STAN – Introduction with rstanarm package: Exercises”. #### Run the folowing lines before doing the exercises # ================================================================ ## Vector of packages to use in this report pkgs <- c(“rstan”, “rstanarm”, “tidyverse”) ## Install packages From CRAN if they are not installed. for (p in […]

## MCMC Using STAN – Introduction With The Rstanarm Package: Exercises

This exercise set will continue the introduction to the STAN platform and its main features. Whereas the first post introduced the rstan package, we will now present the rstanarm package and related features. The goal here is to fit a series of regressions predicting cognitive test scores of children given characteristics of their mothers, using […]

## MCMC Using STAN – An Introduction With The RSTAN Package: Exercises

This blog post is the first of a set of exercises about STAN that will introduce the STAN platform and how to link it with R. STAN is a statistical modeling platform that is used as an example for MCMC computations for Bayesian inference. It is more efficient for most analysis since it is written in […]

## MCMC Using STAN – An Introduction With The RSTAN Package: Solutions

Below are the solutions to these exercises on “MCMC Using STAN – An Introduction with The RSTAN Package: Exercises.” #### Run the folowing lines before doing the exercises # ================================================================ ## Vector of packages to use in this report pkgs <- c(“rstan”, “faraway”, “tidyverse”, “parallel”) ## Install packages From CRAN if they are not installed. […]

## Bayesian Inference Using The MCMCglmm Package: Solutions

Below are the solutions to these exercises on “Bayesian Inference Using The MCMCglmm Package.” #### Run the folowing lines before doing the exercises # ================================================================ ## Vector of packages to use in this report pkgs <- c(‘MCMCglmm’, “coda”, “tidyverse”, “reshape2”, “gridExtra”) ## Install packages From CRAN if they are not installed. for (p in pkgs) […]

## Bayesian Inference Using The MCMCglmm Package: Exercises

This post presents exercises using the MCMCglmm package in order to compute parameter estimates in a Bayesian fashion, relying on Mark Chain Monte Carlo (MCMC) methods. The MCMCglmm package typically deals with Generalized Linear (Mixed) Models (GLMM). This package mainly uses Gibbs Sampling to update the parameters, but also the Metropolis-Hastings. Course notes are available […]