Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 14 Dec 2007 07:21:38 -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/14/t1197641188ycagu4u0pk5ediw.htm/, Retrieved Fri, 03 May 2024 02:14:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3900, Retrieved Fri, 03 May 2024 02:14:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact194
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [G3voorspellingwerkl] [2007-12-14 14:21:38] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
476049
474605
470439
461251
454724
455626
516847
525192
522975
518585
509239
512238
519164
517009
509933
509127
500857
506971
569323
579714
577992
565464
547344
554788
562325
560854
555332
543599
536662
542722
593530
610763
612613
611324
594167
595454
590865
589379
584428
573100
567456
569028
620735
628884
628232
612117
595404
597141
593408
590072
579799
574205
572775
572942
619567
625809
619916
587625
565742
557274




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3900&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3900&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3900&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 time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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[48])
36595454-------
37590865-------
38589379-------
39584428-------
40573100-------
41567456-------
42569028-------
43620735-------
44628884-------
45628232-------
46612117-------
47595404-------
48597141-------
49593408592552580887.2273604216.77270.44280.22030.61160.2203
50590072591066574569.5203607562.47970.4530.39040.57940.2352
51579799586115565911.021606318.9790.270.35050.5650.1424
52574205574787551457.4546598116.54540.48050.33680.55640.0302
53572775569143543059.7753595226.22470.39250.35180.55040.0177
54572942570715542142.2589599287.74110.43930.44380.54610.0349
55619567622422591559.9123653284.08770.42810.99920.54270.9458
56625809630571597578.0405663563.95950.38860.74340.53990.9765
57619916629919594924.6819664913.31810.28770.5910.53760.9668
58587625613804576916.7499650691.25010.08210.37270.53570.812
59565742597091558403.3257635778.67430.05610.68420.53410.499
60557274598828558420.0421639235.95790.02190.94570.53260.5326

