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 computationWed, 15 Dec 2010 20:32:05 +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/15/t1292445002gfthzaki9m3cgvz.htm/, Retrieved Fri, 03 May 2024 03:52:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=110715, Retrieved Fri, 03 May 2024 03:52:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact143
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [Workshop 9 (1)] [2010-12-05 10:53:51] [00b18f0d8e13a2047ccd266ce7bab24a]
- RMP   [ARIMA Backward Selection] [] [2010-12-07 18:47:54] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Workshop 9 (8)] [2010-12-07 19:16:19] [00b18f0d8e13a2047ccd266ce7bab24a]
-   PD        [ARIMA Forecasting] [paper : arima for...] [2010-12-15 20:32:05] [fea2623c21d84eea50328c29ea7301e7] [Current]
Feedback Forum

Post a new message
Dataseries X:
627
696
825
677
656
785
412
352
839
729
696
641
695
638
762
635
721
854
418
367
824
687
601
676
740
691
683
594
729
731
386
331
707
715
657
653
642
643
718
654
632
731
392
344
792
852
649
629
685
617
715
715
629
916
531
357
917
828
708
858
775
785
1006
789
734
906
532
387
991
841
892
782




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 2 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110715&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110715&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110715&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 time2 seconds
R Server'George Udny Yule' @ 72.249.76.132







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])
48629-------
49685-------
50617-------
51715-------
52715-------
53629-------
54916-------
55531-------
56357-------
57917-------
58828-------
59708-------
60858-------
61775792.8948677.6873908.10220.38040.1340.96680.134
62785650.3051528.0027772.60750.01540.02280.70324e-04
631006696.0727573.7703818.375100.07710.38080.0047
64789666.4148544.1124788.71720.024700.21810.0011
65734684.2163561.9139806.51870.21250.04660.81190.0027
66906870.8614748.559993.16380.28670.98590.23470.5816
67532493.7149371.4125616.01730.269800.27510
68387346.5261224.2237468.82850.25830.00150.43330
69991838.757716.4546961.05940.007310.10490.3789
70841756.9037634.6013879.20610.08891e-040.12730.0526
71892698.098575.7956820.40049e-040.0110.4370.0052
72782815.6064693.304937.90880.29510.11040.24840.2484

