unitroot_kpss():unitroot_kpss() reports the p-value associated with the KPSS test.Close':unitroot_ndiffs() to find how mnay differences will be needed before the test detects a unit root.
unitroot_nsdiffs() for seasonal data.aus_retail).unitroot_nsdiffs():

\[ y_{t} = c + \phi_{1} y_{t-1} + \phi_{2} y_{t-2} + ... + \phi_{p} y_{t-p} + \epsilon_{t} \]
ARIMA() (more later). Specify \(p\) in the first argument of the function.ar_fit <- aus_total_retail |>
mutate(diff_log_turnover = difference(difference(log(Turnover),12),1)) |>
model(ar2 = ARIMA(diff_log_turnover ~ pdq(2,0,0)))
glance(ar_fit)# A tibble: 1 × 8
.model sigma2 log_lik AIC AICc BIC ar_roots ma_roots
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <list> <list>
1 ar2 0.000350 1089. -2168. -2168. -2148. <cpl [26]> <cpl [0]>