Test for statistical significant difference between 2 groups repeated over 3 days with hourly values I have a dataset where I need to test whether there are significant differences between GroupA and GroupB.
GroupA and GroupB contain values obtained from an experiment that was repeated over 3 days (Day = 1, 2, 3). Measurements are obtained over 6 hours for each of the 3 days starting at 0 (Hour = 0, 1, 2, 3, 4, 5, 6). Since the data for the experiment are obtained hourly, the data within each group are not independent of each other.
I am not sure how to test for a significant difference if the values within a group are not independent. Any guidance will be greatly appreciated.

Assuming the measurements are continuous and reasonably normal,  one way to address your question is by means of a linear mixed model. This will include a dummy for the group, a random intercept for the statistical unit and a random intercept for day within each unit.
In R this can be done by the following command
library(nlme)
mod_lme <- lme(resp ~ group, random = ~ 1 | unit_id/day, 
               data = mydata)
summary(mod_lme)

To assess the difference between the two groups, just look at the confidence interval of the parameter associated with the variable group.