\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 & 629 & - & - & - & - & - & - & - \tabularnewline
49 & 685 & - & - & - & - & - & - & - \tabularnewline
50 & 617 & - & - & - & - & - & - & - \tabularnewline
51 & 715 & - & - & - & - & - & - & - \tabularnewline
52 & 715 & - & - & - & - & - & - & - \tabularnewline
53 & 629 & - & - & - & - & - & - & - \tabularnewline
54 & 916 & - & - & - & - & - & - & - \tabularnewline
55 & 531 & - & - & - & - & - & - & - \tabularnewline
56 & 357 & - & - & - & - & - & - & - \tabularnewline
57 & 917 & - & - & - & - & - & - & - \tabularnewline
58 & 828 & - & - & - & - & - & - & - \tabularnewline
59 & 708 & - & - & - & - & - & - & - \tabularnewline
60 & 858 & - & - & - & - & - & - & - \tabularnewline
61 & 775 & 792.8948 & 677.6873 & 908.1022 & 0.3804 & 0.134 & 0.9668 & 0.134 \tabularnewline
62 & 785 & 650.3051 & 528.0027 & 772.6075 & 0.0154 & 0.0228 & 0.7032 & 4e-04 \tabularnewline
63 & 1006 & 696.0727 & 573.7703 & 818.3751 & 0 & 0.0771 & 0.3808 & 0.0047 \tabularnewline
64 & 789 & 666.4148 & 544.1124 & 788.7172 & 0.0247 & 0 & 0.2181 & 0.0011 \tabularnewline
65 & 734 & 684.2163 & 561.9139 & 806.5187 & 0.2125 & 0.0466 & 0.8119 & 0.0027 \tabularnewline
66 & 906 & 870.8614 & 748.559 & 993.1638 & 0.2867 & 0.9859 & 0.2347 & 0.5816 \tabularnewline
67 & 532 & 493.7149 & 371.4125 & 616.0173 & 0.2698 & 0 & 0.2751 & 0 \tabularnewline
68 & 387 & 346.5261 & 224.2237 & 468.8285 & 0.2583 & 0.0015 & 0.4333 & 0 \tabularnewline
69 & 991 & 838.757 & 716.4546 & 961.0594 & 0.0073 & 1 & 0.1049 & 0.3789 \tabularnewline
70 & 841 & 756.9037 & 634.6013 & 879.2061 & 0.0889 & 1e-04 & 0.1273 & 0.0526 \tabularnewline
71 & 892 & 698.098 & 575.7956 & 820.4004 & 9e-04 & 0.011 & 0.437 & 0.0052 \tabularnewline
72 & 782 & 815.6064 & 693.304 & 937.9088 & 0.2951 & 0.1104 & 0.2484 & 0.2484 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110715&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]629[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]685[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]617[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]715[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]715[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]629[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]916[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]531[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]917[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]828[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]708[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]858[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]775[/C][C]792.8948[/C][C]677.6873[/C][C]908.1022[/C][C]0.3804[/C][C]0.134[/C][C]0.9668[/C][C]0.134[/C][/ROW]
[ROW][C]62[/C][C]785[/C][C]650.3051[/C][C]528.0027[/C][C]772.6075[/C][C]0.0154[/C][C]0.0228[/C][C]0.7032[/C][C]4e-04[/C][/ROW]
[ROW][C]63[/C][C]1006[/C][C]696.0727[/C][C]573.7703[/C][C]818.3751[/C][C]0[/C][C]0.0771[/C][C]0.3808[/C][C]0.0047[/C][/ROW]
[ROW][C]64[/C][C]789[/C][C]666.4148[/C][C]544.1124[/C][C]788.7172[/C][C]0.0247[/C][C]0[/C][C]0.2181[/C][C]0.0011[/C][/ROW]
[ROW][C]65[/C][C]734[/C][C]684.2163[/C][C]561.9139[/C][C]806.5187[/C][C]0.2125[/C][C]0.0466[/C][C]0.8119[/C][C]0.0027[/C][/ROW]
[ROW][C]66[/C][C]906[/C][C]870.8614[/C][C]748.559[/C][C]993.1638[/C][C]0.2867[/C][C]0.9859[/C][C]0.2347[/C][C]0.5816[/C][/ROW]
[ROW][C]67[/C][C]532[/C][C]493.7149[/C][C]371.4125[/C][C]616.0173[/C][C]0.2698[/C][C]0[/C][C]0.2751[/C][C]0[/C][/ROW]
[ROW][C]68[/C][C]387[/C][C]346.5261[/C][C]224.2237[/C][C]468.8285[/C][C]0.2583[/C][C]0.0015[/C][C]0.4333[/C][C]0[/C][/ROW]
[ROW][C]69[/C][C]991[/C][C]838.757[/C][C]716.4546[/C][C]961.0594[/C][C]0.0073[/C][C]1[/C][C]0.1049[/C][C]0.3789[/C][/ROW]
[ROW][C]70[/C][C]841[/C][C]756.9037[/C][C]634.6013[/C][C]879.2061[/C][C]0.0889[/C][C]1e-04[/C][C]0.1273[/C][C]0.0526[/C][/ROW]
[ROW][C]71[/C][C]892[/C][C]698.098[/C][C]575.7956[/C][C]820.4004[/C][C]9e-04[/C][C]0.011[/C][C]0.437[/C][C]0.0052[/C][/ROW]
[ROW][C]72[/C][C]782[/C][C]815.6064[/C][C]693.304[/C][C]937.9088[/C][C]0.2951[/C][C]0.1104[/C][C]0.2484[/C][C]0.2484[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110715&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110715&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])
48629-------
49685-------
50617-------
51715-------
52715-------
53629-------
54916-------
55531-------
56357-------
57917-------
58828-------
59708-------
60858-------
61775792.8948677.6873908.10220.38040.1340.96680.134
62785650.3051528.0027772.60750.01540.02280.70324e-04
631006696.0727573.7703818.375100.07710.38080.0047
64789666.4148544.1124788.71720.024700.21810.0011
65734684.2163561.9139806.51870.21250.04660.81190.0027
66906870.8614748.559993.16380.28670.98590.23470.5816
67532493.7149371.4125616.01730.269800.27510
68387346.5261224.2237468.82850.25830.00150.43330
69991838.757716.4546961.05940.007310.10490.3789
70841756.9037634.6013879.20610.08891e-040.12730.0526
71892698.098575.7956820.40049e-040.0110.4370.0052
72782815.6064693.304937.90880.29510.11040.24840.2484







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0741-0.02260320.222200
620.0960.20710.114818142.71279231.467596.0805
630.08960.44530.22596054.941238172.6254195.3782
640.09360.18390.214715027.123532386.2499179.9618
650.09120.07280.18632478.416626404.6832162.4952
660.07170.04030.1621234.718122209.6891149.0292
670.12640.07750.14991465.747319246.2688138.7309
680.18010.11680.14581638.138317045.2525130.5575
690.07440.18150.149823177.937317726.6619133.1415
700.08240.11110.14597072.183616661.2141129.0783
710.08940.27780.157937597.980518564.5565136.2518
720.0765-0.04120.14821129.393217111.6262130.8114

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0741 & -0.0226 & 0 & 320.2222 & 0 & 0 \tabularnewline
62 & 0.096 & 0.2071 & 0.1148 & 18142.7127 & 9231.4675 & 96.0805 \tabularnewline
63 & 0.0896 & 0.4453 & 0.225 & 96054.9412 & 38172.6254 & 195.3782 \tabularnewline
64 & 0.0936 & 0.1839 & 0.2147 & 15027.1235 & 32386.2499 & 179.9618 \tabularnewline
65 & 0.0912 & 0.0728 & 0.1863 & 2478.4166 & 26404.6832 & 162.4952 \tabularnewline
66 & 0.0717 & 0.0403 & 0.162 & 1234.7181 & 22209.6891 & 149.0292 \tabularnewline
67 & 0.1264 & 0.0775 & 0.1499 & 1465.7473 & 19246.2688 & 138.7309 \tabularnewline
68 & 0.1801 & 0.1168 & 0.1458 & 1638.1383 & 17045.2525 & 130.5575 \tabularnewline
69 & 0.0744 & 0.1815 & 0.1498 & 23177.9373 & 17726.6619 & 133.1415 \tabularnewline
70 & 0.0824 & 0.1111 & 0.1459 & 7072.1836 & 16661.2141 & 129.0783 \tabularnewline
71 & 0.0894 & 0.2778 & 0.1579 & 37597.9805 & 18564.5565 & 136.2518 \tabularnewline
72 & 0.0765 & -0.0412 & 0.1482 & 1129.3932 & 17111.6262 & 130.8114 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110715&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.0741[/C][C]-0.0226[/C][C]0[/C][C]320.2222[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.096[/C][C]0.2071[/C][C]0.1148[/C][C]18142.7127[/C][C]9231.4675[/C][C]96.0805[/C][/ROW]
[ROW][C]63[/C][C]0.0896[/C][C]0.4453[/C][C]0.225[/C][C]96054.9412[/C][C]38172.6254[/C][C]195.3782[/C][/ROW]
[ROW][C]64[/C][C]0.0936[/C][C]0.1839[/C][C]0.2147[/C][C]15027.1235[/C][C]32386.2499[/C][C]179.9618[/C][/ROW]
[ROW][C]65[/C][C]0.0912[/C][C]0.0728[/C][C]0.1863[/C][C]2478.4166[/C][C]26404.6832[/C][C]162.4952[/C][/ROW]
[ROW][C]66[/C][C]0.0717[/C][C]0.0403[/C][C]0.162[/C][C]1234.7181[/C][C]22209.6891[/C][C]149.0292[/C][/ROW]
[ROW][C]67[/C][C]0.1264[/C][C]0.0775[/C][C]0.1499[/C][C]1465.7473[/C][C]19246.2688[/C][C]138.7309[/C][/ROW]
[ROW][C]68[/C][C]0.1801[/C][C]0.1168[/C][C]0.1458[/C][C]1638.1383[/C][C]17045.2525[/C][C]130.5575[/C][/ROW]
[ROW][C]69[/C][C]0.0744[/C][C]0.1815[/C][C]0.1498[/C][C]23177.9373[/C][C]17726.6619[/C][C]133.1415[/C][/ROW]
[ROW][C]70[/C][C]0.0824[/C][C]0.1111[/C][C]0.1459[/C][C]7072.1836[/C][C]16661.2141[/C][C]129.0783[/C][/ROW]
[ROW][C]71[/C][C]0.0894[/C][C]0.2778[/C][C]0.1579[/C][C]37597.9805[/C][C]18564.5565[/C][C]136.2518[/C][/ROW]
[ROW][C]72[/C][C]0.0765[/C][C]-0.0412[/C][C]0.1482[/C][C]1129.3932[/C][C]17111.6262[/C][C]130.8114[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110715&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110715&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.0741-0.02260320.222200
620.0960.20710.114818142.71279231.467596.0805
630.08960.44530.22596054.941238172.6254195.3782
640.09360.18390.214715027.123532386.2499179.9618
650.09120.07280.18632478.416626404.6832162.4952
660.07170.04030.1621234.718122209.6891149.0292
670.12640.07750.14991465.747319246.2688138.7309
680.18010.11680.14581638.138317045.2525130.5575
690.07440.18150.149823177.937317726.6619133.1415
700.08240.11110.14597072.183616661.2141129.0783
710.08940.27780.157937597.980518564.5565136.2518
720.0765-0.04120.14821129.393217111.6262130.8114



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