Learn R Programming

fable (version 0.0.0.9000)

TSLM: Fit a linear model with time series components

Description

Fit a linear model with time series components

Usage

TSLM(data, formula, ...)

Arguments

data

A data frame

formula

Model specification.

...

Additional arguments passed to lm

Examples

Run this code
# NOT RUN {
USAccDeaths %>% as_tsibble %>% TSLM(log(value) ~ trend() + season())

library(tsibbledata)
olympic_running %>% 
  TSLM(Time ~ trend()) %>% 
  interpolate(olympic_running)
# }

Run the code above in your browser using DataLab