as-fable function

Coerce to a fable object

Coerce to a fable object

as_fable(x, ...) ## S3 method for class 'tbl_ts' as_fable(x, response, distribution, ...) ## S3 method for class 'grouped_ts' as_fable(x, response, distribution, ...) ## S3 method for class 'tbl_df' as_fable(x, response, distribution, ...) ## S3 method for class 'fbl_ts' as_fable(x, response, distribution, ...) ## S3 method for class 'grouped_df' as_fable(x, response, distribution, ...) ## S3 method for class 'forecast' as_fable(x, ..., point_forecast = list(.mean = mean))

Arguments

  • x: Object to be coerced to a fable (fbl_ts)
  • ...: Additional arguments passed to methods
  • response: The character vector of response variable(s).
  • distribution: The name of the distribution column (can be provided using a bare expression).
  • point_forecast: The point forecast measure(s) which should be returned in the resulting fable. Specified as a named list of functions which accept a distribution and return a vector. To compute forecast medians, you can use list(.median = median).