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, 29 Dec 2010 13:37:58 +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/29/t1293629753i5f2pgcdbw8r7rh.htm/, Retrieved Fri, 03 May 2024 13:41:20 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116817, Retrieved Fri, 03 May 2024 13:41:20 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact133
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Variance Reduction Matrix] [] [2010-12-24 15:11:40] [afd301b68d203992295e6972aed62880]
- RMPD  [ARIMA Forecasting] [] [2010-12-28 10:00:01] [afd301b68d203992295e6972aed62880]
-    D      [ARIMA Forecasting] [] [2010-12-29 13:37:58] [e180d4cd19004beeddc12e67012247dc] [Current]
Feedback Forum

Post a new message
Dataseries X:
00,521505
00,424828
00,425031
00,477194
00,828021
00,615619
00,366627
00,430888
00,281029
00,464625
00,269395
00,577905
00,566115
00,507758
00,750718
00,680840
00,766109
00,456147
00,497750
00,419327
00,609551
00,457337
00,570548
00,347900
00,387499
00,582429
00,239103
00,236745
00,262616
00,424093
00,365275
00,375076
00,409006
00,389168
00,240261
00,158950
00,439337
00,509468
00,374347
00,433983
00,413056
00,328893
00,518665
00,548650
00,546911
00,496349
00,530893
00,595776
00,557058
00,573133
00,500542
00,543127
00,559366
00,691169
00,440349
00,567666
00,596911
00,473554
00,592394
00,597556
00,633413
00,605712
00,704611
00,480526
00,702686
00,700902
00,603085
00,698092
00,597656
00,802342
00,601711
00,599313
00,602563
00,701663
00,499571
00,498092
00,497569
00,600183
00,333954
00,274437
00,320943
00,540667
00,405021
00,288596
00,327594
00,313261
00,257556
00,213839
00,186186
00,159271




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116817&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116817&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116817&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[78])
660.700902-------
670.603085-------
680.698092-------
690.597656-------
700.802342-------
710.601711-------
720.599313-------
730.602563-------
740.701663-------
750.499571-------
760.498092-------
770.497569-------
780.600183-------
790.3340.50920.25120.76720.09160.24460.23780.2446
800.27440.5490.27350.82440.02540.93690.14430.3578
810.32090.54910.26090.83720.06030.96910.37050.364
820.54070.55610.25610.85610.45980.93780.05380.3867
830.4050.50980.19840.82110.25480.42290.28140.2846
840.28860.52210.19970.84440.07790.76170.31930.3174
850.32760.57680.24450.90910.07080.95540.43960.4452
860.31330.6050.26260.94740.04740.94390.29010.511
870.25760.54630.19410.89850.0540.90270.60260.3821
880.21380.52580.16410.88750.04550.9270.55970.3435
890.18620.62280.25180.99380.01050.98460.74590.5475
900.15930.59250.21240.97260.01280.98190.48410.4841

