BayesianARIMAX: Bayesian Estimation of ARIMAX Model

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

The Autoregressive Integrated Moving Average (ARIMA) model is very popular univarite time series model. Its application has been widened by the incorporation of exogenous variable(s) (X) in the model and modified as ARIMAX . The details of the model are documented effectively by Bierens (1987) <doi:10.1016/0304-4076(87)90086-8>. In this package we estimate the ARIMAX model using Bayesian framework. We have assumed priors to follow Normal distribution and the posteriors are obtained using Markov chain Monte Carlo (MCMC) algorithm.

Usage

1
BayesARIMAX(Y,X,sd,iter,burnIn,nc,p,d,q)

Arguments

Y

a univariate time series data

X

a univariate or multivariate time series data to be used as covariate or exogenous variable for Y

sd

sd is the standard deviation of the Normal priors assigned to each parameter. Default value is taken as 10.

iter

iter is the number of iterations for the Markov chain Monte Carlo (MCMC) chain. Default value is 100.

burnIn

burnIn is the number of iterations to be excluded from the estimate of the chain. Default value is 40.

nc

nc is the number of chains used for calculating the diagnostic statistics. Default value is 2.

p

p is the order of AR parameter of ARIMA model. Default value is 1.

d

d is the order of differencing used for making the series sationary. Default value is 1.

q

q is the he order of MA parameter of ARIMA model. Default value is 1.

Details

The Autoregressive Integrated Moving Average (ARIMA) model is very popular univariate time sereis model. The details of the model along with its implementation using R has been well documented by Shumway and Stoffer (2017) <https://doi.org/10.1007/978-3-319-52452-8> Its application has been widened by the incorpoartion of exogenous variable(s) (X) in the model and modified as ARIMAX.In this package we have estimated this model using Bayesian technique. Metropilis-Hasting algorithm is used to generate the posterior density of the model parameters. Normal distribution is used as priors for each parameter of the model following Fioruci et al., (2014).

Value

It returns the Bayesian estimates of the ARIMAX model.

Note

This package cab be used to analyse ARIMAX model using Normal priors for the parameters. The users need to identify the tentative ARIMA model by themselves.

Author(s)

Achal Lama,Kn Singh and Bishal Gurung

References

Bierens, H.J.(1987)<https://doi.org/10.1016/0304-4076(87)90086-8>

Fioruci et al.(2014)<https://doi.org/10.1080/02664763.2013.839635>

Metropolis et al.(1953)<https://doi.org/10.1063/1.1699114>

Shumway, R.H. and Stoffer, D.S.(2017)<https://doi.org/10.1007/978-3-319-52452-8>

See Also

arimax,arima

Examples

1
2
3
4
set.seed(121)
Y<- arima.sim(list(order = c(1,1,1),ar=0.7,ma=0.4), n = 49)
X=rnorm(50,4,1)
BayesARIMAX(Y,X)

Example output

Loading required package: coda
Loading required package: forecast
Registered S3 method overwritten by 'quantmod':
  method            from
  as.zoo.data.frame zoo 
[[1]]

Call:
arima(x = Y, order = c(p, d, q), xreg = X, include.mean = TRUE, method = c("ML"), 
    kappa = 1e+06)

Coefficients:
         ar1     ma1        X
      0.5499  0.5034  -0.1459
s.e.  0.1343  0.1288   0.0575

sigma^2 estimated as 0.7875:  log likelihood = -64.25,  aic = 136.49

[[2]]

Iterations = 1:101
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 101 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

       Mean    SD Naive SE Time-series SE
[1,]  9.126 3.362   0.3345          1.350
[2,]  8.504 2.587   0.2574          0.918
[3,] 10.044 4.420   0.4398          1.724

2. Quantiles for each variable:

        2.5%   25%    50%    75% 97.5%
var1  0.5499 8.034 10.563 11.145 11.14
var2  0.5034 8.946  8.946  9.798 10.04
var3 -0.1459 8.240  9.765 13.604 13.60


[[3]]

Iterations = 1:101
Thinning interval = 1 
Number of chains = 1 
Sample size per chain = 101 

1. Empirical mean and standard deviation for each variable,
   plus standard error of the mean:

      Mean    SD Naive SE Time-series SE
[1,] 7.146 2.767   0.2753         0.7699
[2,] 6.853 2.177   0.2166         0.7892
[3,] 8.087 2.551   0.2538         0.8474

2. Quantiles for each variable:

        2.5%   25%   50%   75% 97.5%
var1  0.5499 6.034 8.304 8.762 8.762
var2  0.5034 6.807 7.067 8.259 8.259
var3 -0.1459 7.570 8.539 9.624 9.624


[[4]]
Potential scale reduction factors:

     Point est. Upper C.I.
[1,]       1.43        9.1
[2,]       5.82       55.6
[3,]       1.59        9.8

