tests/testthat/test-sarima-uar.R

## Do not edit this file manually.
## It has been automatically generated from *.org sources.
library(sarima)
context("Fitting Sarima models with estimated unit roots")

## 2018-08-23 wrapping the tests in test_that() and adding an expectation
##            in the hope that this will speed up valgrind.
test_that("Sarima and Arma models work ok", {
    expect_true(TRUE) # for now

## the air plane model (1-B)(1-B^12) + MA(1) + SMA(12, 1)
sarima(log(AirPassengers) ~ 0 | ma(1, c(-0.3)) + sma(12,1, c(-0.1)) + 
              i(1) + si(12,1), ss.method = "sarima")

## two ways to estimate the parameters of the unit root operator 
## to see if the result is similar (it is)
sarima(log(AirPassengers) ~ 0 | ma(1, c(-0.3)) + sma(12,1, c(-0.1)) + 
              uar(13, c(rep(0,12), 1), fixed = 13, atanh.tr = TRUE), ss.method = "sarima")

sarima(log(AirPassengers) ~ 0 | ma(1, c(-0.3)) + sma(12,1, c(-0.1)) + 
              i(2) + uar(11, c(rep(0,10), 1), fixed = 11), ss.method = "sarima")
})

Try the sarima package in your browser

Any scripts or data that you put into this service are public.

sarima documentation built on Aug. 11, 2022, 5:11 p.m.