library(stUPscales)
library(EmiStatR)
data(P1)
colnames(P1)
new_data <- t(matrix(data = rep(runif(nrow(P1), 10, 100), 5), nrow = nrow(P1), ncol = 5))
new_summary <- MC.summary(p1 = P1, data = new_data)
str(new_summary)
head(new_summary)
# deterministic simulation
det <- rnorm(nrow(P1), 45, .15)
# level of aggregation
delta <- 60*2 # 2 hours
new_summary_agg <- MC.summary.agg(summ = new_summary, det, delta, func.agg = mean, func.agg.p = sum)
str(new_summary_agg)
head(new_summary_agg)
Run the code above in your browser using DataLab