In the following example, we will load a dataset containing performance scores for employees. We will observe four records for each employee. For each time step, each employee will receive either the traditional or the boost compensation package. We want to find out whether there are differences between the two compensation packages:
- First, we need to load the necessary libraries and the dataset that we will use:
library(ggplot2)library(nlme)data_company = read.csv("./repeated_measures.csv")
- We will plot the responses for each employee. Here, we want to determine whether the Time/Performance slopes are the same between employees or not. We can see that the slopes (Performance-Time) are similar, so it doesn't seem necessary ...