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

View source: R/ar_mean.R

ar_meanR Documentation

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 class 'linear'
ar_mean(object, ...)

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

## S3 method for class '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

## 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)

tsDyn documentation built on Oct. 31, 2024, 5:08 p.m.