This post will review a study published in the literature, and follow the steps to replicate the results using an independent samples t-test and calculating the effect size of the difference. The post will focus on the syntax to reproduce this example in R, however the dataset and syntax to run this example in stata will be linked.
I will follow the following steps, the objective is not only to understand how to run an independent samples t-test in R but also to understand why and when run this type of analysis. The steps will be as follows:
- Understanding the claims made in a research paper
- Think through the analysis that one needs to do to support this claims
- Replicate the results using a real dataset in R