Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 24 Dec 2010 11:11:28 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/24/t129318901421gkjy1js2uf6vy.htm/, Retrieved Tue, 30 Apr 2024 06:59:07 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114765, Retrieved Tue, 30 Apr 2024 06:59:07 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact135
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [] [2008-12-08 19:22:39] [d2d412c7f4d35ffbf5ee5ee89db327d4]
- RMP   [ARIMA Forecasting] [forecast] [2010-12-15 12:20:18] [e73e9643c012a54583c6a406017b2645]
-         [ARIMA Forecasting] [ARIMA forecast] [2010-12-17 18:26:09] [78a5cb23fbaf3f7e43a4286844511628]
-   PD        [ARIMA Forecasting] [ARIMA forecast] [2010-12-24 11:11:28] [ceb2ed44284b8f8acb23efd9e695ff8a] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.35
1.91
1.31
1.19
1.3
1.14
1.1
1.02
1.11
1.18
1.24
1.36
1.29
1.73
1.41
1.15
1.31
1.15
1.08
1.1
1.14
1.24
1.33
1.49
1.38
1.96
1.36
1.24
1.35
1.23
1.09
1.08
1.33
1.35
1.38
1.5
1.47
2.09
1.52
1.29
1.52
1.27
1.35
1.29
1.41
1.39
1.45
1.53
1.45
2.11
1.53
1.38
1.54
1.35
1.29
1.33
1.47
1.47
1.54
1.59
1.5
2
1.51
1.4
1.62
1.44
1.29
1.28
1.4
1.39
1.46
1.49




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114765&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114765&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114765&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk







Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[60])
481.53-------
491.45-------
502.11-------
511.53-------
521.38-------
531.54-------
541.35-------
551.29-------
561.33-------
571.47-------
581.47-------
591.54-------
601.59-------
611.51.5631.44521.68080.14740.32660.96990.3266
6222.18152.0592.30410.001810.87371
631.511.5981.4711.7250.087300.85290.5491
641.41.42351.29221.55470.36310.09810.74180.0064
651.621.5951.45981.73020.35840.99760.78720.5287
661.441.40041.26141.53940.28830.0010.76140.0038
671.291.3711.22841.51350.13280.17130.86720.0013
681.281.35461.20861.50060.15820.80720.62958e-04
691.41.5181.36881.66730.06050.99910.7360.1723
701.391.51461.36231.66690.05440.92980.7170.1659
711.461.56721.4121.72250.08790.98740.63450.387
721.491.64871.49061.80690.02450.99040.76680.7668

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast \tabularnewline
time & Y[t] & F[t] & 95% LB & 95% UB & p-value(H0: Y[t] = F[t]) & P(F[t]>Y[t-1]) & P(F[t]>Y[t-s]) & P(F[t]>Y[60]) \tabularnewline
48 & 1.53 & - & - & - & - & - & - & - \tabularnewline
49 & 1.45 & - & - & - & - & - & - & - \tabularnewline
50 & 2.11 & - & - & - & - & - & - & - \tabularnewline
51 & 1.53 & - & - & - & - & - & - & - \tabularnewline
52 & 1.38 & - & - & - & - & - & - & - \tabularnewline
53 & 1.54 & - & - & - & - & - & - & - \tabularnewline
54 & 1.35 & - & - & - & - & - & - & - \tabularnewline
55 & 1.29 & - & - & - & - & - & - & - \tabularnewline
56 & 1.33 & - & - & - & - & - & - & - \tabularnewline
57 & 1.47 & - & - & - & - & - & - & - \tabularnewline
58 & 1.47 & - & - & - & - & - & - & - \tabularnewline
59 & 1.54 & - & - & - & - & - & - & - \tabularnewline
60 & 1.59 & - & - & - & - & - & - & - \tabularnewline
61 & 1.5 & 1.563 & 1.4452 & 1.6808 & 0.1474 & 0.3266 & 0.9699 & 0.3266 \tabularnewline
62 & 2 & 2.1815 & 2.059 & 2.3041 & 0.0018 & 1 & 0.8737 & 1 \tabularnewline
63 & 1.51 & 1.598 & 1.471 & 1.725 & 0.0873 & 0 & 0.8529 & 0.5491 \tabularnewline
64 & 1.4 & 1.4235 & 1.2922 & 1.5547 & 0.3631 & 0.0981 & 0.7418 & 0.0064 \tabularnewline
65 & 1.62 & 1.595 & 1.4598 & 1.7302 & 0.3584 & 0.9976 & 0.7872 & 0.5287 \tabularnewline
66 & 1.44 & 1.4004 & 1.2614 & 1.5394 & 0.2883 & 0.001 & 0.7614 & 0.0038 \tabularnewline
67 & 1.29 & 1.371 & 1.2284 & 1.5135 & 0.1328 & 0.1713 & 0.8672 & 0.0013 \tabularnewline
68 & 1.28 & 1.3546 & 1.2086 & 1.5006 & 0.1582 & 0.8072 & 0.6295 & 8e-04 \tabularnewline
69 & 1.4 & 1.518 & 1.3688 & 1.6673 & 0.0605 & 0.9991 & 0.736 & 0.1723 \tabularnewline
70 & 1.39 & 1.5146 & 1.3623 & 1.6669 & 0.0544 & 0.9298 & 0.717 & 0.1659 \tabularnewline
71 & 1.46 & 1.5672 & 1.412 & 1.7225 & 0.0879 & 0.9874 & 0.6345 & 0.387 \tabularnewline
72 & 1.49 & 1.6487 & 1.4906 & 1.8069 & 0.0245 & 0.9904 & 0.7668 & 0.7668 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114765&T=1

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast[/C][/ROW]
[ROW][C]time[/C][C]Y[t][/C][C]F[t][/C][C]95% LB[/C][C]95% UB[/C][C]p-value(H0: Y[t] = F[t])[/C][C]P(F[t]>Y[t-1])[/C][C]P(F[t]>Y[t-s])[/C][C]P(F[t]>Y[60])[/C][/ROW]
[ROW][C]48[/C][C]1.53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]2.11[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]1.53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]1.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]1.54[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]1.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]1.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]1.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1.47[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]1.47[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]1.54[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]1.59[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]1.5[/C][C]1.563[/C][C]1.4452[/C][C]1.6808[/C][C]0.1474[/C][C]0.3266[/C][C]0.9699[/C][C]0.3266[/C][/ROW]
[ROW][C]62[/C][C]2[/C][C]2.1815[/C][C]2.059[/C][C]2.3041[/C][C]0.0018[/C][C]1[/C][C]0.8737[/C][C]1[/C][/ROW]
[ROW][C]63[/C][C]1.51[/C][C]1.598[/C][C]1.471[/C][C]1.725[/C][C]0.0873[/C][C]0[/C][C]0.8529[/C][C]0.5491[/C][/ROW]
[ROW][C]64[/C][C]1.4[/C][C]1.4235[/C][C]1.2922[/C][C]1.5547[/C][C]0.3631[/C][C]0.0981[/C][C]0.7418[/C][C]0.0064[/C][/ROW]
[ROW][C]65[/C][C]1.62[/C][C]1.595[/C][C]1.4598[/C][C]1.7302[/C][C]0.3584[/C][C]0.9976[/C][C]0.7872[/C][C]0.5287[/C][/ROW]
[ROW][C]66[/C][C]1.44[/C][C]1.4004[/C][C]1.2614[/C][C]1.5394[/C][C]0.2883[/C][C]0.001[/C][C]0.7614[/C][C]0.0038[/C][/ROW]
[ROW][C]67[/C][C]1.29[/C][C]1.371[/C][C]1.2284[/C][C]1.5135[/C][C]0.1328[/C][C]0.1713[/C][C]0.8672[/C][C]0.0013[/C][/ROW]
[ROW][C]68[/C][C]1.28[/C][C]1.3546[/C][C]1.2086[/C][C]1.5006[/C][C]0.1582[/C][C]0.8072[/C][C]0.6295[/C][C]8e-04[/C][/ROW]
[ROW][C]69[/C][C]1.4[/C][C]1.518[/C][C]1.3688[/C][C]1.6673[/C][C]0.0605[/C][C]0.9991[/C][C]0.736[/C][C]0.1723[/C][/ROW]
[ROW][C]70[/C][C]1.39[/C][C]1.5146[/C][C]1.3623[/C][C]1.6669[/C][C]0.0544[/C][C]0.9298[/C][C]0.717[/C][C]0.1659[/C][/ROW]
[ROW][C]71[/C][C]1.46[/C][C]1.5672[/C][C]1.412[/C][C]1.7225[/C][C]0.0879[/C][C]0.9874[/C][C]0.6345[/C][C]0.387[/C][/ROW]
[ROW][C]72[/C][C]1.49[/C][C]1.6487[/C][C]1.4906[/C][C]1.8069[/C][C]0.0245[/C][C]0.9904[/C][C]0.7668[/C][C]0.7668[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114765&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114765&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[60])
481.53-------
491.45-------
502.11-------
511.53-------
521.38-------
531.54-------
541.35-------
551.29-------
561.33-------
571.47-------
581.47-------
591.54-------
601.59-------
611.51.5631.44521.68080.14740.32660.96990.3266
6222.18152.0592.30410.001810.87371
631.511.5981.4711.7250.087300.85290.5491
641.41.42351.29221.55470.36310.09810.74180.0064
651.621.5951.45981.73020.35840.99760.78720.5287
661.441.40041.26141.53940.28830.0010.76140.0038
671.291.3711.22841.51350.13280.17130.86720.0013
681.281.35461.20861.50060.15820.80720.62958e-04
691.41.5181.36881.66730.06050.99910.7360.1723
701.391.51461.36231.66690.05440.92980.7170.1659
711.461.56721.4121.72250.08790.98740.63450.387
721.491.64871.49061.80690.02450.99040.76680.7668







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0385-0.040300.00400
620.0287-0.08320.06180.0330.01850.1359
630.0406-0.05510.05950.00770.01490.122
640.047-0.01650.04886e-040.01130.1063
650.04330.01570.04216e-040.00920.0958
660.05060.02830.03980.00160.00790.0889
670.0531-0.05910.04260.00660.00770.0878
680.055-0.05510.04410.00560.00740.0863
690.0502-0.07780.04790.01390.00820.0903
700.0513-0.08230.05130.01550.00890.0943
710.0505-0.06840.05290.01150.00910.0956
720.0489-0.09630.05650.02520.01050.1023

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0385 & -0.0403 & 0 & 0.004 & 0 & 0 \tabularnewline
62 & 0.0287 & -0.0832 & 0.0618 & 0.033 & 0.0185 & 0.1359 \tabularnewline
63 & 0.0406 & -0.0551 & 0.0595 & 0.0077 & 0.0149 & 0.122 \tabularnewline
64 & 0.047 & -0.0165 & 0.0488 & 6e-04 & 0.0113 & 0.1063 \tabularnewline
65 & 0.0433 & 0.0157 & 0.0421 & 6e-04 & 0.0092 & 0.0958 \tabularnewline
66 & 0.0506 & 0.0283 & 0.0398 & 0.0016 & 0.0079 & 0.0889 \tabularnewline
67 & 0.0531 & -0.0591 & 0.0426 & 0.0066 & 0.0077 & 0.0878 \tabularnewline
68 & 0.055 & -0.0551 & 0.0441 & 0.0056 & 0.0074 & 0.0863 \tabularnewline
69 & 0.0502 & -0.0778 & 0.0479 & 0.0139 & 0.0082 & 0.0903 \tabularnewline
70 & 0.0513 & -0.0823 & 0.0513 & 0.0155 & 0.0089 & 0.0943 \tabularnewline
71 & 0.0505 & -0.0684 & 0.0529 & 0.0115 & 0.0091 & 0.0956 \tabularnewline
72 & 0.0489 & -0.0963 & 0.0565 & 0.0252 & 0.0105 & 0.1023 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114765&T=2

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast Performance[/C][/ROW]
[ROW][C]time[/C][C]% S.E.[/C][C]PE[/C][C]MAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][/ROW]
[ROW][C]61[/C][C]0.0385[/C][C]-0.0403[/C][C]0[/C][C]0.004[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.0287[/C][C]-0.0832[/C][C]0.0618[/C][C]0.033[/C][C]0.0185[/C][C]0.1359[/C][/ROW]
[ROW][C]63[/C][C]0.0406[/C][C]-0.0551[/C][C]0.0595[/C][C]0.0077[/C][C]0.0149[/C][C]0.122[/C][/ROW]
[ROW][C]64[/C][C]0.047[/C][C]-0.0165[/C][C]0.0488[/C][C]6e-04[/C][C]0.0113[/C][C]0.1063[/C][/ROW]
[ROW][C]65[/C][C]0.0433[/C][C]0.0157[/C][C]0.0421[/C][C]6e-04[/C][C]0.0092[/C][C]0.0958[/C][/ROW]
[ROW][C]66[/C][C]0.0506[/C][C]0.0283[/C][C]0.0398[/C][C]0.0016[/C][C]0.0079[/C][C]0.0889[/C][/ROW]
[ROW][C]67[/C][C]0.0531[/C][C]-0.0591[/C][C]0.0426[/C][C]0.0066[/C][C]0.0077[/C][C]0.0878[/C][/ROW]
[ROW][C]68[/C][C]0.055[/C][C]-0.0551[/C][C]0.0441[/C][C]0.0056[/C][C]0.0074[/C][C]0.0863[/C][/ROW]
[ROW][C]69[/C][C]0.0502[/C][C]-0.0778[/C][C]0.0479[/C][C]0.0139[/C][C]0.0082[/C][C]0.0903[/C][/ROW]
[ROW][C]70[/C][C]0.0513[/C][C]-0.0823[/C][C]0.0513[/C][C]0.0155[/C][C]0.0089[/C][C]0.0943[/C][/ROW]
[ROW][C]71[/C][C]0.0505[/C][C]-0.0684[/C][C]0.0529[/C][C]0.0115[/C][C]0.0091[/C][C]0.0956[/C][/ROW]
[ROW][C]72[/C][C]0.0489[/C][C]-0.0963[/C][C]0.0565[/C][C]0.0252[/C][C]0.0105[/C][C]0.1023[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114765&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114765&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0385-0.040300.00400
620.0287-0.08320.06180.0330.01850.1359
630.0406-0.05510.05950.00770.01490.122
640.047-0.01650.04886e-040.01130.1063
650.04330.01570.04216e-040.00920.0958
660.05060.02830.03980.00160.00790.0889
670.0531-0.05910.04260.00660.00770.0878
680.055-0.05510.04410.00560.00740.0863
690.0502-0.07780.04790.01390.00820.0903
700.0513-0.08230.05130.01550.00890.0943
710.0505-0.06840.05290.01150.00910.0956
720.0489-0.09630.05650.02520.01050.1023



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 2 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 2 ; par9 = 0 ; par10 = FALSE ;
R code (references can be found in the software module):
par1 <- as.numeric(par1) #cut off periods
par2 <- as.numeric(par2) #lambda
par3 <- as.numeric(par3) #degree of non-seasonal differencing
par4 <- as.numeric(par4) #degree of seasonal differencing
par5 <- as.numeric(par5) #seasonal period
par6 <- as.numeric(par6) #p
par7 <- as.numeric(par7) #q
par8 <- as.numeric(par8) #P
par9 <- as.numeric(par9) #Q
if (par10 == 'TRUE') par10 <- TRUE
if (par10 == 'FALSE') par10 <- FALSE
if (par2 == 0) x <- log(x)
if (par2 != 0) x <- x^par2
lx <- length(x)
first <- lx - 2*par1
nx <- lx - par1
nx1 <- nx + 1
fx <- lx - nx
if (fx < 1) {
fx <- par5
nx1 <- lx + fx - 1
first <- lx - 2*fx
}
first <- 1
if (fx < 3) fx <- round(lx/10,0)
(arima.out <- arima(x[1:nx], order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5), include.mean=par10, method='ML'))
(forecast <- predict(arima.out,par1))
(lb <- forecast$pred - 1.96 * forecast$se)
(ub <- forecast$pred + 1.96 * forecast$se)
if (par2 == 0) {
x <- exp(x)
forecast$pred <- exp(forecast$pred)
lb <- exp(lb)
ub <- exp(ub)
}
if (par2 != 0) {
x <- x^(1/par2)
forecast$pred <- forecast$pred^(1/par2)
lb <- lb^(1/par2)
ub <- ub^(1/par2)
}
if (par2 < 0) {
olb <- lb
lb <- ub
ub <- olb
}
(actandfor <- c(x[1:nx], forecast$pred))
(perc.se <- (ub-forecast$pred)/1.96/forecast$pred)
bitmap(file='test1.png')
opar <- par(mar=c(4,4,2,2),las=1)
ylim <- c( min(x[first:nx],lb), max(x[first:nx],ub))
plot(x,ylim=ylim,type='n',xlim=c(first,lx))
usr <- par('usr')
rect(usr[1],usr[3],nx+1,usr[4],border=NA,col='lemonchiffon')
rect(nx1,usr[3],usr[2],usr[4],border=NA,col='lavender')
abline(h= (-3:3)*2 , col ='gray', lty =3)
polygon( c(nx1:lx,lx:nx1), c(lb,rev(ub)), col = 'orange', lty=2,border=NA)
lines(nx1:lx, lb , lty=2)
lines(nx1:lx, ub , lty=2)
lines(x, lwd=2)
lines(nx1:lx, forecast$pred , lwd=2 , col ='white')
box()
par(opar)
dev.off()
prob.dec <- array(NA, dim=fx)
prob.sdec <- array(NA, dim=fx)
prob.ldec <- array(NA, dim=fx)
prob.pval <- array(NA, dim=fx)
perf.pe <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- array(0, dim=fx)
perf.rmse <- array(0, dim=fx)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / forecast$pred[i]
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
prob.dec[i] = pnorm((x[nx+i-1] - forecast$pred[i]) / locSD)
prob.sdec[i] = pnorm((x[nx+i-par5] - forecast$pred[i]) / locSD)
prob.ldec[i] = pnorm((x[nx] - forecast$pred[i]) / locSD)
prob.pval[i] = pnorm(abs(x[nx+i] - forecast$pred[i]) / locSD)
}
perf.mape[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
bitmap(file='test2.png')
plot(forecast$pred, pch=19, type='b',main='ARIMA Extrapolation Forecast', ylab='Forecast and 95% CI', xlab='time',ylim=c(min(lb),max(ub)))
dum <- forecast$pred
dum[1:par1] <- x[(nx+1):lx]
lines(dum, lty=1)
lines(ub,lty=3)
lines(lb,lty=3)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast',9,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'Y[t]',1,header=TRUE)
a<-table.element(a,'F[t]',1,header=TRUE)
a<-table.element(a,'95% LB',1,header=TRUE)
a<-table.element(a,'95% UB',1,header=TRUE)
a<-table.element(a,'p-value
(H0: Y[t] = F[t])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-1])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-s])',1,header=TRUE)
mylab <- paste('P(F[t]>Y[',nx,sep='')
mylab <- paste(mylab,'])',sep='')
a<-table.element(a,mylab,1,header=TRUE)
a<-table.row.end(a)
for (i in (nx-par5):nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.row.end(a)
}
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(x[nx+i],4))
a<-table.element(a,round(forecast$pred[i],4))
a<-table.element(a,round(lb[i],4))
a<-table.element(a,round(ub[i],4))
a<-table.element(a,round((1-prob.pval[i]),4))
a<-table.element(a,round((1-prob.dec[i]),4))
a<-table.element(a,round((1-prob.sdec[i]),4))
a<-table.element(a,round((1-prob.ldec[i]),4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast Performance',7,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'% S.E.',1,header=TRUE)
a<-table.element(a,'PE',1,header=TRUE)
a<-table.element(a,'MAPE',1,header=TRUE)
a<-table.element(a,'Sq.E',1,header=TRUE)
a<-table.element(a,'MSE',1,header=TRUE)
a<-table.element(a,'RMSE',1,header=TRUE)
a<-table.row.end(a)
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(perc.se[i],4))
a<-table.element(a,round(perf.pe[i],4))
a<-table.element(a,round(perf.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[i],4))
a<-table.element(a,round(perf.rmse[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')