df <- sim_design(within = list(time = 1:6),
mu = 1:6 + (1:6-3.5)^2,
long = TRUE, plot = FALSE)
df$time <- contr_code_poly(df$time)
lm(y ~ time, df) %>% broom::tidy()
Run the code above in your browser using DataLab