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 computationTue, 28 Dec 2010 19:34:07 +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/28/t129356472850hehe8tscjjjcv.htm/, Retrieved Sat, 04 May 2024 20:59:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116523, Retrieved Sat, 04 May 2024 20:59:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact132
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2010-12-28 00:01:57] [f57e4c4cbbe8f12a19647529ae7266aa]
-   P     [ARIMA Forecasting] [] [2010-12-28 19:34:07] [c984196f1244e05baf3e7c2e52d47a33] [Current]
- RMPD      [Kendall tau Rank Correlation] [] [2010-12-28 22:20:21] [f57e4c4cbbe8f12a19647529ae7266aa]
- RMPD      [Pearson Correlation] [] [2010-12-28 22:33:33] [f57e4c4cbbe8f12a19647529ae7266aa]
Feedback Forum

Post a new message
Dataseries X:
110.43
114.77
132.21
122.86
118.5
130.3
113.25
104.54
132.78
122.99
133.14
125.83
122.99
125.7
148.47
120.75
136.7
139.17
123.47
112.76
137.99
139.75
140.22
121.6
132.33
130.34
149.05
130.47
139.29
146.55
137.79
122.95
139.51
155.77
143.95
125.07
142.35
144.34
145.87
156.01
146.74
156.45
152.29
122.56
154.59
149.68
118.75
109.22
104.19
107.33
114.07
107.92
103.53
117.3
112.09
95.08
123.28
121.98
121.74
119.93
115.11




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 & 1 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116523&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]1 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=116523&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116523&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 time1 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[49])
37142.35-------
38144.34-------
39145.87-------
40156.01-------
41146.74-------
42156.45-------
43152.29-------
44122.56-------
45154.59-------
46149.68-------
47118.75-------
48109.22-------
49104.19-------
50107.33105.321691.6406123.17610.41280.549400.5494
51114.07106.187487.488133.55720.28620.46740.00220.5569
52107.92111.834287.7634151.10450.42260.45560.01370.6486
53103.53106.67881.6977149.82120.44310.47750.03440.545
54117.3112.075782.5837168.02520.42740.61770.060.6088
55112.09109.780779.2264170.89150.47050.40470.08640.5712
5695.0892.581667.9342139.83440.45870.20920.10680.3151
57123.28111.052876.4952189.35270.37980.65540.13790.5682
58121.98108.327573.672189.71640.37120.35940.15970.5397
59121.7490.269163.2527148.67640.14550.14360.16960.3202
60119.9384.367459.2349138.41130.09860.08760.18370.2361
61115.1181.182356.7747134.22870.1050.07610.19760.1976

