View source: R/utils_average_trend.R
merge_average_df | R Documentation |
Merge average df with predictions with original data frame
merge_average_df(
avg_df,
df,
response,
average_cols,
group_col,
obs_filter,
sort_col,
pred_col,
pred_upper_col,
pred_lower_col,
test_col
)
avg_df |
Data frame with average trends. |
df |
Data frame of model data. |
response |
Column name of response variable. |
average_cols |
Column name(s) of column(s) for use in grouping data for averaging, such as regions. If missing, uses global average of the data for infilling. |
group_col |
Column name(s) of group(s) to use in |
obs_filter |
String value of the form " If `group_models = FALSE`, then `obs_filter` is only used to determine when predicted values replace observed values but **is not** used to restrict values from being used in model fitting. If `group_models = TRUE`, then a model is only fit for a group if they meet the `obs_filter` requirements. This provides speed benefits, particularly when running INLA time series using `predict_inla()`. |
sort_col |
Column name(s) to use to |
pred_col |
Column name to store predicted value. |
pred_upper_col |
Column name to store upper bound of confidence interval
generated by the |
pred_lower_col |
Column name to store lower bound of confidence interval
generated by the |
test_col |
Name of logical column specifying which response values to remove
for testing the model's predictive accuracy. If |
Original data frame with new trend joined up.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.