Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 09 Dec 2007 08:22:15 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2007/Dec/09/t11972131549kxine13msueew7.htm/, Retrieved Wed, 08 May 2024 04:24:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2964, Retrieved Wed, 08 May 2024 04:24:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact283
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-09 15:22:15] [67794d83edd3193bd9ea9816803ddb96] [Current]
Feedback Forum

Post a new message
Dataseries X:
3804
3491
4151
4254
4717
4866
4001
3758
4780
5016
4296
4467
3891
3872
3867
3973
4640
4538
3836
3770
4374
4497
3945
3862
3608
3301
3882
3605
4305
4216
3971
3988
4317
4484
4247
3520
3686
3403
3990
4053
4548
4559
3922
4209
4517
4386
3221
3127
3777
3322
3899
4033
4463
4819
4246
4255
4760
4581
4309
4016
3601
3257
3823
3940
4534
4575
3953
4206
4649
4353
3835
3944




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\begin{tabular}{lllllllll}
\hline
Summary of compuational 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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2964&T=0

[TABLE]
[ROW][C]Summary of compuational 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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2964&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2964&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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])
483127-------
493777-------
503322-------
513899-------
524033-------
534463-------
544819-------
554246-------
564255-------
574760-------
584581-------
594309-------
604016-------
6136014133.34283573.43994693.24570.03120.65940.89390.6594
6232573563.18042928.4854197.87580.17220.45350.77180.081
6338234046.53183392.08344700.98010.25160.9910.67070.5364
6439404100.52493440.55514760.49480.31680.79510.57950.5991
6545344528.26793866.73295189.8030.49320.95930.57670.9355
6645754733.78834071.80785395.76870.31910.72290.40040.9832
6739534127.70113465.59384789.80850.30250.09270.36310.6296
6842064241.76193579.61844903.90550.45780.80370.48440.748
6946494667.05474004.90095329.20860.47870.91380.39160.973
7043534505.71933843.56255167.87610.32560.33570.41180.9264
7138353882.00343219.84584544.1610.44470.08160.10310.3458
7239443666.89413004.73624329.0520.2060.30940.15070.1507

