
Ensure multivariate grouping is set
Source:R/class-forecast-multivariate-sample.R
ensure_mv_grouping.RdShared helper for multivariate forecast constructors. Applies
set_grouping() when joint_across is provided, or checks that
.mv_group_id already exists.
Arguments
- data
A data.frame (or similar) with predicted and observed values. See the details section of for additional information on the required input format.
- joint_across
Character vector with columns names that define the variables which are forecasted jointly. Conceptually, several univariate forecasts are pooled together to form a single multivariate forecasts. For example, if you have a column
countryand want to define a multivariate forecast for several countries at once, you could setjoint_across = "country".