Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Jun 17, 2024
1 parent 3a10213 commit 77a9e72
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ last_trends <- last_counts %>%
nest(.key = "data") %>%
mutate(model = lapply(data, function(d) {
MASS::glm.nb(count ~ date_index, d, control = glm.control(maxit = 1e3))
}))
}))
intervals <- last_trends %>%
mutate(result = Map(
function(data, model) {
data %>%
ciTools::add_ci(model, alpha = 0.05, names = c("lower_ci", "upper_ci")) %>%
ciTools::add_pi(model, alpha = 0.05, names = c("lower_pi", "upper_pi")) %>%
ciTools::add_ci(model, names = c("lower_ci", "upper_ci")) %>%
ciTools::add_pi(model, names = c("lower_pi", "upper_pi")) %>%
as_tibble()
},
data,
Expand All @@ -62,7 +62,7 @@ intervals <- last_trends %>%
dplyr::select(any_of(c(group_var, "result"))) %>%
unnest(result)
plot(last_counts, angle = 45) +
plot(last_counts, angle = 45) +
geom_line(
aes(date_index, y = pred),
data = intervals,
Expand Down Expand Up @@ -91,7 +91,7 @@ growth_rates <- last_trends %>%
unpack(growth)
message(colnames(growth_rates))
growth_rates <- growth_rates %>%
growth_rates <- growth_rates %>%
dplyr::select(all_of(c(group_var, "r", "r_lower", "r_upper")))
growth_rates %>%
Expand Down

0 comments on commit 77a9e72

Please sign in to comment.