Fit a hierarchical time series model
fit_hts(
formula,
.data,
special_index,
family,
verbose = TRUE,
keep_data = TRUE,
...
)
formula must contain fixed effect terms and hts()
a tsibble
The variable that represents time in your data
character.
default TRUE, whether to display message
attach the data used to fit the model to the final model object?
list of options to pass to inlabru::bru
, see ?inlabru::bru
to see these options.
inlabru model
To weight your observations, say when using empirical logit, you must
provide a vector of variances, for each observation, which represents
the uncertainty of measurement. You can do this, provided the
family = "gaussian"
, add the argument, scale = vec
, to fit_hts
,
where vec
is a vector of variances for each observation.
if (FALSE) {
m <- fit_hts(
#inputs are the levels of hierarchy, in order of decreasing size
formula = pr ~ avg_lower_age + hts(who_subregion, country),
.data = malaria_africa_ts,
family = "gaussian",
special_index = month_num
)
}