Skip to contents

Thin wrapper around arima() that fixes p = 0 and d = 0. Equivalent to arima(time, by, p = 0, d = 0, q = q).

Usage

ma(time, by, 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.

q

Moving-average order. Defaults to 1.

Value

An enw_arima_term interpretable by construct_arima().

Examples

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