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 computationSun, 14 Dec 2008 09:12:51 -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/2008/Dec/14/t1229271261yjsbws8zzoxb3v7.htm/, Retrieved Wed, 15 May 2024 21:47:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33457, Retrieved Wed, 15 May 2024 21:47:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact155
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA Forecasting] [2008-12-14 16:12:51] [96839c4b6d4e03ef3851369c676780bf] [Current]
Feedback Forum

Post a new message
Dataseries X:
547.344
554.788
562.325
560.854
555.332
543.599
536.662
542.722
593.530
610.763
612.613
611.324
594.167
595.454
590.865
589.379
584.428
573.100
567.456
569.028
620.735
628.884
628.232
612.117
595.404
597.141
593.408
590.072
579.799
574.205
572.775
572.942
619.567
625.809
619.916
587.625
565.742
557.274
560.576
548.854
531.673
525.919
511.038
498.662
555.362
564.591
541.657
527.070
509.846
514.258
516.922
507.561
492.622
490.243
469.357
477.580
528.379
533.590
517.945
506.174
501.866




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

\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 & 4 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=33457&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]4 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=33457&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33457&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 time4 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[49])
37565.742-------
38557.274-------
39560.576-------
40548.854-------
41531.673-------
42525.919-------
43511.038-------
44498.662-------
45555.362-------
46564.591-------
47541.657-------
48527.07-------
49509.846-------
50514.25881.78411.82563663.82960.40650.40740.39740.4074
51516.92212.4020.06042545.24240.34810.34890.33570.3501
52507.56112.22950.05962509.84050.34870.3460.33680.3481
53492.62212.03180.05862469.26010.35070.34630.33930.3457
54490.24311.95450.05822453.39290.35050.34980.33990.3447
55469.35711.68440.05692397.95260.35350.34710.34080.3412
56477.5811.44240.05582348.29340.34790.35050.34140.338
57528.37912.10270.0592483.8060.34110.3560.33330.3465
58533.5912.18360.05942500.41160.34060.34210.33170.3475
59517.94511.84110.05772430.11220.34080.33620.33380.3432
60506.17416.23750.0823213.39160.3820.37920.37710.3811
61501.86621.89110.11494170.24780.41030.40950.40880.4088

