# NOT RUN {
library(dplyr)
library(psycho)
fit <- lm(Sepal.Length ~ Sepal.Width, data = iris)
results <- power_analysis(fit, n_max = 300, n_min = 100, step = 5, n_batch = 20)
results %>%
filter(Variable == "Sepal.Width") %>%
select(n, p) %>%
group_by(n) %>%
summarise(
p_median = median(p),
p_mad = mad(p)
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab