It would look something like this in terms of inlabru code from the example
inlabru::bru(
formula = pr ~ avg_lower_age + Intercept +
overall(month_num,
model = "ar1",
constr = FALSE) +
who_region(month_num,
model = "ar1",
group = .who_region_id,
constr = FALSE) +
who_subregion(month_num,
model = "ar1",
group = .who_subregion_id,
constr = FALSE) +
country(month_num,
model = "ar1",
group = .country_id,
constr = FALSE),
family = "gaussian",
data = malaria_africa_ts,
options = list(
control.compute = list(config = TRUE),
control.predictor = list(compute = TRUE, link = 1)
)
)
One approach we (@goldingn) discussed was an interface like so:
hts_fit(y ~ x + hts(g3, g2, g1, overall = TRUE)
Another interface could be:
hts_fit(y ~ x + hts(g3, g2, g1) + overall()
And another way that this could work is to add another column that is just uniform values (like, all "overall"), and then to include that in the hts call. We could add some syntactic sugar to make that easier for users.
It would look something like this in terms of
inlabru
code from the exampleOne approach we (@goldingn) discussed was an interface like so:
Another interface could be:
And another way that this could work is to add another column that is just uniform values (like, all "overall"), and then to include that in the hts call. We could add some syntactic sugar to make that easier for users.