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

## Modeling With ANCOVA – Part 1: Exercises

In the previous exercise on the #REcology series, we learned how to define the impact of one explanatory variable to another response variable. In a real practice, particularly in experimental or observational design, explanatory variables are often found to be more than one. Thus, it needs a new determination to analyze the data-set and generate […]

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

## Numerical Analysis Using R – Part 1: Exercises

In addition to statistical packages, R has powerful libraries that are useful for Numerical Analysis. R has a package cmna for computational numerical analysis. Finding zeros of a function and matrix operations are two key topics in Numerical Analysis. In this blog, we will do exercises on three topics: finding zeros of a function, solving […]

## Graphics With Lattice: Part 2: Exercises

We will continue working with Lattice and see some more things that are possible to do with lattice. The answers to these exercises are available here. You can also check the previous before diving into it. Exercise 1 Create a Box whisker plot from the diamonds data-set, where I want to see the price’s distribution (ex. […]

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

## PDF tables with kableExtra and RMarkdown – exercises

INTRODUCTION The goal of this tutorial is to introduce you to kableExtra, which you can use to build common complex tables and manipulate table styles. It imports the pipe %>% symbol from magrittr and verbalizes all the functions in order to permit you to add “layers” to the kable output. In combination with R Markdown, […]

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