\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[48]) \tabularnewline
36 & 595454 & - & - & - & - & - & - & - \tabularnewline
37 & 590865 & - & - & - & - & - & - & - \tabularnewline
38 & 589379 & - & - & - & - & - & - & - \tabularnewline
39 & 584428 & - & - & - & - & - & - & - \tabularnewline
40 & 573100 & - & - & - & - & - & - & - \tabularnewline
41 & 567456 & - & - & - & - & - & - & - \tabularnewline
42 & 569028 & - & - & - & - & - & - & - \tabularnewline
43 & 620735 & - & - & - & - & - & - & - \tabularnewline
44 & 628884 & - & - & - & - & - & - & - \tabularnewline
45 & 628232 & - & - & - & - & - & - & - \tabularnewline
46 & 612117 & - & - & - & - & - & - & - \tabularnewline
47 & 595404 & - & - & - & - & - & - & - \tabularnewline
48 & 597141 & - & - & - & - & - & - & - \tabularnewline
49 & 593408 & 592552 & 580887.2273 & 604216.7727 & 0.4428 & 0.2203 & 0.6116 & 0.2203 \tabularnewline
50 & 590072 & 591066 & 574569.5203 & 607562.4797 & 0.453 & 0.3904 & 0.5794 & 0.2352 \tabularnewline
51 & 579799 & 586115 & 565911.021 & 606318.979 & 0.27 & 0.3505 & 0.565 & 0.1424 \tabularnewline
52 & 574205 & 574787 & 551457.4546 & 598116.5454 & 0.4805 & 0.3368 & 0.5564 & 0.0302 \tabularnewline
53 & 572775 & 569143 & 543059.7753 & 595226.2247 & 0.3925 & 0.3518 & 0.5504 & 0.0177 \tabularnewline
54 & 572942 & 570715 & 542142.2589 & 599287.7411 & 0.4393 & 0.4438 & 0.5461 & 0.0349 \tabularnewline
55 & 619567 & 622422 & 591559.9123 & 653284.0877 & 0.4281 & 0.9992 & 0.5427 & 0.9458 \tabularnewline
56 & 625809 & 630571 & 597578.0405 & 663563.9595 & 0.3886 & 0.7434 & 0.5399 & 0.9765 \tabularnewline
57 & 619916 & 629919 & 594924.6819 & 664913.3181 & 0.2877 & 0.591 & 0.5376 & 0.9668 \tabularnewline
58 & 587625 & 613804 & 576916.7499 & 650691.2501 & 0.0821 & 0.3727 & 0.5357 & 0.812 \tabularnewline
59 & 565742 & 597091 & 558403.3257 & 635778.6743 & 0.0561 & 0.6842 & 0.5341 & 0.499 \tabularnewline
60 & 557274 & 598828 & 558420.0421 & 639235.9579 & 0.0219 & 0.9457 & 0.5326 & 0.5326 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3900&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[48])[/C][/ROW]
[ROW][C]36[/C][C]595454[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]590865[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]589379[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]584428[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]573100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]567456[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]569028[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]620735[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]628884[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]628232[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]612117[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]595404[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]597141[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]593408[/C][C]592552[/C][C]580887.2273[/C][C]604216.7727[/C][C]0.4428[/C][C]0.2203[/C][C]0.6116[/C][C]0.2203[/C][/ROW]
[ROW][C]50[/C][C]590072[/C][C]591066[/C][C]574569.5203[/C][C]607562.4797[/C][C]0.453[/C][C]0.3904[/C][C]0.5794[/C][C]0.2352[/C][/ROW]
[ROW][C]51[/C][C]579799[/C][C]586115[/C][C]565911.021[/C][C]606318.979[/C][C]0.27[/C][C]0.3505[/C][C]0.565[/C][C]0.1424[/C][/ROW]
[ROW][C]52[/C][C]574205[/C][C]574787[/C][C]551457.4546[/C][C]598116.5454[/C][C]0.4805[/C][C]0.3368[/C][C]0.5564[/C][C]0.0302[/C][/ROW]
[ROW][C]53[/C][C]572775[/C][C]569143[/C][C]543059.7753[/C][C]595226.2247[/C][C]0.3925[/C][C]0.3518[/C][C]0.5504[/C][C]0.0177[/C][/ROW]
[ROW][C]54[/C][C]572942[/C][C]570715[/C][C]542142.2589[/C][C]599287.7411[/C][C]0.4393[/C][C]0.4438[/C][C]0.5461[/C][C]0.0349[/C][/ROW]
[ROW][C]55[/C][C]619567[/C][C]622422[/C][C]591559.9123[/C][C]653284.0877[/C][C]0.4281[/C][C]0.9992[/C][C]0.5427[/C][C]0.9458[/C][/ROW]
[ROW][C]56[/C][C]625809[/C][C]630571[/C][C]597578.0405[/C][C]663563.9595[/C][C]0.3886[/C][C]0.7434[/C][C]0.5399[/C][C]0.9765[/C][/ROW]
[ROW][C]57[/C][C]619916[/C][C]629919[/C][C]594924.6819[/C][C]664913.3181[/C][C]0.2877[/C][C]0.591[/C][C]0.5376[/C][C]0.9668[/C][/ROW]
[ROW][C]58[/C][C]587625[/C][C]613804[/C][C]576916.7499[/C][C]650691.2501[/C][C]0.0821[/C][C]0.3727[/C][C]0.5357[/C][C]0.812[/C][/ROW]
[ROW][C]59[/C][C]565742[/C][C]597091[/C][C]558403.3257[/C][C]635778.6743[/C][C]0.0561[/C][C]0.6842[/C][C]0.5341[/C][C]0.499[/C][/ROW]
[ROW][C]60[/C][C]557274[/C][C]598828[/C][C]558420.0421[/C][C]639235.9579[/C][C]0.0219[/C][C]0.9457[/C][C]0.5326[/C][C]0.5326[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3900&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3900&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[48])
36595454-------
37590865-------
38589379-------
39584428-------
40573100-------
41567456-------
42569028-------
43620735-------
44628884-------
45628232-------
46612117-------
47595404-------
48597141-------
49593408592552580887.2273604216.77270.44280.22030.61160.2203
50590072591066574569.5203607562.47970.4530.39040.57940.2352
51579799586115565911.021606318.9790.270.35050.5650.1424
52574205574787551457.4546598116.54540.48050.33680.55640.0302
53572775569143543059.7753595226.22470.39250.35180.55040.0177
54572942570715542142.2589599287.74110.43930.44380.54610.0349
55619567622422591559.9123653284.08770.42810.99920.54270.9458
56625809630571597578.0405663563.95950.38860.74340.53990.9765
57619916629919594924.6819664913.31810.28770.5910.53760.9668
58587625613804576916.7499650691.25010.08210.37270.53570.812
59565742597091558403.3257635778.67430.05610.68420.53410.499
60557274598828558420.0421639235.95790.02190.94570.53260.5326







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.010.00141e-0473273661061.3333247.1059
500.0142-0.00171e-0498803682336.3333286.9431
510.0176-0.01089e-04398918563324321.33331823.2722
520.0207-0.0011e-0433872428227168.0089
530.02340.00645e-04131914241099285.33331048.4681
540.02550.00393e-044959529413294.0833642.8795
550.0253-0.00464e-048151025679252.0833824.1675
560.0267-0.00766e-04226766441889720.33331374.671
570.0283-0.01590.00131000600098338334.08332887.6174
580.0307-0.04270.003668534004157111670.08337557.2263
590.0331-0.05250.004498275980181896650.08339049.6768
600.0344-0.06940.00581726734916143894576.333311995.6065

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.01 & 0.0014 & 1e-04 & 732736 & 61061.3333 & 247.1059 \tabularnewline
50 & 0.0142 & -0.0017 & 1e-04 & 988036 & 82336.3333 & 286.9431 \tabularnewline
51 & 0.0176 & -0.0108 & 9e-04 & 39891856 & 3324321.3333 & 1823.2722 \tabularnewline
52 & 0.0207 & -0.001 & 1e-04 & 338724 & 28227 & 168.0089 \tabularnewline
53 & 0.0234 & 0.0064 & 5e-04 & 13191424 & 1099285.3333 & 1048.4681 \tabularnewline
54 & 0.0255 & 0.0039 & 3e-04 & 4959529 & 413294.0833 & 642.8795 \tabularnewline
55 & 0.0253 & -0.0046 & 4e-04 & 8151025 & 679252.0833 & 824.1675 \tabularnewline
56 & 0.0267 & -0.0076 & 6e-04 & 22676644 & 1889720.3333 & 1374.671 \tabularnewline
57 & 0.0283 & -0.0159 & 0.0013 & 100060009 & 8338334.0833 & 2887.6174 \tabularnewline
58 & 0.0307 & -0.0427 & 0.0036 & 685340041 & 57111670.0833 & 7557.2263 \tabularnewline
59 & 0.0331 & -0.0525 & 0.0044 & 982759801 & 81896650.0833 & 9049.6768 \tabularnewline
60 & 0.0344 & -0.0694 & 0.0058 & 1726734916 & 143894576.3333 & 11995.6065 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3900&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]49[/C][C]0.01[/C][C]0.0014[/C][C]1e-04[/C][C]732736[/C][C]61061.3333[/C][C]247.1059[/C][/ROW]
[ROW][C]50[/C][C]0.0142[/C][C]-0.0017[/C][C]1e-04[/C][C]988036[/C][C]82336.3333[/C][C]286.9431[/C][/ROW]
[ROW][C]51[/C][C]0.0176[/C][C]-0.0108[/C][C]9e-04[/C][C]39891856[/C][C]3324321.3333[/C][C]1823.2722[/C][/ROW]
[ROW][C]52[/C][C]0.0207[/C][C]-0.001[/C][C]1e-04[/C][C]338724[/C][C]28227[/C][C]168.0089[/C][/ROW]
[ROW][C]53[/C][C]0.0234[/C][C]0.0064[/C][C]5e-04[/C][C]13191424[/C][C]1099285.3333[/C][C]1048.4681[/C][/ROW]
[ROW][C]54[/C][C]0.0255[/C][C]0.0039[/C][C]3e-04[/C][C]4959529[/C][C]413294.0833[/C][C]642.8795[/C][/ROW]
[ROW][C]55[/C][C]0.0253[/C][C]-0.0046[/C][C]4e-04[/C][C]8151025[/C][C]679252.0833[/C][C]824.1675[/C][/ROW]
[ROW][C]56[/C][C]0.0267[/C][C]-0.0076[/C][C]6e-04[/C][C]22676644[/C][C]1889720.3333[/C][C]1374.671[/C][/ROW]
[ROW][C]57[/C][C]0.0283[/C][C]-0.0159[/C][C]0.0013[/C][C]100060009[/C][C]8338334.0833[/C][C]2887.6174[/C][/ROW]
[ROW][C]58[/C][C]0.0307[/C][C]-0.0427[/C][C]0.0036[/C][C]685340041[/C][C]57111670.0833[/C][C]7557.2263[/C][/ROW]
[ROW][C]59[/C][C]0.0331[/C][C]-0.0525[/C][C]0.0044[/C][C]982759801[/C][C]81896650.0833[/C][C]9049.6768[/C][/ROW]
[ROW][C]60[/C][C]0.0344[/C][C]-0.0694[/C][C]0.0058[/C][C]1726734916[/C][C]143894576.3333[/C][C]11995.6065[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3900&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3900&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
490.010.00141e-0473273661061.3333247.1059
500.0142-0.00171e-0498803682336.3333286.9431
510.0176-0.01089e-04398918563324321.33331823.2722
520.0207-0.0011e-0433872428227168.0089
530.02340.00645e-04131914241099285.33331048.4681
540.02550.00393e-044959529413294.0833642.8795
550.0253-0.00464e-048151025679252.0833824.1675
560.0267-0.00766e-04226766441889720.33331374.671
570.0283-0.01590.00131000600098338334.08332887.6174
580.0307-0.04270.003668534004157111670.08337557.2263
590.0331-0.05250.004498275980181896650.08339049.6768
600.0344-0.06940.00581726734916143894576.333311995.6065



Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 0 ; 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)
}
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')