Bayesian Statistics, Data Science, Linear Regression, Data Analysis, R.
== "Control", rep(base_time_control, each = measurements_per_animal), rep(base_time_treatment, each = measurements_per_animal)) # Add random noise to each measurement to increase within-animal variability data$TimeSpent <- data$BaseTime + rnorm(nrow(data), mean = 0, sd = 30) # Ensure TimeSpent