gmap: Basis Transformation of a Model.

Description Usage Arguments Details Value Examples

View source: R/dse1.R

Description

Transform the basis for the state by a given invertible matrix.

Usage

1
    gmap(g, model)

Arguments

g

An invertible matrix

model

An object of class TSmodel.

Details

If the input model is in state space form g is a change of basis for the state. If the input model is in ARMA form then the polynomials are premultiplied by g. If g is a scalar it is treated as a diagonal matrix.

Value

An equivalent model transformed using g.

Examples

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

Example output

Loading required package: tfplot
Loading required package: tframe

Attaching package: 'dse'

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

    acf, simulate


 F =
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
 [1,]    0    0    0    0    0    0    0    0    0     0     0     0     0
 [2,]    0    0    0    0    0    0    0    0    0     0     0     0     0
 [3,]    0    0    0    0    0    0    0    0    0     0     0     0     0
 [4,]    1    0    0    0    0    0    0    0    0     0     0     0     0
 [5,]    0    1    0    0    0    0    0    0    0     0     0     0     0
 [6,]    0    0    1    0    0    0    0    0    0     0     0     0     0
 [7,]    0    0    0    1    0    0    0    0    0     0     0     0     0
 [8,]    0    0    0    0    1    0    0    0    0     0     0     0     0
 [9,]    0    0    0    0    0    1    0    0    0     0     0     0     0
[10,]    0    0    0    0    0    0    1    0    0     0     0     0     0
[11,]    0    0    0    0    0    0    0    1    0     0     0     0     0
[12,]    0    0    0    0    0    0    0    0    1     0     0     0     0
[13,]    0    0    0    0    0    0    0    0    0     1     0     0     0
[14,]    0    0    0    0    0    0    0    0    0     0     1     0     0
[15,]    0    0    0    0    0    0    0    0    0     0     0     1     0
[16,]    0    0    0    0    0    0    0    0    0     0     0     0     1
[17,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[18,]    0    0    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15]        [,16]        [,17]        [,18]
 [1,]     0     0  0.082008166 -0.066322053 -0.115616348
 [2,]     0     0  0.038919428  0.009703382  0.115944209
 [3,]     0     0 -0.007823026 -0.068859673  0.025264756
 [4,]     0     0  0.067027108  0.087934957 -0.316974768
 [5,]     0     0  0.024890008  0.052195412 -0.015138322
 [6,]     0     0  0.028192857 -0.004832597  0.207879665
 [7,]     0     0  0.078706928 -0.012801413  0.425960682
 [8,]     0     0  0.102169750  0.163238356 -0.150373125
 [9,]     0     0 -0.002685166  0.014355904  0.197912183
[10,]     0     0  0.042937314  0.115719388  0.679370293
[11,]     0     0  0.032306141  0.263227910  0.009171148
[12,]     0     0  0.008238734 -0.031480706  0.051976566
[13,]     0     0  0.015219148  0.221345314  0.020146770
[14,]     0     0  0.039741608  0.092955553 -0.262550823
[15,]     0     0  0.012624418  0.047810873  0.201673308
[16,]     0     0 -0.114163303  0.417786916  0.253110874
[17,]     1     0  0.049894329 -0.155696562 -0.049735728
[18,]     0     1  0.006112607  0.074242237  0.034046467

 G =
               [,1]
 [1,]  6.303078e-04
 [2,]  8.204797e-06
 [3,]  4.332454e-05
 [4,]  5.118263e-04
 [5,]  2.125143e-06
 [6,] -5.186552e-05
 [7,]  1.212263e-03
 [8,] -1.603650e-05
 [9,] -6.287769e-05
[10,] -2.718026e-04
[11,] -5.495875e-05
[12,]  1.076345e-04
[13,] -2.016130e-03
[14,]  7.749988e-06
[15,]  6.979710e-05
[16,] -2.114623e-04
[17,]  1.461978e-04
[18,] -4.762434e-05

 H =
     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
[1,]    0    0    0    0    0    0    0    0    0     0     0     0     0     0
[2,]    0    0    0    0    0    0    0    0    0     0     0     0     0     0
[3,]    0    0    0    0    0    0    0    0    0     0     0     0     0     0
     [,15] [,16] [,17] [,18]
[1,]     0     2     0     0
[2,]     0     0     2     0
[3,]     0     0     0     2

 K =
              [,1]         [,2]         [,3]
 [1,]  0.041004083 -0.033161026 -0.057808174
 [2,]  0.019459714  0.004851691  0.057972105
 [3,] -0.003911513 -0.034429837  0.012632378
 [4,]  0.033513554  0.043967479 -0.158487384
 [5,]  0.012445004  0.026097706 -0.007569161
 [6,]  0.014096429 -0.002416299  0.103939832
 [7,]  0.039353464 -0.006400707  0.212980341
 [8,]  0.051084875  0.081619178 -0.075186563
 [9,] -0.001342583  0.007177952  0.098956091
[10,]  0.021468657  0.057859694  0.339685146
[11,]  0.016153071  0.131613955  0.004585574
[12,]  0.004119367 -0.015740353  0.025988283
[13,]  0.007609574  0.110672657  0.010073385
[14,]  0.019870804  0.046477776 -0.131275411
[15,]  0.006312209  0.023905436  0.100836654
[16,] -0.057081652  0.208893458  0.126555437
[17,]  0.024947165 -0.077848281 -0.024867864
[18,]  0.003056303  0.037121119  0.017023234

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