\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 & 3127 & - & - & - & - & - & - & - \tabularnewline
49 & 3777 & - & - & - & - & - & - & - \tabularnewline
50 & 3322 & - & - & - & - & - & - & - \tabularnewline
51 & 3899 & - & - & - & - & - & - & - \tabularnewline
52 & 4033 & - & - & - & - & - & - & - \tabularnewline
53 & 4463 & - & - & - & - & - & - & - \tabularnewline
54 & 4819 & - & - & - & - & - & - & - \tabularnewline
55 & 4246 & - & - & - & - & - & - & - \tabularnewline
56 & 4255 & - & - & - & - & - & - & - \tabularnewline
57 & 4760 & - & - & - & - & - & - & - \tabularnewline
58 & 4581 & - & - & - & - & - & - & - \tabularnewline
59 & 4309 & - & - & - & - & - & - & - \tabularnewline
60 & 4016 & - & - & - & - & - & - & - \tabularnewline
61 & 3601 & 4133.3428 & 3573.4399 & 4693.2457 & 0.0312 & 0.6594 & 0.8939 & 0.6594 \tabularnewline
62 & 3257 & 3563.1804 & 2928.485 & 4197.8758 & 0.1722 & 0.4535 & 0.7718 & 0.081 \tabularnewline
63 & 3823 & 4046.5318 & 3392.0834 & 4700.9801 & 0.2516 & 0.991 & 0.6707 & 0.5364 \tabularnewline
64 & 3940 & 4100.5249 & 3440.5551 & 4760.4948 & 0.3168 & 0.7951 & 0.5795 & 0.5991 \tabularnewline
65 & 4534 & 4528.2679 & 3866.7329 & 5189.803 & 0.4932 & 0.9593 & 0.5767 & 0.9355 \tabularnewline
66 & 4575 & 4733.7883 & 4071.8078 & 5395.7687 & 0.3191 & 0.7229 & 0.4004 & 0.9832 \tabularnewline
67 & 3953 & 4127.7011 & 3465.5938 & 4789.8085 & 0.3025 & 0.0927 & 0.3631 & 0.6296 \tabularnewline
68 & 4206 & 4241.7619 & 3579.6184 & 4903.9055 & 0.4578 & 0.8037 & 0.4844 & 0.748 \tabularnewline
69 & 4649 & 4667.0547 & 4004.9009 & 5329.2086 & 0.4787 & 0.9138 & 0.3916 & 0.973 \tabularnewline
70 & 4353 & 4505.7193 & 3843.5625 & 5167.8761 & 0.3256 & 0.3357 & 0.4118 & 0.9264 \tabularnewline
71 & 3835 & 3882.0034 & 3219.8458 & 4544.161 & 0.4447 & 0.0816 & 0.1031 & 0.3458 \tabularnewline
72 & 3944 & 3666.8941 & 3004.7362 & 4329.052 & 0.206 & 0.3094 & 0.1507 & 0.1507 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2964&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]3127[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]3777[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]3322[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]3899[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]4033[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]4463[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]4819[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]4246[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]4255[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]4760[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]4581[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]4309[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]4016[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]3601[/C][C]4133.3428[/C][C]3573.4399[/C][C]4693.2457[/C][C]0.0312[/C][C]0.6594[/C][C]0.8939[/C][C]0.6594[/C][/ROW]
[ROW][C]62[/C][C]3257[/C][C]3563.1804[/C][C]2928.485[/C][C]4197.8758[/C][C]0.1722[/C][C]0.4535[/C][C]0.7718[/C][C]0.081[/C][/ROW]
[ROW][C]63[/C][C]3823[/C][C]4046.5318[/C][C]3392.0834[/C][C]4700.9801[/C][C]0.2516[/C][C]0.991[/C][C]0.6707[/C][C]0.5364[/C][/ROW]
[ROW][C]64[/C][C]3940[/C][C]4100.5249[/C][C]3440.5551[/C][C]4760.4948[/C][C]0.3168[/C][C]0.7951[/C][C]0.5795[/C][C]0.5991[/C][/ROW]
[ROW][C]65[/C][C]4534[/C][C]4528.2679[/C][C]3866.7329[/C][C]5189.803[/C][C]0.4932[/C][C]0.9593[/C][C]0.5767[/C][C]0.9355[/C][/ROW]
[ROW][C]66[/C][C]4575[/C][C]4733.7883[/C][C]4071.8078[/C][C]5395.7687[/C][C]0.3191[/C][C]0.7229[/C][C]0.4004[/C][C]0.9832[/C][/ROW]
[ROW][C]67[/C][C]3953[/C][C]4127.7011[/C][C]3465.5938[/C][C]4789.8085[/C][C]0.3025[/C][C]0.0927[/C][C]0.3631[/C][C]0.6296[/C][/ROW]
[ROW][C]68[/C][C]4206[/C][C]4241.7619[/C][C]3579.6184[/C][C]4903.9055[/C][C]0.4578[/C][C]0.8037[/C][C]0.4844[/C][C]0.748[/C][/ROW]
[ROW][C]69[/C][C]4649[/C][C]4667.0547[/C][C]4004.9009[/C][C]5329.2086[/C][C]0.4787[/C][C]0.9138[/C][C]0.3916[/C][C]0.973[/C][/ROW]
[ROW][C]70[/C][C]4353[/C][C]4505.7193[/C][C]3843.5625[/C][C]5167.8761[/C][C]0.3256[/C][C]0.3357[/C][C]0.4118[/C][C]0.9264[/C][/ROW]
[ROW][C]71[/C][C]3835[/C][C]3882.0034[/C][C]3219.8458[/C][C]4544.161[/C][C]0.4447[/C][C]0.0816[/C][C]0.1031[/C][C]0.3458[/C][/ROW]
[ROW][C]72[/C][C]3944[/C][C]3666.8941[/C][C]3004.7362[/C][C]4329.052[/C][C]0.206[/C][C]0.3094[/C][C]0.1507[/C][C]0.1507[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2964&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2964&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])
483127-------
493777-------
503322-------
513899-------
524033-------
534463-------
544819-------
554246-------
564255-------
574760-------
584581-------
594309-------
604016-------
6136014133.34283573.43994693.24570.03120.65940.89390.6594
6232573563.18042928.4854197.87580.17220.45350.77180.081
6338234046.53183392.08344700.98010.25160.9910.67070.5364
6439404100.52493440.55514760.49480.31680.79510.57950.5991
6545344528.26793866.73295189.8030.49320.95930.57670.9355
6645754733.78834071.80785395.76870.31910.72290.40040.9832
6739534127.70113465.59384789.80850.30250.09270.36310.6296
6842064241.76193579.61844903.90550.45780.80370.48440.748
6946494667.05474004.90095329.20860.47870.91380.39160.973
7043534505.71933843.56255167.87610.32560.33570.41180.9264
7138353882.00343219.84584544.1610.44470.08160.10310.3458
7239443666.89413004.73624329.0520.2060.30940.15070.1507







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0691-0.12880.0107283388.87123615.7393153.6741
620.0909-0.08590.007293746.44387812.203788.3867
630.0825-0.05520.004649966.44724163.870664.5281
640.0821-0.03910.003325768.24732147.353946.3396
650.07450.00131e-0432.85642.7381.6547
660.0713-0.03350.002825213.70842101.142445.8382
670.0818-0.04230.003530520.48752543.37450.4319
680.0796-0.00847e-041278.9158106.576310.3236
690.0724-0.00393e-04325.973427.16445.212
700.075-0.03390.002823323.1961943.599744.0863
710.087-0.01210.0012209.319184.109913.5687
720.09210.07560.006376787.67696398.973179.9936

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0691 & -0.1288 & 0.0107 & 283388.871 & 23615.7393 & 153.6741 \tabularnewline
62 & 0.0909 & -0.0859 & 0.0072 & 93746.4438 & 7812.2037 & 88.3867 \tabularnewline
63 & 0.0825 & -0.0552 & 0.0046 & 49966.4472 & 4163.8706 & 64.5281 \tabularnewline
64 & 0.0821 & -0.0391 & 0.0033 & 25768.2473 & 2147.3539 & 46.3396 \tabularnewline
65 & 0.0745 & 0.0013 & 1e-04 & 32.8564 & 2.738 & 1.6547 \tabularnewline
66 & 0.0713 & -0.0335 & 0.0028 & 25213.7084 & 2101.1424 & 45.8382 \tabularnewline
67 & 0.0818 & -0.0423 & 0.0035 & 30520.4875 & 2543.374 & 50.4319 \tabularnewline
68 & 0.0796 & -0.0084 & 7e-04 & 1278.9158 & 106.5763 & 10.3236 \tabularnewline
69 & 0.0724 & -0.0039 & 3e-04 & 325.9734 & 27.1644 & 5.212 \tabularnewline
70 & 0.075 & -0.0339 & 0.0028 & 23323.196 & 1943.5997 & 44.0863 \tabularnewline
71 & 0.087 & -0.0121 & 0.001 & 2209.319 & 184.1099 & 13.5687 \tabularnewline
72 & 0.0921 & 0.0756 & 0.0063 & 76787.6769 & 6398.9731 & 79.9936 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2964&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.0691[/C][C]-0.1288[/C][C]0.0107[/C][C]283388.871[/C][C]23615.7393[/C][C]153.6741[/C][/ROW]
[ROW][C]62[/C][C]0.0909[/C][C]-0.0859[/C][C]0.0072[/C][C]93746.4438[/C][C]7812.2037[/C][C]88.3867[/C][/ROW]
[ROW][C]63[/C][C]0.0825[/C][C]-0.0552[/C][C]0.0046[/C][C]49966.4472[/C][C]4163.8706[/C][C]64.5281[/C][/ROW]
[ROW][C]64[/C][C]0.0821[/C][C]-0.0391[/C][C]0.0033[/C][C]25768.2473[/C][C]2147.3539[/C][C]46.3396[/C][/ROW]
[ROW][C]65[/C][C]0.0745[/C][C]0.0013[/C][C]1e-04[/C][C]32.8564[/C][C]2.738[/C][C]1.6547[/C][/ROW]
[ROW][C]66[/C][C]0.0713[/C][C]-0.0335[/C][C]0.0028[/C][C]25213.7084[/C][C]2101.1424[/C][C]45.8382[/C][/ROW]
[ROW][C]67[/C][C]0.0818[/C][C]-0.0423[/C][C]0.0035[/C][C]30520.4875[/C][C]2543.374[/C][C]50.4319[/C][/ROW]
[ROW][C]68[/C][C]0.0796[/C][C]-0.0084[/C][C]7e-04[/C][C]1278.9158[/C][C]106.5763[/C][C]10.3236[/C][/ROW]
[ROW][C]69[/C][C]0.0724[/C][C]-0.0039[/C][C]3e-04[/C][C]325.9734[/C][C]27.1644[/C][C]5.212[/C][/ROW]
[ROW][C]70[/C][C]0.075[/C][C]-0.0339[/C][C]0.0028[/C][C]23323.196[/C][C]1943.5997[/C][C]44.0863[/C][/ROW]
[ROW][C]71[/C][C]0.087[/C][C]-0.0121[/C][C]0.001[/C][C]2209.319[/C][C]184.1099[/C][C]13.5687[/C][/ROW]
[ROW][C]72[/C][C]0.0921[/C][C]0.0756[/C][C]0.0063[/C][C]76787.6769[/C][C]6398.9731[/C][C]79.9936[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2964&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2964&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.0691-0.12880.0107283388.87123615.7393153.6741
620.0909-0.08590.007293746.44387812.203788.3867
630.0825-0.05520.004649966.44724163.870664.5281
640.0821-0.03910.003325768.24732147.353946.3396
650.07450.00131e-0432.85642.7381.6547
660.0713-0.03350.002825213.70842101.142445.8382
670.0818-0.04230.003530520.48752543.37450.4319
680.0796-0.00847e-041278.9158106.576310.3236
690.0724-0.00393e-04325.973427.16445.212
700.075-0.03390.002823323.1961943.599744.0863
710.087-0.01210.0012209.319184.109913.5687
720.09210.07560.006376787.67696398.973179.9936



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 0 ; par8 = 1 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 0 ; par8 = 1 ; 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,fx))
(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)
}
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')