\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[78]) \tabularnewline
66 & 0.700902 & - & - & - & - & - & - & - \tabularnewline
67 & 0.603085 & - & - & - & - & - & - & - \tabularnewline
68 & 0.698092 & - & - & - & - & - & - & - \tabularnewline
69 & 0.597656 & - & - & - & - & - & - & - \tabularnewline
70 & 0.802342 & - & - & - & - & - & - & - \tabularnewline
71 & 0.601711 & - & - & - & - & - & - & - \tabularnewline
72 & 0.599313 & - & - & - & - & - & - & - \tabularnewline
73 & 0.602563 & - & - & - & - & - & - & - \tabularnewline
74 & 0.701663 & - & - & - & - & - & - & - \tabularnewline
75 & 0.499571 & - & - & - & - & - & - & - \tabularnewline
76 & 0.498092 & - & - & - & - & - & - & - \tabularnewline
77 & 0.497569 & - & - & - & - & - & - & - \tabularnewline
78 & 0.600183 & - & - & - & - & - & - & - \tabularnewline
79 & 0.334 & 0.5092 & 0.2512 & 0.7672 & 0.0916 & 0.2446 & 0.2378 & 0.2446 \tabularnewline
80 & 0.2744 & 0.549 & 0.2735 & 0.8244 & 0.0254 & 0.9369 & 0.1443 & 0.3578 \tabularnewline
81 & 0.3209 & 0.5491 & 0.2609 & 0.8372 & 0.0603 & 0.9691 & 0.3705 & 0.364 \tabularnewline
82 & 0.5407 & 0.5561 & 0.2561 & 0.8561 & 0.4598 & 0.9378 & 0.0538 & 0.3867 \tabularnewline
83 & 0.405 & 0.5098 & 0.1984 & 0.8211 & 0.2548 & 0.4229 & 0.2814 & 0.2846 \tabularnewline
84 & 0.2886 & 0.5221 & 0.1997 & 0.8444 & 0.0779 & 0.7617 & 0.3193 & 0.3174 \tabularnewline
85 & 0.3276 & 0.5768 & 0.2445 & 0.9091 & 0.0708 & 0.9554 & 0.4396 & 0.4452 \tabularnewline
86 & 0.3133 & 0.605 & 0.2626 & 0.9474 & 0.0474 & 0.9439 & 0.2901 & 0.511 \tabularnewline
87 & 0.2576 & 0.5463 & 0.1941 & 0.8985 & 0.054 & 0.9027 & 0.6026 & 0.3821 \tabularnewline
88 & 0.2138 & 0.5258 & 0.1641 & 0.8875 & 0.0455 & 0.927 & 0.5597 & 0.3435 \tabularnewline
89 & 0.1862 & 0.6228 & 0.2518 & 0.9938 & 0.0105 & 0.9846 & 0.7459 & 0.5475 \tabularnewline
90 & 0.1593 & 0.5925 & 0.2124 & 0.9726 & 0.0128 & 0.9819 & 0.4841 & 0.4841 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116817&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[78])[/C][/ROW]
[ROW][C]66[/C][C]0.700902[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]0.603085[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]0.698092[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]0.597656[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]0.802342[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]0.601711[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]0.599313[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]0.602563[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]0.701663[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]0.499571[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]0.498092[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]0.497569[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]0.600183[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]0.334[/C][C]0.5092[/C][C]0.2512[/C][C]0.7672[/C][C]0.0916[/C][C]0.2446[/C][C]0.2378[/C][C]0.2446[/C][/ROW]
[ROW][C]80[/C][C]0.2744[/C][C]0.549[/C][C]0.2735[/C][C]0.8244[/C][C]0.0254[/C][C]0.9369[/C][C]0.1443[/C][C]0.3578[/C][/ROW]
[ROW][C]81[/C][C]0.3209[/C][C]0.5491[/C][C]0.2609[/C][C]0.8372[/C][C]0.0603[/C][C]0.9691[/C][C]0.3705[/C][C]0.364[/C][/ROW]
[ROW][C]82[/C][C]0.5407[/C][C]0.5561[/C][C]0.2561[/C][C]0.8561[/C][C]0.4598[/C][C]0.9378[/C][C]0.0538[/C][C]0.3867[/C][/ROW]
[ROW][C]83[/C][C]0.405[/C][C]0.5098[/C][C]0.1984[/C][C]0.8211[/C][C]0.2548[/C][C]0.4229[/C][C]0.2814[/C][C]0.2846[/C][/ROW]
[ROW][C]84[/C][C]0.2886[/C][C]0.5221[/C][C]0.1997[/C][C]0.8444[/C][C]0.0779[/C][C]0.7617[/C][C]0.3193[/C][C]0.3174[/C][/ROW]
[ROW][C]85[/C][C]0.3276[/C][C]0.5768[/C][C]0.2445[/C][C]0.9091[/C][C]0.0708[/C][C]0.9554[/C][C]0.4396[/C][C]0.4452[/C][/ROW]
[ROW][C]86[/C][C]0.3133[/C][C]0.605[/C][C]0.2626[/C][C]0.9474[/C][C]0.0474[/C][C]0.9439[/C][C]0.2901[/C][C]0.511[/C][/ROW]
[ROW][C]87[/C][C]0.2576[/C][C]0.5463[/C][C]0.1941[/C][C]0.8985[/C][C]0.054[/C][C]0.9027[/C][C]0.6026[/C][C]0.3821[/C][/ROW]
[ROW][C]88[/C][C]0.2138[/C][C]0.5258[/C][C]0.1641[/C][C]0.8875[/C][C]0.0455[/C][C]0.927[/C][C]0.5597[/C][C]0.3435[/C][/ROW]
[ROW][C]89[/C][C]0.1862[/C][C]0.6228[/C][C]0.2518[/C][C]0.9938[/C][C]0.0105[/C][C]0.9846[/C][C]0.7459[/C][C]0.5475[/C][/ROW]
[ROW][C]90[/C][C]0.1593[/C][C]0.5925[/C][C]0.2124[/C][C]0.9726[/C][C]0.0128[/C][C]0.9819[/C][C]0.4841[/C][C]0.4841[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116817&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116817&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[78])
660.700902-------
670.603085-------
680.698092-------
690.597656-------
700.802342-------
710.601711-------
720.599313-------
730.602563-------
740.701663-------
750.499571-------
760.498092-------
770.497569-------
780.600183-------
790.3340.50920.25120.76720.09160.24460.23780.2446
800.27440.5490.27350.82440.02540.93690.14430.3578
810.32090.54910.26090.83720.06030.96910.37050.364
820.54070.55610.25610.85610.45980.93780.05380.3867
830.4050.50980.19840.82110.25480.42290.28140.2846
840.28860.52210.19970.84440.07790.76170.31930.3174
850.32760.57680.24450.90910.07080.95540.43960.4452
860.31330.6050.26260.94740.04740.94390.29010.511
870.25760.54630.19410.89850.0540.90270.60260.3821
880.21380.52580.16410.88750.04550.9270.55970.3435
890.18620.62280.25180.99380.01050.98460.74590.5475
900.15930.59250.21240.97260.01280.98190.48410.4841







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
790.2585-0.344100.030700
800.256-0.50010.42210.07540.0530.2303
810.2677-0.41550.41990.0520.05270.2296
820.2752-0.02780.32192e-040.03960.199
830.3116-0.20550.29860.0110.03390.184
840.315-0.44720.32340.05450.03730.1931
850.2939-0.43210.33890.06210.04080.2021
860.2887-0.48220.35680.08510.04640.2154
870.3289-0.52850.37590.08340.05050.2247
880.351-0.59330.39760.09730.05520.2349
890.304-0.7010.42520.19060.06750.2598
900.3273-0.73120.45070.18760.07750.2784

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
79 & 0.2585 & -0.3441 & 0 & 0.0307 & 0 & 0 \tabularnewline
80 & 0.256 & -0.5001 & 0.4221 & 0.0754 & 0.053 & 0.2303 \tabularnewline
81 & 0.2677 & -0.4155 & 0.4199 & 0.052 & 0.0527 & 0.2296 \tabularnewline
82 & 0.2752 & -0.0278 & 0.3219 & 2e-04 & 0.0396 & 0.199 \tabularnewline
83 & 0.3116 & -0.2055 & 0.2986 & 0.011 & 0.0339 & 0.184 \tabularnewline
84 & 0.315 & -0.4472 & 0.3234 & 0.0545 & 0.0373 & 0.1931 \tabularnewline
85 & 0.2939 & -0.4321 & 0.3389 & 0.0621 & 0.0408 & 0.2021 \tabularnewline
86 & 0.2887 & -0.4822 & 0.3568 & 0.0851 & 0.0464 & 0.2154 \tabularnewline
87 & 0.3289 & -0.5285 & 0.3759 & 0.0834 & 0.0505 & 0.2247 \tabularnewline
88 & 0.351 & -0.5933 & 0.3976 & 0.0973 & 0.0552 & 0.2349 \tabularnewline
89 & 0.304 & -0.701 & 0.4252 & 0.1906 & 0.0675 & 0.2598 \tabularnewline
90 & 0.3273 & -0.7312 & 0.4507 & 0.1876 & 0.0775 & 0.2784 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116817&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]79[/C][C]0.2585[/C][C]-0.3441[/C][C]0[/C][C]0.0307[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]80[/C][C]0.256[/C][C]-0.5001[/C][C]0.4221[/C][C]0.0754[/C][C]0.053[/C][C]0.2303[/C][/ROW]
[ROW][C]81[/C][C]0.2677[/C][C]-0.4155[/C][C]0.4199[/C][C]0.052[/C][C]0.0527[/C][C]0.2296[/C][/ROW]
[ROW][C]82[/C][C]0.2752[/C][C]-0.0278[/C][C]0.3219[/C][C]2e-04[/C][C]0.0396[/C][C]0.199[/C][/ROW]
[ROW][C]83[/C][C]0.3116[/C][C]-0.2055[/C][C]0.2986[/C][C]0.011[/C][C]0.0339[/C][C]0.184[/C][/ROW]
[ROW][C]84[/C][C]0.315[/C][C]-0.4472[/C][C]0.3234[/C][C]0.0545[/C][C]0.0373[/C][C]0.1931[/C][/ROW]
[ROW][C]85[/C][C]0.2939[/C][C]-0.4321[/C][C]0.3389[/C][C]0.0621[/C][C]0.0408[/C][C]0.2021[/C][/ROW]
[ROW][C]86[/C][C]0.2887[/C][C]-0.4822[/C][C]0.3568[/C][C]0.0851[/C][C]0.0464[/C][C]0.2154[/C][/ROW]
[ROW][C]87[/C][C]0.3289[/C][C]-0.5285[/C][C]0.3759[/C][C]0.0834[/C][C]0.0505[/C][C]0.2247[/C][/ROW]
[ROW][C]88[/C][C]0.351[/C][C]-0.5933[/C][C]0.3976[/C][C]0.0973[/C][C]0.0552[/C][C]0.2349[/C][/ROW]
[ROW][C]89[/C][C]0.304[/C][C]-0.701[/C][C]0.4252[/C][C]0.1906[/C][C]0.0675[/C][C]0.2598[/C][/ROW]
[ROW][C]90[/C][C]0.3273[/C][C]-0.7312[/C][C]0.4507[/C][C]0.1876[/C][C]0.0775[/C][C]0.2784[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116817&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116817&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
790.2585-0.344100.030700
800.256-0.50010.42210.07540.0530.2303
810.2677-0.41550.41990.0520.05270.2296
820.2752-0.02780.32192e-040.03960.199
830.3116-0.20550.29860.0110.03390.184
840.315-0.44720.32340.05450.03730.1931
850.2939-0.43210.33890.06210.04080.2021
860.2887-0.48220.35680.08510.04640.2154
870.3289-0.52850.37590.08340.05050.2247
880.351-0.59330.39760.09730.05520.2349
890.304-0.7010.42520.19060.06750.2598
900.3273-0.73120.45070.18760.07750.2784



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