stability: Calculate Stability of a TSmodel

Description Usage Arguments Details Value Side Effects See Also Examples

View source: R/dse1.R

Description

Calculate roots and their modulus and indicate stability.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
    stability(obj, fuzz=1e-4, eps=1e-15, digits=8, verbose=TRUE)
    ## S3 method for class 'ARMA'
stability(obj, fuzz=1e-4, eps=1e-15, digits=8, verbose=TRUE)
    ## S3 method for class 'roots'
stability(obj, fuzz=1e-4, eps=1e-15, digits=8, verbose=TRUE)
    ## S3 method for class 'TSmodel'
stability(obj, fuzz=1e-4, eps=1e-15, digits=8, verbose=TRUE)
    ## S3 method for class 'TSestModel'
stability(obj, fuzz=1e-4, eps=1e-15, digits=8, verbose=TRUE)
    

Arguments

obj

An object of class TSmodel.

fuzz

Roots within fuzz are considered equal.

eps

Roots with modulus less than (1-eps) are considered stable.

digits

Printing precision.

verbose

Print roots and there moduli.

Details

The returned value is TRUE or FALSE, indicating if the model is stable or not. The result also has an attribute roots which is a matrix with the first (complex) column indicating the eigenvalues of the state transition matrix F for state space models, or the inverse of distinct roots of det(A(L)) for ARMA models, and the second column indicating the moduli of the roots.

The argument eps is used to prevents the indication of a stable model when the largest root is within rounding error of 1.0.

Value

TRUE or FALSE if the model is stable or not stable.

Side Effects

The eigenvalues of the state transition matrix or the roots of the determinant of the AR polynomial are printed if verbose is T.

See Also

McMillanDegree

Examples

1
2
3
data("eg1.DSE.data.diff", package="dse")
model <- estVARXls(eg1.DSE.data.diff)
stability(model)

Example output

Loading required package: tfplot
Loading required package: tframe

Attaching package: 'dse'

The following objects are masked from 'package:stats':

    acf, simulate

Distinct roots of det(A(L)) and moduli are:
                       [,1]         [,2]
 [1,]  1.0521278+0.0000000i 1.0521278+0i
 [2,]  1.0990113+0.0000000i 1.0990113+0i
 [3,]  0.2491415-1.3344611i 1.3575191+0i
 [4,]  0.2491415+1.3344611i 1.3575191+0i
 [5,] -1.3372485-0.3177546i 1.3744822+0i
 [6,] -1.3372485+0.3177546i 1.3744822+0i
 [7,] -0.8383124-1.1370545i 1.4126785+0i
 [8,] -0.8383124+1.1370545i 1.4126785+0i
 [9,] -1.1746236-0.8576943i 1.4544346+0i
[10,] -1.1746236+0.8576943i 1.4544346+0i
[11,]  0.5716895-1.3648808i 1.4797732+0i
[12,]  0.5716895+1.3648808i 1.4797732+0i
[13,] -0.3383163-1.4843545i 1.5224212+0i
[14,] -0.3383163+1.4843545i 1.5224212+0i
[15,]  1.6063855+0.0000000i 1.6063855+0i
[16,]  1.0729015-1.4655445i 1.8162980+0i
[17,]  1.0729015+1.4655445i 1.8162980+0i
[18,] -1.9865432+0.0000000i 1.9865432+0i
The system is stable.
[1] TRUE
attr(,"roots")
      Inverse of distinct roots of det(A(L))       moduli
 [1,]                   0.9504548+0.0000000i 0.9504548+0i
 [2,]                   0.9099088+0.0000000i 0.9099088+0i
 [3,]                   0.1351930+0.7241258i 0.7366379+0i
 [4,]                   0.1351930-0.7241258i 0.7366379+0i
 [5,]                  -0.7078379+0.1681952i 0.7275467+0i
 [6,]                  -0.7078379-0.1681952i 0.7275467+0i
 [7,]                  -0.4200676+0.5697634i 0.7078751+0i
 [8,]                  -0.4200676-0.5697634i 0.7078751+0i
 [9,]                  -0.5552778+0.4054563i 0.6875524+0i
[10,]                  -0.5552778-0.4054563i 0.6875524+0i
[11,]                   0.2610778+0.6233105i 0.6757793+0i
[12,]                   0.2610778-0.6233105i 0.6757793+0i
[13,]                  -0.1459665+0.6404246i 0.6568484+0i
[14,]                  -0.1459665-0.6404246i 0.6568484+0i
[15,]                   0.6225156+0.0000000i 0.6225156+0i
[16,]                   0.3252263+0.4442473i 0.5505705+0i
[17,]                   0.3252263-0.4442473i 0.5505705+0i
[18,]                  -0.5033870+0.0000000i 0.5033870+0i

dse documentation built on March 4, 2020, 3:01 a.m.