Data Science, Statistics, Analytics, Experiment, Causality.
<- matrix(rnorm(obs_per_week*num_week, 10, 1), nrow = obs_per_week, ncol = num_week) p_values[i, j] <- t.test( as.numeric(A[,1:j]), as.numeric(B[,1:j]) )$p.value } } p_values <- melt( p_values, varnames = c('simulation', 'week'), value.name = 'p_value' ) p_values <- data.table(p_values) # number of