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 […]

# Exercises (intermediate)

## Practice You ggplot Skills: Exercises

ggplot2 is a great tool for complex data visualization. Let’s practice it a bit! Answers to these exercises are available here. For each exercise, please replicate the given graph. Some exercises require additional data wrangling. If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your […]

## Regular Expressions Fundamentals – Exercises

Regular expressions is one of the skills you need to drill and drill until they become second nature. You never know when you will need them, just that you WILL need them. In this exercise set, we will go through some of the fundamentals relying on base R only. If you are already an expert, […]

## Tensorflow – Linear Regression: Exercises

In this set of exercises, we will go through the basics of Regression Analysis Using [Tensorflow](https://www.tensorflow.org/). By the end of this post, you will be able to perform regression analysis with linearly separable data. It is recommended to check out the (tutorial)[Click here] before starting the exercises. We will use the ‘mtcars’ built-in data-set. Before […]

## Tidy Model Results: Exercises

Common problems with complex modeling analysis with R is that model results are often complex objects and getting to values, like model coefficients, demand a lot of manipulations; others vary from one model to another. Fortunately, the broom package provides nice and easy to use solutions to the problem. Answers to the exercises are available here. […]

## Bayesian Inference – MCMC Diagnostics using coda : Exercises

This post presents the main convergence diagnostics of Markov chains for Bayesian inference. We have seen a first introduction of Bayesian inference with Markov Chain Monte Carlo (MCMC) techniques in previous posts (here and here). Exercises related to the two main MCMC algorithms used to do Bayesian inference have been presented : Gibbs sampler and […]

## Tidy Modeling: Exercises

One of greatest things about tidiverse is the piping operator %>%, along with the fact that everything is designed to work well with it. The same applies to modeling with the modelr package that this set aims to exercise. Answers to these exercises are available here. Please do all exercises using the tidiverse package. It will involve […]

## MCMC For Bayesian Inference – Gibbs Sampling: Exercises

In the last post, we saw that the Metropolis sampler can be used in order to generate a random sample from a posterior distribution that cannot be found analytically. Following the same idea, Gibbs sampling is a popular Markov Chain Monte Carlo (MCMC) technique that is more efficient, in general, since the updates of the […]

## Add Some Spark to Your Analysis- Sparklyr: Exercise 3

In this Exercise set, we will see some more functionalities of Sparklyr and some extended capabilities that are available in Spark. Answer to this exercise are available here. For other parts of this series, please follow the tag spark. Please go through the documentation before attempting the exercise. Exercise 1 Load the library and the […]

## Stringr Basic Functions: Exercises

The more ubiquitious data becomes, the number of standards and ways the data can get to you in a messy state both increase. I’ve found that many projects I’ve worked on, to my surprise, turned out to need a substantial amount of text processing skills. Base R has some powerful tools to manipulate strings, but […]