Takes a list of times, classes and counts, e.g. a COGUK variant like data set
with time, (multinomial) class (e.g. variant) and count being the count in
that time period. Fits a quadratic B-spline on time to the proportion of the
data using nnet::multinom
, with approx one degree of freedom per class and per
window
units of the time series
Usage
multinomial_nnet_model(
d = i_multinomial_input,
...,
window = 14,
frequency = "1 day",
predict = TRUE
)
Arguments
- d
Multiclass count input
- ...
not used and present to allow proportion model to be used in a group_modify
- window
a number of data points between knots, smaller values result in less smoothing, large value in more.
- frequency
the density of the output estimates.
- predict
result a prediction. If false we return the model.