model()
, apply augment()
to it.model()
, apply augment()
to it.model()
, apply augment()
to it.augment()
:# A tsibble: 180 x 6 [1Q]
# Key: .model [3]
.model Quarter Beer .fitted .resid .innov
<chr> <qtr> <dbl> <dbl> <dbl> <dbl>
1 Mean 1992 Q1 443 436. 6.55 6.55
2 Mean 1992 Q2 410 436. -26.4 -26.4
3 Mean 1992 Q3 420 436. -16.4 -16.4
4 Mean 1992 Q4 532 436. 95.6 95.6
5 Mean 1993 Q1 433 436. -3.45 -3.45
6 Mean 1993 Q2 421 436. -15.4 -15.4
7 Mean 1993 Q3 410 436. -26.4 -26.4
8 Mean 1993 Q4 512 436. 75.6 75.6
9 Mean 1994 Q1 449 436. 12.6 12.6
10 Mean 1994 Q2 381 436. -55.4 -55.4
# ℹ 170 more rows
Innovation residuals should… - be uncorrelated - have zero mean - be homoskedastic - be Normally distributed
-Produce a histogram of the innovation residuals:
-Produce a histogram of the innovation residuals:
tsresiduals()
to produce all of these:tsresiduals()
to produce all of these:box_pierce
and ljung_box
options in features()
.
lag
= \(l\).# A tibble: 1 × 4
Symbol .model bp_stat bp_pvalue
<chr> <chr> <dbl> <dbl>
1 GOOG NAIVE(Close) 7.74 0.654
# A tibble: 1 × 4
Symbol .model lb_stat lb_pvalue
<chr> <chr> <dbl> <dbl>
1 GOOG NAIVE(Close) 7.91 0.637