Learn R Programming

fable (version 0.0.0.9000)

LM: Fit a linear model with time series components

Description

Fit a linear model with time series components

Usage

LM(data, formula, ...)

Arguments

data

A data frame

formula

Model specification.

...

Additional arguments passed to lm

Examples

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

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

Run the code above in your browser using DataLab