R: Refit an ETS model

refit.ETS {fable} | R Documentation

## Refit an ETS model

### Description

Applies a fitted ETS model to a new dataset.

### Usage

    ## S3 method for class 'ETS'
    refit(
      object,
      new_data,
      specials = NULL,
      reestimate = FALSE,
      reinitialise = TRUE,
      ...
    )

### Arguments

`object` | The time series model used to produce the forecasts
`new_data` | A `tsibble` containing future information used to forecast.
`specials` | (passed by `fabletools::forecast.mdl_df()`).
`reestimate` | If `TRUE`, the coefficients for the fitted model will be re-estimated to suit the new data.
`reinitialise` | If TRUE, the initial parameters will be re-estimated to suit the new data.
`...` | Additional arguments for forecast model methods.

### Examples

    lung_deaths_male <- as_tsibble(mdeaths)
    lung_deaths_female <- as_tsibble(fdeaths)

    fit <- lung_deaths_male %>%
      model(ETS(value))

    report(fit)

    fit %>%
      refit(lung_deaths_female, reinitialise = TRUE) %>%
      report()

[Package fable version 0.3.1 Index]