Learn R Programming

tsDyn (version 11.0.4.1)

ar_mean: Long-term mean of an AR(p) process

Description

Computes the long term mean of an AR process

Usage

ar_mean(object, ...)

# S3 method for linear ar_mean(object, ...)

# S3 method for setar ar_mean(object, ...)

# S3 method for lstar ar_mean(object, ...)

Arguments

object

an object of class linear, setar or lstar

...

unused argument

Details

The function computes the long-term mean of an AR(p) process, or of the corresponding sub-regimes in SETAR or LSTAR model. There are three possible cases:

No constant nor trend

The LT mean is 0

constant

The LT mean is given by const/(1-sum(AR coefs))

Trend

The LT mean is not defined

Examples

Run this code
## 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