Multivariate psrf

94.9

[[5]]
[[5]]$shrink
, , median

         [,1]     [,2]      [,3]
51  19.173897 9.573301 17.153038
52  13.892420 7.309810 12.876341
53  11.395900 6.322308 10.956774
54  10.109175 5.860450 10.026353
55   9.092431 5.533397  9.339057
56   8.499443 5.369882  8.972674
57   7.920922 5.235773  8.647665
58   7.584989 5.178179  8.484710
59   7.206404 5.133398  8.326856
60   6.074357 4.939096  5.677366
61   5.258360 4.790344  4.579258
62   4.755448 4.682414  3.984481
63   4.291419 4.604630  3.555691
64   3.997267 4.542824  3.275460
65   3.680437 4.509427  3.032246
66   3.484351 4.475429  2.865723
67   3.245544 4.473688  2.704300
68   3.076617 4.469650  2.580578
69   2.862869 4.501256  2.450563
70   2.737400 4.505272  2.359376
71   2.561720 4.553750  2.257137
72   2.464406 4.564073  2.187144
73   2.314539 4.629255  2.104026
74   2.236751 4.644679  2.048770
75   2.105474 4.727198  1.979606
76   2.041987 4.746879  1.935102
77   1.924883 4.848131  1.876589
78   1.872390 4.871473  1.840218
79   1.766824 4.993689  1.790127
80   1.723185 5.020274  1.760081
81   1.627822 5.166691  1.716838
82   1.591652 5.196240  1.691818
83   1.506245 5.371414  1.654271
84   1.476665 5.403749  1.633308
85   1.401951 5.614073  1.600585
86   1.416568 5.449562  1.603187
87   1.387165 5.489967  1.593665
88   1.402204 5.353792  1.596743
89   1.377190 5.428192  1.588888
90   1.392466 5.312036  1.592410
91   1.372503 5.419977  1.586327
92   1.387819 5.318177  1.590272
93   1.373762 5.462080  1.586134
94   1.388900 5.370494  1.590491
95   1.381804 5.555796  1.588559
96   1.396521 5.471125  1.593329
97   1.397605 5.707155  1.593987
98   1.411636 5.626477  1.599179
99   1.422209 5.928401  1.602989
100  1.435283 5.848739  1.608625
101  1.427715 5.818898  1.585572

, , 97.5%

          [,1]     [,2]       [,3]
51  118.678468 58.80280 106.102840
52   85.790014 44.57217  79.452152
53   70.207462 38.32418  67.462340
54   62.157972 35.38720  61.639344
55   55.785383 33.30168  57.332388
56   52.060953 32.25512  55.032979
57   48.422048 31.39658  52.992237
58   46.304717 31.02609  51.967495
59   43.916142 30.73891  50.975194
60   17.521114 23.65241  12.425510
61   12.472389 19.75596  10.562306
62   10.562682 17.46274   9.844210
63    9.262062 15.87129   9.308052
64    8.540863 14.82486   8.917848
65    7.825231 14.01155   8.541315
66    7.404700 13.44902   8.244184
67    6.896738 12.99181   7.946014
68    6.511989 12.62663   7.733777
69    6.028062 12.33107   7.496120
70    5.734596 12.10313   7.299795
71    5.330684 11.93791   7.074776
72    5.096502 11.79598   6.894610
73    4.746811 11.72443   6.683297
74    4.554202 11.64008   6.519051
75    4.243703 11.64252   6.321845
76    4.081970 11.59883   6.172663
77    3.801459 11.66522   5.989375
78    3.663774 11.65164   5.854043
79    3.407635 11.77832   5.684121
80    3.289484 11.78800   5.561276
81    3.054584 11.97645   5.403982
82    2.952912 12.00489   5.292237
83    2.737992 12.26184   5.146758
84    2.650651 12.30609   5.044771
85    2.455855 12.64505   4.910296
86    2.506053 12.03975   4.923287
87    2.459040 11.99600   4.907838
88    2.514052 11.68845   4.923030
89    2.494362 12.00840   4.920210
90    2.554872 11.84657   4.937466
91    2.574500 12.53591   4.949377
92    2.641731 12.45653   4.968578
93    2.722660 13.66042   4.998124
94    2.798655 13.63025   5.019161
95    2.983989 15.72763   5.070397
96    3.072106 15.71869   5.093156
97    3.454381 19.68991   5.171856
98    3.560077 19.64758   5.196199
99    4.362417 28.50354   5.310795
100   4.494017 28.22301   5.336526
101   4.422589 28.07773   5.130394


[[5]]$last.iter
 [1]  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69
[20]  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88
[39]  89  90  91  92  93  94  95  96  97  98  99 100 101

BayesARIMAX documentation built on July 8, 2020, 5:52 p.m.