Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
| Download
Project: Testing 18.04
Path: r-marima.ipynb
Views: 613Kernel: R (R-Project)
Marima R library in CoCalc
Multivariate ARIMA and ARIMA-X estimation using Spliid's algorithm (marima()) and simulation (marima.sim()).
In [1]:
Out[1]:
_
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 4.4
year 2018
month 03
day 15
svn rev 74408
language R
version.string R version 3.4.4 (2018-03-15)
nickname Someone to Lean On
In [2]:
Out[2]:
All cases in data, 1 to 90 accepted for completeness.
90 7 = MARIMA - dimension of data
arma.filter is being called
indicators for means= 1 1 1 1 1 1 1
dim(yseries) 7 94
In [3]:
Out[3]:
Input data is transformed from type = 'time series' (is.ts)
to matrix).Sampling information is ignored. One line is one sample at a
certain time point.All cases in data, 1 to 90 accepted for completeness.
90 7 = MARIMA - dimension of data
Calling arma.forecast.
In the example the input series is dim(length,kvar).
and of type ts() (timeseries) for illustration.
Input series is type ts (timeseries).
It will be changed to matrix(...) using as.matrix(...).
Data matrix is to be transposed. Done!
7 Variables in series , with required length = 100 .
print AR-model:
, , 1
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,] 1 0 0 0 0 0 0
[2,] 0 1 0 0 0 0 0
[3,] 0 0 1 0 0 0 0
[4,] 0 0 0 1 0 0 0
[5,] 0 0 0 0 1 0 0
[6,] 0 0 0 0 0 1 0
[7,] 0 0 0 0 0 0 1
, , 2
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,] 0 0.00000000 0.0000000 0.00000000 0.00000000 0.00000000 0.0000000
[2,] 0 -0.56193313 -0.8153282 0.03416575 0.00000000 0.57325886 0.0000000
[3,] 0 -0.06075435 -0.3170937 0.00000000 -0.06694902 0.09659622 0.0000000
[4,] 0 0.65334775 -1.6631316 -0.82681628 -0.47195995 -0.96665683 0.3252574
[5,] 0 0.00000000 0.0000000 0.00000000 -0.98009562 0.00000000 0.0000000
[6,] 0 0.00000000 0.0000000 0.00000000 0.00000000 0.00000000 0.0000000
[7,] 0 0.00000000 0.0000000 0.00000000 0.00000000 0.00000000 0.0000000
print MA-model:
, , 1
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,] 1 0 0 0 0 0 0
[2,] 0 1 0 0 0 0 0
[3,] 0 0 1 0 0 0 0
[4,] 0 0 0 1 0 0 0
[5,] 0 0 0 0 1 0 0
[6,] 0 0 0 0 0 1 0
[7,] 0 0 0 0 0 0 1
, , 2
[,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,] 0 0.0000000 0 0.00000000 0.0000000 0 0
[2,] 0 0.0000000 0 0.13025444 -0.2351108 0 0
[3,] 0 0.0000000 0 0.03905407 0.0000000 0 0
[4,] 0 0.5857279 0 0.00000000 0.0000000 0 0
[5,] 0 0.0000000 0 0.00000000 -0.7163302 0 0
[6,] 0 0.0000000 0 0.00000000 0.0000000 0 0
[7,] 0 0.0000000 0 0.00000000 0.0000000 0 0
variable no. 6 not random and regressor.
Variable no. 6 : future values seem OK.
variable no. 7 not random and regressor.
Variable no. 7 : future values seem OK.
Constant = 1959.5 1.192804 0.0959164 2.100926 0.02197434 0.1 0.5
Calculation of forecasting variances.
[,1] [,2] [,3] [,4] [,5]
Year 2005.0000000 2006.0000000 2007.0000000 2008.000000 2009.0000000
Predict 1.0007788 1.0616231 1.1506043 1.255826 1.3746265
upper.lim 1.4853282 1.7435373 1.9073152 2.044681 2.1785422
lower.lim 0.5162294 0.3797088 0.3938934 0.466970 0.5707108
[,6] [,7] [,8] [,9] [,10]
Year 2010.000000 2011.0000000 2012.0000000 2013.000000 2014.000000
Predict 1.505758 1.6481673 1.8008414 1.962812 2.133170
upper.lim 2.317438 2.4642980 2.6198021 2.783731 2.955526
lower.lim 0.694079 0.8320367 0.9818807 1.141893 1.310814
In [4]:
Out[4]:
arma.filter is being called
indicators for means= 1 1 1 1
dim(yseries) 4 16
arma.filter is being called
indicators for means= 1 1 1 1
dim(yseries) 4 28
arma.filter is being called
indicators for means= 1 1 1 1
dim(yseries) 4 24
arma.filter is being called
indicators for means= 1 1 1 1 1 1
dim(yseries) 6 220
In [0]: