## estimate a (linear) AR, a SETAR and a LSTAR
lin_cst_l1 <- linear(lh, m = 1, include = "const")
set_cst_l1 <- setar(lh, m = 1, include = "const")
lst_cst_l1 <- lstar(lh, m = 1, include = "const", trace = FALSE)
ar_mean(lin_cst_l1)
ar_mean(set_cst_l1)
ar_mean(lst_cst_l1)
Run the code above in your browser using DataLab