\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 & 142.35 & - & - & - & - & - & - & - \tabularnewline
38 & 144.34 & - & - & - & - & - & - & - \tabularnewline
39 & 145.87 & - & - & - & - & - & - & - \tabularnewline
40 & 156.01 & - & - & - & - & - & - & - \tabularnewline
41 & 146.74 & - & - & - & - & - & - & - \tabularnewline
42 & 156.45 & - & - & - & - & - & - & - \tabularnewline
43 & 152.29 & - & - & - & - & - & - & - \tabularnewline
44 & 122.56 & - & - & - & - & - & - & - \tabularnewline
45 & 154.59 & - & - & - & - & - & - & - \tabularnewline
46 & 149.68 & - & - & - & - & - & - & - \tabularnewline
47 & 118.75 & - & - & - & - & - & - & - \tabularnewline
48 & 109.22 & - & - & - & - & - & - & - \tabularnewline
49 & 104.19 & - & - & - & - & - & - & - \tabularnewline
50 & 107.33 & 105.3216 & 91.6406 & 123.1761 & 0.4128 & 0.5494 & 0 & 0.5494 \tabularnewline
51 & 114.07 & 106.1874 & 87.488 & 133.5572 & 0.2862 & 0.4674 & 0.0022 & 0.5569 \tabularnewline
52 & 107.92 & 111.8342 & 87.7634 & 151.1045 & 0.4226 & 0.4556 & 0.0137 & 0.6486 \tabularnewline
53 & 103.53 & 106.678 & 81.6977 & 149.8212 & 0.4431 & 0.4775 & 0.0344 & 0.545 \tabularnewline
54 & 117.3 & 112.0757 & 82.5837 & 168.0252 & 0.4274 & 0.6177 & 0.06 & 0.6088 \tabularnewline
55 & 112.09 & 109.7807 & 79.2264 & 170.8915 & 0.4705 & 0.4047 & 0.0864 & 0.5712 \tabularnewline
56 & 95.08 & 92.5816 & 67.9342 & 139.8344 & 0.4587 & 0.2092 & 0.1068 & 0.3151 \tabularnewline
57 & 123.28 & 111.0528 & 76.4952 & 189.3527 & 0.3798 & 0.6554 & 0.1379 & 0.5682 \tabularnewline
58 & 121.98 & 108.3275 & 73.672 & 189.7164 & 0.3712 & 0.3594 & 0.1597 & 0.5397 \tabularnewline
59 & 121.74 & 90.2691 & 63.2527 & 148.6764 & 0.1455 & 0.1436 & 0.1696 & 0.3202 \tabularnewline
60 & 119.93 & 84.3674 & 59.2349 & 138.4113 & 0.0986 & 0.0876 & 0.1837 & 0.2361 \tabularnewline
61 & 115.11 & 81.1823 & 56.7747 & 134.2287 & 0.105 & 0.0761 & 0.1976 & 0.1976 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116523&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]142.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]144.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]145.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]156.01[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]146.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]156.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]152.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]122.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]154.59[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]149.68[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]118.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]109.22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]104.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]107.33[/C][C]105.3216[/C][C]91.6406[/C][C]123.1761[/C][C]0.4128[/C][C]0.5494[/C][C]0[/C][C]0.5494[/C][/ROW]
[ROW][C]51[/C][C]114.07[/C][C]106.1874[/C][C]87.488[/C][C]133.5572[/C][C]0.2862[/C][C]0.4674[/C][C]0.0022[/C][C]0.5569[/C][/ROW]
[ROW][C]52[/C][C]107.92[/C][C]111.8342[/C][C]87.7634[/C][C]151.1045[/C][C]0.4226[/C][C]0.4556[/C][C]0.0137[/C][C]0.6486[/C][/ROW]
[ROW][C]53[/C][C]103.53[/C][C]106.678[/C][C]81.6977[/C][C]149.8212[/C][C]0.4431[/C][C]0.4775[/C][C]0.0344[/C][C]0.545[/C][/ROW]
[ROW][C]54[/C][C]117.3[/C][C]112.0757[/C][C]82.5837[/C][C]168.0252[/C][C]0.4274[/C][C]0.6177[/C][C]0.06[/C][C]0.6088[/C][/ROW]
[ROW][C]55[/C][C]112.09[/C][C]109.7807[/C][C]79.2264[/C][C]170.8915[/C][C]0.4705[/C][C]0.4047[/C][C]0.0864[/C][C]0.5712[/C][/ROW]
[ROW][C]56[/C][C]95.08[/C][C]92.5816[/C][C]67.9342[/C][C]139.8344[/C][C]0.4587[/C][C]0.2092[/C][C]0.1068[/C][C]0.3151[/C][/ROW]
[ROW][C]57[/C][C]123.28[/C][C]111.0528[/C][C]76.4952[/C][C]189.3527[/C][C]0.3798[/C][C]0.6554[/C][C]0.1379[/C][C]0.5682[/C][/ROW]
[ROW][C]58[/C][C]121.98[/C][C]108.3275[/C][C]73.672[/C][C]189.7164[/C][C]0.3712[/C][C]0.3594[/C][C]0.1597[/C][C]0.5397[/C][/ROW]
[ROW][C]59[/C][C]121.74[/C][C]90.2691[/C][C]63.2527[/C][C]148.6764[/C][C]0.1455[/C][C]0.1436[/C][C]0.1696[/C][C]0.3202[/C][/ROW]
[ROW][C]60[/C][C]119.93[/C][C]84.3674[/C][C]59.2349[/C][C]138.4113[/C][C]0.0986[/C][C]0.0876[/C][C]0.1837[/C][C]0.2361[/C][/ROW]
[ROW][C]61[/C][C]115.11[/C][C]81.1823[/C][C]56.7747[/C][C]134.2287[/C][C]0.105[/C][C]0.0761[/C][C]0.1976[/C][C]0.1976[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116523&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116523&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])
37142.35-------
38144.34-------
39145.87-------
40156.01-------
41146.74-------
42156.45-------
43152.29-------
44122.56-------
45154.59-------
46149.68-------
47118.75-------
48109.22-------
49104.19-------
50107.33105.321691.6406123.17610.41280.549400.5494
51114.07106.187487.488133.55720.28620.46740.00220.5569
52107.92111.834287.7634151.10450.42260.45560.01370.6486
53103.53106.67881.6977149.82120.44310.47750.03440.545
54117.3112.075782.5837168.02520.42740.61770.060.6088
55112.09109.780779.2264170.89150.47050.40470.08640.5712
5695.0892.581667.9342139.83440.45870.20920.10680.3151
57123.28111.052876.4952189.35270.37980.65540.13790.5682
58121.98108.327573.672189.71640.37120.35940.15970.5397
59121.7490.269163.2527148.67640.14550.14360.16960.3202
60119.9384.367459.2349138.41130.09860.08760.18370.2361
61115.1181.182356.7747134.22870.1050.07610.19760.1976







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.08650.019104.033700
510.13150.07420.046762.135833.08475.7519
520.1792-0.0350.042815.320727.16345.2119
530.2063-0.02950.03959.910222.85014.7802
540.25470.04660.040927.293423.73884.8722
550.2840.0210.03765.332920.67114.5466
560.26040.0270.03616.241818.60984.3139
570.35970.11010.0453149.505534.97185.9137
580.38330.1260.0543186.391151.79617.197
590.33010.34860.0837990.4199145.658512.0689
600.32680.42150.11441264.7011247.389715.7286
610.33340.41790.13971151.0897322.69817.9638

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0865 & 0.0191 & 0 & 4.0337 & 0 & 0 \tabularnewline
51 & 0.1315 & 0.0742 & 0.0467 & 62.1358 & 33.0847 & 5.7519 \tabularnewline
52 & 0.1792 & -0.035 & 0.0428 & 15.3207 & 27.1634 & 5.2119 \tabularnewline
53 & 0.2063 & -0.0295 & 0.0395 & 9.9102 & 22.8501 & 4.7802 \tabularnewline
54 & 0.2547 & 0.0466 & 0.0409 & 27.2934 & 23.7388 & 4.8722 \tabularnewline
55 & 0.284 & 0.021 & 0.0376 & 5.3329 & 20.6711 & 4.5466 \tabularnewline
56 & 0.2604 & 0.027 & 0.0361 & 6.2418 & 18.6098 & 4.3139 \tabularnewline
57 & 0.3597 & 0.1101 & 0.0453 & 149.5055 & 34.9718 & 5.9137 \tabularnewline
58 & 0.3833 & 0.126 & 0.0543 & 186.3911 & 51.7961 & 7.197 \tabularnewline
59 & 0.3301 & 0.3486 & 0.0837 & 990.4199 & 145.6585 & 12.0689 \tabularnewline
60 & 0.3268 & 0.4215 & 0.1144 & 1264.7011 & 247.3897 & 15.7286 \tabularnewline
61 & 0.3334 & 0.4179 & 0.1397 & 1151.0897 & 322.698 & 17.9638 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116523&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]0.0865[/C][C]0.0191[/C][C]0[/C][C]4.0337[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.1315[/C][C]0.0742[/C][C]0.0467[/C][C]62.1358[/C][C]33.0847[/C][C]5.7519[/C][/ROW]
[ROW][C]52[/C][C]0.1792[/C][C]-0.035[/C][C]0.0428[/C][C]15.3207[/C][C]27.1634[/C][C]5.2119[/C][/ROW]
[ROW][C]53[/C][C]0.2063[/C][C]-0.0295[/C][C]0.0395[/C][C]9.9102[/C][C]22.8501[/C][C]4.7802[/C][/ROW]
[ROW][C]54[/C][C]0.2547[/C][C]0.0466[/C][C]0.0409[/C][C]27.2934[/C][C]23.7388[/C][C]4.8722[/C][/ROW]
[ROW][C]55[/C][C]0.284[/C][C]0.021[/C][C]0.0376[/C][C]5.3329[/C][C]20.6711[/C][C]4.5466[/C][/ROW]
[ROW][C]56[/C][C]0.2604[/C][C]0.027[/C][C]0.0361[/C][C]6.2418[/C][C]18.6098[/C][C]4.3139[/C][/ROW]
[ROW][C]57[/C][C]0.3597[/C][C]0.1101[/C][C]0.0453[/C][C]149.5055[/C][C]34.9718[/C][C]5.9137[/C][/ROW]
[ROW][C]58[/C][C]0.3833[/C][C]0.126[/C][C]0.0543[/C][C]186.3911[/C][C]51.7961[/C][C]7.197[/C][/ROW]
[ROW][C]59[/C][C]0.3301[/C][C]0.3486[/C][C]0.0837[/C][C]990.4199[/C][C]145.6585[/C][C]12.0689[/C][/ROW]
[ROW][C]60[/C][C]0.3268[/C][C]0.4215[/C][C]0.1144[/C][C]1264.7011[/C][C]247.3897[/C][C]15.7286[/C][/ROW]
[ROW][C]61[/C][C]0.3334[/C][C]0.4179[/C][C]0.1397[/C][C]1151.0897[/C][C]322.698[/C][C]17.9638[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116523&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116523&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
500.08650.019104.033700
510.13150.07420.046762.135833.08475.7519
520.1792-0.0350.042815.320727.16345.2119
530.2063-0.02950.03959.910222.85014.7802
540.25470.04660.040927.293423.73884.8722
550.2840.0210.03765.332920.67114.5466
560.26040.0270.03616.241818.60984.3139
570.35970.11010.0453149.505534.97185.9137
580.38330.1260.0543186.391151.79617.197
590.33010.34860.0837990.4199145.658512.0689
600.32680.42150.11441264.7011247.389715.7286
610.33340.41790.13971151.0897322.69817.9638



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