# \donttest{
if (interactive()) {
n <- 100
DT <- data.frame(
t_norm = seq_len(n) / n,
I = rpois(n, 5),
Regime = factor(sample(c("A","B"), n, TRUE)),
EconCycle = rnorm(n), PopDensity = runif(n),
Epidemics = rbinom(n, 1, 0.1), Climate = rnorm(n), War = rbinom(n, 1, 0.05),
log_exposure50 = log(runif(n, 40, 60))
)
r_I <- prewhiten_count_glm(DT, "I")
head(r_I)
}
# }
Run the code above in your browser using DataLab