\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[49]) \tabularnewline
37 & 565.742 & - & - & - & - & - & - & - \tabularnewline
38 & 557.274 & - & - & - & - & - & - & - \tabularnewline
39 & 560.576 & - & - & - & - & - & - & - \tabularnewline
40 & 548.854 & - & - & - & - & - & - & - \tabularnewline
41 & 531.673 & - & - & - & - & - & - & - \tabularnewline
42 & 525.919 & - & - & - & - & - & - & - \tabularnewline
43 & 511.038 & - & - & - & - & - & - & - \tabularnewline
44 & 498.662 & - & - & - & - & - & - & - \tabularnewline
45 & 555.362 & - & - & - & - & - & - & - \tabularnewline
46 & 564.591 & - & - & - & - & - & - & - \tabularnewline
47 & 541.657 & - & - & - & - & - & - & - \tabularnewline
48 & 527.07 & - & - & - & - & - & - & - \tabularnewline
49 & 509.846 & - & - & - & - & - & - & - \tabularnewline
50 & 514.258 & 81.7841 & 1.8256 & 3663.8296 & 0.4065 & 0.4074 & 0.3974 & 0.4074 \tabularnewline
51 & 516.922 & 12.402 & 0.0604 & 2545.2424 & 0.3481 & 0.3489 & 0.3357 & 0.3501 \tabularnewline
52 & 507.561 & 12.2295 & 0.0596 & 2509.8405 & 0.3487 & 0.346 & 0.3368 & 0.3481 \tabularnewline
53 & 492.622 & 12.0318 & 0.0586 & 2469.2601 & 0.3507 & 0.3463 & 0.3393 & 0.3457 \tabularnewline
54 & 490.243 & 11.9545 & 0.0582 & 2453.3929 & 0.3505 & 0.3498 & 0.3399 & 0.3447 \tabularnewline
55 & 469.357 & 11.6844 & 0.0569 & 2397.9526 & 0.3535 & 0.3471 & 0.3408 & 0.3412 \tabularnewline
56 & 477.58 & 11.4424 & 0.0558 & 2348.2934 & 0.3479 & 0.3505 & 0.3414 & 0.338 \tabularnewline
57 & 528.379 & 12.1027 & 0.059 & 2483.806 & 0.3411 & 0.356 & 0.3333 & 0.3465 \tabularnewline
58 & 533.59 & 12.1836 & 0.0594 & 2500.4116 & 0.3406 & 0.3421 & 0.3317 & 0.3475 \tabularnewline
59 & 517.945 & 11.8411 & 0.0577 & 2430.1122 & 0.3408 & 0.3362 & 0.3338 & 0.3432 \tabularnewline
60 & 506.174 & 16.2375 & 0.082 & 3213.3916 & 0.382 & 0.3792 & 0.3771 & 0.3811 \tabularnewline
61 & 501.866 & 21.8911 & 0.1149 & 4170.2478 & 0.4103 & 0.4095 & 0.4088 & 0.4088 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33457&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[49])[/C][/ROW]
[ROW][C]37[/C][C]565.742[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]557.274[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]560.576[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]548.854[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]531.673[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]525.919[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]511.038[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]498.662[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]555.362[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]564.591[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]541.657[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]527.07[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]509.846[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]514.258[/C][C]81.7841[/C][C]1.8256[/C][C]3663.8296[/C][C]0.4065[/C][C]0.4074[/C][C]0.3974[/C][C]0.4074[/C][/ROW]
[ROW][C]51[/C][C]516.922[/C][C]12.402[/C][C]0.0604[/C][C]2545.2424[/C][C]0.3481[/C][C]0.3489[/C][C]0.3357[/C][C]0.3501[/C][/ROW]
[ROW][C]52[/C][C]507.561[/C][C]12.2295[/C][C]0.0596[/C][C]2509.8405[/C][C]0.3487[/C][C]0.346[/C][C]0.3368[/C][C]0.3481[/C][/ROW]
[ROW][C]53[/C][C]492.622[/C][C]12.0318[/C][C]0.0586[/C][C]2469.2601[/C][C]0.3507[/C][C]0.3463[/C][C]0.3393[/C][C]0.3457[/C][/ROW]
[ROW][C]54[/C][C]490.243[/C][C]11.9545[/C][C]0.0582[/C][C]2453.3929[/C][C]0.3505[/C][C]0.3498[/C][C]0.3399[/C][C]0.3447[/C][/ROW]
[ROW][C]55[/C][C]469.357[/C][C]11.6844[/C][C]0.0569[/C][C]2397.9526[/C][C]0.3535[/C][C]0.3471[/C][C]0.3408[/C][C]0.3412[/C][/ROW]
[ROW][C]56[/C][C]477.58[/C][C]11.4424[/C][C]0.0558[/C][C]2348.2934[/C][C]0.3479[/C][C]0.3505[/C][C]0.3414[/C][C]0.338[/C][/ROW]
[ROW][C]57[/C][C]528.379[/C][C]12.1027[/C][C]0.059[/C][C]2483.806[/C][C]0.3411[/C][C]0.356[/C][C]0.3333[/C][C]0.3465[/C][/ROW]
[ROW][C]58[/C][C]533.59[/C][C]12.1836[/C][C]0.0594[/C][C]2500.4116[/C][C]0.3406[/C][C]0.3421[/C][C]0.3317[/C][C]0.3475[/C][/ROW]
[ROW][C]59[/C][C]517.945[/C][C]11.8411[/C][C]0.0577[/C][C]2430.1122[/C][C]0.3408[/C][C]0.3362[/C][C]0.3338[/C][C]0.3432[/C][/ROW]
[ROW][C]60[/C][C]506.174[/C][C]16.2375[/C][C]0.082[/C][C]3213.3916[/C][C]0.382[/C][C]0.3792[/C][C]0.3771[/C][C]0.3811[/C][/ROW]
[ROW][C]61[/C][C]501.866[/C][C]21.8911[/C][C]0.1149[/C][C]4170.2478[/C][C]0.4103[/C][C]0.4095[/C][C]0.4088[/C][C]0.4088[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33457&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33457&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[49])
37565.742-------
38557.274-------
39560.576-------
40548.854-------
41531.673-------
42525.919-------
43511.038-------
44498.662-------
45555.362-------
46564.591-------
47541.657-------
48527.07-------
49509.846-------
50514.25881.78411.82563663.82960.40650.40740.39740.4074
51516.92212.4020.06042545.24240.34810.34890.33570.3501
52507.56112.22950.05962509.84050.34870.3460.33680.3481
53492.62212.03180.05862469.26010.35070.34630.33930.3457
54490.24311.95450.05822453.39290.35050.34980.33990.3447
55469.35711.68440.05692397.95260.35350.34710.34080.3412
56477.5811.44240.05582348.29340.34790.35050.34140.338
57528.37912.10270.0592483.8060.34110.3560.33330.3465
58533.5912.18360.05942500.41160.34060.34210.33170.3475
59517.94511.84110.05772430.11220.34080.33620.33380.3432
60506.17416.23750.0823213.39160.3820.37920.37710.3811
61501.86621.89110.11494170.24780.41030.40950.40880.4088







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
5022.34635.2880.4407187033.710915586.1426124.8445
51104.197840.68043.39254540.382521211.6985145.6424
52104.197840.50283.3752245353.248620446.104142.9899
53104.197839.94333.3286230966.927819247.244138.7344
54104.197840.00913.3341228759.891219063.3243138.07
55104.197839.16973.2641209464.247817455.354132.1187
56104.197840.73783.3948217284.275218107.0229134.5623
57104.197842.6583.5548266541.22822211.769149.0361
58104.197842.79573.5663271864.630422655.3859150.5171
59104.197842.74143.5618256141.198721345.0999146.0996
60100.459230.17322.5144240037.821720003.1518141.4325
6196.683721.92561.8271230375.949519197.9958138.5568

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 22.3463 & 5.288 & 0.4407 & 187033.7109 & 15586.1426 & 124.8445 \tabularnewline
51 & 104.1978 & 40.6804 & 3.39 & 254540.3825 & 21211.6985 & 145.6424 \tabularnewline
52 & 104.1978 & 40.5028 & 3.3752 & 245353.2486 & 20446.104 & 142.9899 \tabularnewline
53 & 104.1978 & 39.9433 & 3.3286 & 230966.9278 & 19247.244 & 138.7344 \tabularnewline
54 & 104.1978 & 40.0091 & 3.3341 & 228759.8912 & 19063.3243 & 138.07 \tabularnewline
55 & 104.1978 & 39.1697 & 3.2641 & 209464.2478 & 17455.354 & 132.1187 \tabularnewline
56 & 104.1978 & 40.7378 & 3.3948 & 217284.2752 & 18107.0229 & 134.5623 \tabularnewline
57 & 104.1978 & 42.658 & 3.5548 & 266541.228 & 22211.769 & 149.0361 \tabularnewline
58 & 104.1978 & 42.7957 & 3.5663 & 271864.6304 & 22655.3859 & 150.5171 \tabularnewline
59 & 104.1978 & 42.7414 & 3.5618 & 256141.1987 & 21345.0999 & 146.0996 \tabularnewline
60 & 100.4592 & 30.1732 & 2.5144 & 240037.8217 & 20003.1518 & 141.4325 \tabularnewline
61 & 96.6837 & 21.9256 & 1.8271 & 230375.9495 & 19197.9958 & 138.5568 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33457&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]50[/C][C]22.3463[/C][C]5.288[/C][C]0.4407[/C][C]187033.7109[/C][C]15586.1426[/C][C]124.8445[/C][/ROW]
[ROW][C]51[/C][C]104.1978[/C][C]40.6804[/C][C]3.39[/C][C]254540.3825[/C][C]21211.6985[/C][C]145.6424[/C][/ROW]
[ROW][C]52[/C][C]104.1978[/C][C]40.5028[/C][C]3.3752[/C][C]245353.2486[/C][C]20446.104[/C][C]142.9899[/C][/ROW]
[ROW][C]53[/C][C]104.1978[/C][C]39.9433[/C][C]3.3286[/C][C]230966.9278[/C][C]19247.244[/C][C]138.7344[/C][/ROW]
[ROW][C]54[/C][C]104.1978[/C][C]40.0091[/C][C]3.3341[/C][C]228759.8912[/C][C]19063.3243[/C][C]138.07[/C][/ROW]
[ROW][C]55[/C][C]104.1978[/C][C]39.1697[/C][C]3.2641[/C][C]209464.2478[/C][C]17455.354[/C][C]132.1187[/C][/ROW]
[ROW][C]56[/C][C]104.1978[/C][C]40.7378[/C][C]3.3948[/C][C]217284.2752[/C][C]18107.0229[/C][C]134.5623[/C][/ROW]
[ROW][C]57[/C][C]104.1978[/C][C]42.658[/C][C]3.5548[/C][C]266541.228[/C][C]22211.769[/C][C]149.0361[/C][/ROW]
[ROW][C]58[/C][C]104.1978[/C][C]42.7957[/C][C]3.5663[/C][C]271864.6304[/C][C]22655.3859[/C][C]150.5171[/C][/ROW]
[ROW][C]59[/C][C]104.1978[/C][C]42.7414[/C][C]3.5618[/C][C]256141.1987[/C][C]21345.0999[/C][C]146.0996[/C][/ROW]
[ROW][C]60[/C][C]100.4592[/C][C]30.1732[/C][C]2.5144[/C][C]240037.8217[/C][C]20003.1518[/C][C]141.4325[/C][/ROW]
[ROW][C]61[/C][C]96.6837[/C][C]21.9256[/C][C]1.8271[/C][C]230375.9495[/C][C]19197.9958[/C][C]138.5568[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33457&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33457&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
5022.34635.2880.4407187033.710915586.1426124.8445
51104.197840.68043.39254540.382521211.6985145.6424
52104.197840.50283.3752245353.248620446.104142.9899
53104.197839.94333.3286230966.927819247.244138.7344
54104.197840.00913.3341228759.891219063.3243138.07
55104.197839.16973.2641209464.247817455.354132.1187
56104.197840.73783.3948217284.275218107.0229134.5623
57104.197842.6583.5548266541.22822211.769149.0361
58104.197842.79573.5663271864.630422655.3859150.5171
59104.197842.74143.5618256141.198721345.0999146.0996
60100.459230.17322.5144240037.821720003.1518141.4325
6196.683721.92561.8271230375.949519197.9958138.5568



Parameters (Session):
par1 = 12 ; par2 = 0.0 ; par3 = 0 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.0 ; par3 = 0 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; 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)
}
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.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')