Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

npar.arma

Count the number of parameters in an ARIMA model specification.


Description

Count the number of parameters in an ARIMA model specification. When arima==FALSE, just the AR and MA parameters are counted. When arima==TRUE, then the number of difference parameters are also included.

Usage

npar.arma(x, arima=FALSE)
npar.sarma(model, arima=FALSE)
npar.rarma(arma, arima=FALSE)

Arguments

x

An "arima" object in S-Plus or a "Arima" object in R.

model

A model specification in the S-Plus style.

arma

A arma specification in the R style

arima

Logical. TRUE is number of differencings is to be counted.

Value

A scalar number giving the count.

Author(s)

Richard M. Heiberger (rmh@temple.edu)

Examples

co2.arima <-
  if.R(s=
       arima.mle(co2, list(list(order=c(0,1,1)),
                           list(order=c(0,1,1), period=12)))
       ,r=
       arima(co2, 
             order=c(0,1,1),
             seasonal=list(order=c(0,1,1), period=12))
       )

npar.arma(co2.arima)

npar.arma(co2.arima, arima=TRUE)

npar.sarma(list(list(order=c(0,1,1)),
                list(order=c(0,1,1), period=12)))

npar.sarma(list(list(order=c(0,1,1)),
                list(order=c(0,1,1), period=12)),
           arima=TRUE)

if.R(s={},
     r=npar.rarma(co2.arima$arma)
)
if.R(s={},
     r=npar.rarma(co2.arima$arma,
           arima=TRUE)
)

HH

Statistical Analysis and Data Display: Heiberger and Holland

v3.1-43
GPL (>= 2)
Authors
Richard M. Heiberger
Initial release
2020-11-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.