library(dplyr)
library(lmomco)
tenterfield |>
mutate(month = lubridate::month(ym)) |>
init(id = id, time = ym, group = month) |>
temporal_aggregate(.agg = temporal_rolling_window(prcp, scale = 12)) |>
distribution_fit(.fit = dist_gamma(.agg, method = "lmoms"))
Run the code above in your browser using DataLab