Returns the coefficients from the model in a tibble
format.
# S3 method for class 'TSLM'
tidy(x, ...)
An object to be converted into a tidy tibble::tibble()
.
Additional arguments to tidying method.
The model's coefficients in a tibble
.
as_tsibble(USAccDeaths) %>%
model(lm = TSLM(log(value) ~ trend() + season())) %>%
tidy()
#> # A tibble: 13 × 6
#> .model term estimate std.error statistic p.value
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
#> 1 lm (Intercept) 9.03 0.0222 407. 1.88e-103
#> 2 lm trend() -0.00129 0.000286 -4.51 3.19e- 5
#> 3 lm season()year2 -0.0981 0.0287 -3.41 1.17e- 3
#> 4 lm season()year3 0.00511 0.0288 0.178 8.59e- 1
#> 5 lm season()year4 0.0325 0.0288 1.13 2.63e- 1
#> 6 lm season()year5 0.131 0.0288 4.57 2.57e- 5
#> 7 lm season()year6 0.183 0.0288 6.34 3.47e- 8
#> 8 lm season()year7 0.270 0.0288 9.39 2.60e- 13
#> 9 lm season()year8 0.201 0.0288 6.99 2.79e- 9
#> 10 lm season()year9 0.0882 0.0288 3.06 3.35e- 3
#> 11 lm season()year10 0.123 0.0289 4.26 7.54e- 5
#> 12 lm season()year11 0.0645 0.0289 2.23 2.94e- 2
#> 13 lm season()year12 0.0956 0.0289 3.31 1.62e- 3