Skip to contents

Thin wrapper around arima() that fixes d = 0. Equivalent to arima(time, by, p = p, d = 0, q = q). For an integrated (random-walk) series use rw() or arima(time, by, p = 0, d = 1, q = 0) directly.

Usage

arma(time, by, p = 1, q = 1)

Arguments

time

Time variable for the latent series; numeric.

by

Optional grouping variable. Each group draws an independent shock series; AR/MA parameters and the latent standard deviation are shared across groups.

p

Autoregressive order. Defaults to 1.

q

Moving-average order. Defaults to 1.

Value

An enw_arima_term interpretable by construct_arima().

Examples

arma(time)
#> $time
#> [1] "time"
#> 
#> $by
#> NULL
#> 
#> $p
#> [1] 1
#> 
#> $d
#> [1] 0
#> 
#> $q
#> [1] 1
#> 
#> attr(,"class")
#> [1] "enw_arima_term"
arma(time, location, p = 1, q = 1)
#> $time
#> [1] "time"
#> 
#> $by
#> [1] "location"
#> 
#> $p
#> [1] 1
#> 
#> $d
#> [1] 0
#> 
#> $q
#> [1] 1
#> 
#> attr(,"class")
#> [1] "enw_arima_term"