Description Usage Arguments Value Examples
Find the just-in-time summarised response and weight for new data
as informed by a ppgrid
object.
As train_ppgrid
, merge_ppgrid
expects ordered vectors.
1 | merge_ppgrid(id_var, time_var, ppgrid, na_fill = FALSE)
|
id_var |
Vector identifying the groups. |
time_var |
Numeric vector of time, there is no support for character time vectors or other datetime datatypes yet. |
ppgrid |
|
na_fill |
Boolean: whether to merge the furthest in the future values from train_ppgrid in the event that the new data's times are more advanced than the trained range. |
list containing the merged mean response and total weight for the
input after merging with ppgrid
. Ordered as input vectors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | set.seed(1234)
ppdf <- make_longitudinal_data(1000)
ppdf_train <- ppdf[ppdf$date < 1150, ]
ppdf_test <- ppdf[ppdf$date >= 1150, ]
ppgrid <- train_ppgrid(ppdf_train$id,
ppdf_train$date,
ppdf_train$resp,
lag = 25,
window_size = 25,
granularity = 25)
merge_ppgrid(ppdf_test$id,
ppdf_test$date,
ppgrid)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.