This function will obtain the coefficients (and associated statistics) for each model in the mable.

# S3 method for class 'mdl_df'
tidy(x, ...)

# S3 method for class 'mdl_df'
coef(object, ...)

# S3 method for class 'mdl_ts'
tidy(x, ...)

# S3 method for class 'mdl_ts'
coef(object, ...)

Arguments

x, object

A mable.

...

Arguments for model methods.

Examples

library(fable)
library(tsibbledata)

olympic_running %>%
  model(lm = TSLM(log(Time) ~ trend())) %>% 
  tidy()
#> # A tibble: 28 × 8
#>    Length Sex   .model term        estimate std.error statistic  p.value
#>     <int> <chr> <chr>  <chr>          <dbl>     <dbl>     <dbl>    <dbl>
#>  1    100 men   lm     (Intercept)  2.41     0.00813     297.   2.01e-47
#>  2    100 men   lm     trend()     -0.00482  0.000429    -11.2  1.78e-11
#>  3    100 women lm     (Intercept)  2.52     0.0143      176.   5.28e-32
#>  4    100 women lm     trend()     -0.00501  0.000657     -7.62 3.41e- 7
#>  5    200 men   lm     (Intercept)  3.11     0.00664     468.   8.18e-51
#>  6    200 men   lm     trend()     -0.00479  0.000344    -14.0  2.66e-13
#>  7    200 women lm     (Intercept)  3.24     0.0229      142.   3.21e-26
#>  8    200 women lm     trend()     -0.00590  0.000992     -5.94 2.07e- 5
#>  9    400 men   lm     (Intercept)  3.92     0.00885     443.   5.98e-52
#> 10    400 men   lm     trend()     -0.00551  0.000467    -11.8  6.04e-12
#> # ℹ 18 more rows