regressor.matrix: The regressor matrix function

Description Usage Arguments Value Author(s) Examples

Description

This function allows you to create a regressor matrix.

Usage

1

Arguments

y

Data vector of time series observations.

x

Matrix of data (every column represents one time series). Specify NULL or "not" if not wanted.

p

Number of autoregressive terms to be included.

Value

Z

Regressor matrix

Author(s)

Sean Telg

Examples

1
2
data <- sim.marx(c('t',3,1),c('t',1,1),100,0.5,0.4,0.3)
regressor.matrix(data$y, data$x, 2)

Example output

            [,1]       [,2]        [,3]
 [1,]  8.5451158  8.1968979  1.06502086
 [2,] 11.3063618  8.5451158  1.27949971
 [3,] 11.0385167 11.3063618  0.94085212
 [4,]  9.4033277 11.0385167 -0.66642186
 [5,]  9.4940080  9.4033277  1.58091756
 [6,] 15.4629949  9.4940080  1.46511776
 [7,] 10.2561526 15.4629949  0.17255496
 [8,]  6.4683459 10.2561526  0.62559780
 [9,]  3.6081962  6.4683459 -0.22881755
[10,]  1.9346081  3.6081962  0.42948572
[11,]  4.7919619  1.9346081  1.54321127
[12,]  6.6634309  4.7919619  1.31529070
[13,] 10.6224589  6.6634309 16.01504533
[14,] 16.6409840 10.6224589  4.56533650
[15,]  9.3694417 16.6409840  1.92045101
[16,]  7.0694546  9.3694417  2.25278197
[17,]  7.7150952  7.0694546 -2.37596396
[18,] 10.3942947  7.7150952  0.65904345
[19,]  7.7655989 10.3942947  0.31882692
[20,]  8.5947999  7.7655989  2.48789307
[21,]  9.0282641  8.5947999  2.19635823
[22,]  9.5789897  9.0282641 -0.31966137
[23,] 14.4789985  9.5789897 -0.46237840
[24,]  9.0857343 14.4789985  1.99539490
[25,]  7.6913400  9.0857343  2.76891330
[26,]  6.8170492  7.6913400 -0.80197747
[27,]  5.6985314  6.8170492  1.97795957
[28,]  5.6091510  5.6985314  0.81490882
[29,]  4.8198616  5.6091510  0.82012194
[30,]  4.7950220  4.8198616  1.22227014
[31,]  4.6093749  4.7950220  2.37298756
[32,]  7.3217400  4.6093749 -2.20777942
[33,]  4.3616266  7.3217400  0.12166360
[34,]  2.2703376  4.3616266  0.73854976
[35,]  2.1832441  2.2703376 11.61841930
[36,]  5.8982903  2.1832441  1.04772066
[37,]  5.0537952  5.8982903  0.11503054
[38,]  4.7439403  5.0537952  3.31348813
[39,]  4.9273208  4.7439403  5.73355263
[40,]  3.8704868  4.9273208  0.62153158
[41,]  5.5294904  3.8704868 -0.39899996
[42,]  7.8426469  5.5294904  6.06730505
[43,]  9.1822489  7.8426469  1.07152439
[44,]  7.2501022  9.1822489 -0.43119110
[45,]  5.9971265  7.2501022  0.06865518
[46,]  4.9849169  5.9971265  0.15477358
[47,]  3.4411413  4.9849169  3.47522988
[48,]  3.4453921  3.4411413  3.79195582
[49,]  4.5676418  3.4453921  1.20025222
[50,]  2.6958493  4.5676418 -0.48394843
[51,]  3.0895079  2.6958493  3.39627438
[52,]  5.4493722  3.0895079 -1.85451026
[53,]  3.3041157  5.4493722  0.33810635
[54,]  3.8020110  3.3041157 -1.09345914
[55,]  4.2502408  3.8020110 -0.81850044
[56,]  6.8299176  4.2502408  1.01148270
[57,]  3.9039657  6.8299176 -1.55777583
[58,]  1.8147718  3.9039657 -1.44726165
[59,]  2.4110941  1.8147718  0.79108425
[60,]  1.9271852  2.4110941 -0.81957436
[61,]  1.8507901  1.9271852  1.74509196
[62,]  0.9888177  1.8507901  5.07708424
[63,]  2.9435493  0.9888177  0.57200094
[64,]  4.3726969  2.9435493  2.62743267
[65,]  6.3286671  4.3726969 -0.08794102
[66,]  6.3641425  6.3286671  1.28818925
[67,]  6.0892361  6.3641425  1.90068788
[68,]  6.6904799  6.0892361  1.55360877
[69,]  5.5083234  6.6904799  0.70837985
[70,]  6.0158299  5.5083234  3.45335423
[71,]  3.9240663  6.0158299  0.97720594
[72,]  3.7553805  3.9240663  1.24061903
[73,]  4.5782464  3.7553805  3.21193065
[74,]  5.3033771  4.5782464  1.05773708
[75,]  3.7933037  5.3033771 -1.68902782
[76,]  4.9397606  3.7933037  0.47118120
[77,]  3.6560351  4.9397606  3.27838611
[78,]  5.4824160  3.6560351  6.88753026
[79,]  6.2580035  5.4824160  0.86823143
[80,]  6.2205411  6.2580035  8.16177003
[81,]  9.6443845  6.2205411  0.72045898
[82,] 16.7623757  9.6443845  1.54338975
[83,] 10.7540547 16.7623757  0.53949400
[84,]  5.6868092 10.7540547  1.47865974
[85,]  4.4523680  5.6868092  5.17906635
[86,]  4.8759170  4.4523680  3.01579914
[87,]  5.0627234  4.8759170  1.72781075
[88,]  5.6873978  5.0627234  0.86388724
[89,]  6.0278465  5.6873978 -0.13623023
[90,]  4.6219106  6.0278465  6.59480257
[91,]  6.3684259  4.6219106  1.62575460
[92,]  3.5163192  6.3684259  2.07034930
[93,]  4.7845808  3.5163192  5.89714576
[94,]  5.9182864  4.7845808  0.85456858
[95,] 11.0422590  5.9182864  1.23530008
[96,]  9.1767531 11.0422590  1.02715690
[97,]  9.4787310  9.1767531  0.36372565
[98,] 12.7321744  9.4787310 30.70507863

MARX documentation built on May 2, 2019, 3:42 a.m.

Related to regressor.matrix in MARX...