# \donttest{
if (interactive()) {
n <- 100
DT <- data.frame(
t_norm = seq_len(n) / n,
I_zero = rbinom(n, 1, 0.3),
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)
)
r_I_zero <- prewhiten_bin_glm(DT, "I_zero")
head(r_I_zero)
}
# }
Run the code above in your browser using DataLab