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 computationSat, 15 Dec 2012 06:29:10 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/15/t1355570986trtf0ejup1uvk7m.htm/, Retrieved Tue, 30 Apr 2024 16:53:43 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=199844, Retrieved Tue, 30 Apr 2024 16:53:43 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact131
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper Arima Forec...] [2012-12-15 11:29:10] [c63d55528b56cf8bb48e0b5d1a959d8e] [Current]
- R P     [ARIMA Forecasting] [Paper Arima Forec...] [2012-12-15 11:36:22] [86dcce9422b96d4554cb918e531c1d5d]
-    D      [ARIMA Forecasting] [Paper Arima Forec...] [2012-12-15 12:14:28] [86dcce9422b96d4554cb918e531c1d5d]
Feedback Forum

Post a new message
Dataseries X:
68.897
38.683
44.720
39.525
45.315
50.380
40.600
36.279
42.438
38.064
31.879
11.379
70.249
39.253
47.060
41.697
38.708
49.267
39.018
32.228
40.870
39.383
34.571
12.066
70.938
34.077
45.409
40.809
37.013
44.953
37.848
32.745
43.412
34.931
33.008
8.620
68.906
39.556
50.669
36.432
40.891
48.428
36.222
33.425
39.401
37.967
34.801
12.657
69.116
41.519
51.321
38.529
41.547
52.073
38.401
40.898
40.439
41.888
37.898
8.771
68.184
50.530
47.221
41.756
45.633
48.138
39.486
39.341
41.117
41.629
29.722
7.054
56.676
34.870
35.117
30.169
30.936
35.699
33.228
27.733
33.666
35.429
27.438
8.170
63.410
38.040
45.389
37.353
37.024
50.957
37.994
36.454
46.080
43.373
37.395
10.963
76.058
50.179
57.452
47.568
50.050
50.856
41.992
39.284




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gertrude Mary Cox' @ cox.wessa.net

\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 & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=199844&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]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=199844&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=199844&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'Gertrude Mary Cox' @ cox.wessa.net







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[92])
8027.733-------
8133.666-------
8235.429-------
8327.438-------
848.17-------
8563.41-------
8638.04-------
8745.389-------
8837.353-------
8937.024-------
9050.957-------
9137.994-------
9236.454-------
9346.0842.38732.849351.92470.2240.88860.96340.8886
9443.37344.1530.661657.63840.45510.38960.89750.8683
9537.39536.15919.639152.67890.44170.1960.84960.486
9610.96316.891-2.184535.96650.27120.01760.81490.0222
9776.05872.13150.80493.4580.359110.78860.9995
9850.17946.76123.398470.12360.38720.0070.76780.8064
9957.45254.1128.875579.34450.39760.61990.75090.9149
10047.56846.07419.097273.05080.45680.20420.73680.7577
10150.0545.74517.131874.35820.3840.45030.72490.7378
10250.85659.67829.51789.8390.28320.73420.71460.9344
10341.99246.71515.081978.34810.38490.39880.70550.7375
10439.28445.17512.135378.21470.36340.57490.69750.6975

\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[92]) \tabularnewline
80 & 27.733 & - & - & - & - & - & - & - \tabularnewline
81 & 33.666 & - & - & - & - & - & - & - \tabularnewline
82 & 35.429 & - & - & - & - & - & - & - \tabularnewline
83 & 27.438 & - & - & - & - & - & - & - \tabularnewline
84 & 8.17 & - & - & - & - & - & - & - \tabularnewline
85 & 63.41 & - & - & - & - & - & - & - \tabularnewline
86 & 38.04 & - & - & - & - & - & - & - \tabularnewline
87 & 45.389 & - & - & - & - & - & - & - \tabularnewline
88 & 37.353 & - & - & - & - & - & - & - \tabularnewline
89 & 37.024 & - & - & - & - & - & - & - \tabularnewline
90 & 50.957 & - & - & - & - & - & - & - \tabularnewline
91 & 37.994 & - & - & - & - & - & - & - \tabularnewline
92 & 36.454 & - & - & - & - & - & - & - \tabularnewline
93 & 46.08 & 42.387 & 32.8493 & 51.9247 & 0.224 & 0.8886 & 0.9634 & 0.8886 \tabularnewline
94 & 43.373 & 44.15 & 30.6616 & 57.6384 & 0.4551 & 0.3896 & 0.8975 & 0.8683 \tabularnewline
95 & 37.395 & 36.159 & 19.6391 & 52.6789 & 0.4417 & 0.196 & 0.8496 & 0.486 \tabularnewline
96 & 10.963 & 16.891 & -2.1845 & 35.9665 & 0.2712 & 0.0176 & 0.8149 & 0.0222 \tabularnewline
97 & 76.058 & 72.131 & 50.804 & 93.458 & 0.3591 & 1 & 0.7886 & 0.9995 \tabularnewline
98 & 50.179 & 46.761 & 23.3984 & 70.1236 & 0.3872 & 0.007 & 0.7678 & 0.8064 \tabularnewline
99 & 57.452 & 54.11 & 28.8755 & 79.3445 & 0.3976 & 0.6199 & 0.7509 & 0.9149 \tabularnewline
100 & 47.568 & 46.074 & 19.0972 & 73.0508 & 0.4568 & 0.2042 & 0.7368 & 0.7577 \tabularnewline
101 & 50.05 & 45.745 & 17.1318 & 74.3582 & 0.384 & 0.4503 & 0.7249 & 0.7378 \tabularnewline
102 & 50.856 & 59.678 & 29.517 & 89.839 & 0.2832 & 0.7342 & 0.7146 & 0.9344 \tabularnewline
103 & 41.992 & 46.715 & 15.0819 & 78.3481 & 0.3849 & 0.3988 & 0.7055 & 0.7375 \tabularnewline
104 & 39.284 & 45.175 & 12.1353 & 78.2147 & 0.3634 & 0.5749 & 0.6975 & 0.6975 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=199844&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[92])[/C][/ROW]
[ROW][C]80[/C][C]27.733[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]33.666[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]35.429[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]27.438[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]8.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]63.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]38.04[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]45.389[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]37.353[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]37.024[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]50.957[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]37.994[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]36.454[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]46.08[/C][C]42.387[/C][C]32.8493[/C][C]51.9247[/C][C]0.224[/C][C]0.8886[/C][C]0.9634[/C][C]0.8886[/C][/ROW]
[ROW][C]94[/C][C]43.373[/C][C]44.15[/C][C]30.6616[/C][C]57.6384[/C][C]0.4551[/C][C]0.3896[/C][C]0.8975[/C][C]0.8683[/C][/ROW]
[ROW][C]95[/C][C]37.395[/C][C]36.159[/C][C]19.6391[/C][C]52.6789[/C][C]0.4417[/C][C]0.196[/C][C]0.8496[/C][C]0.486[/C][/ROW]
[ROW][C]96[/C][C]10.963[/C][C]16.891[/C][C]-2.1845[/C][C]35.9665[/C][C]0.2712[/C][C]0.0176[/C][C]0.8149[/C][C]0.0222[/C][/ROW]
[ROW][C]97[/C][C]76.058[/C][C]72.131[/C][C]50.804[/C][C]93.458[/C][C]0.3591[/C][C]1[/C][C]0.7886[/C][C]0.9995[/C][/ROW]
[ROW][C]98[/C][C]50.179[/C][C]46.761[/C][C]23.3984[/C][C]70.1236[/C][C]0.3872[/C][C]0.007[/C][C]0.7678[/C][C]0.8064[/C][/ROW]
[ROW][C]99[/C][C]57.452[/C][C]54.11[/C][C]28.8755[/C][C]79.3445[/C][C]0.3976[/C][C]0.6199[/C][C]0.7509[/C][C]0.9149[/C][/ROW]
[ROW][C]100[/C][C]47.568[/C][C]46.074[/C][C]19.0972[/C][C]73.0508[/C][C]0.4568[/C][C]0.2042[/C][C]0.7368[/C][C]0.7577[/C][/ROW]
[ROW][C]101[/C][C]50.05[/C][C]45.745[/C][C]17.1318[/C][C]74.3582[/C][C]0.384[/C][C]0.4503[/C][C]0.7249[/C][C]0.7378[/C][/ROW]
[ROW][C]102[/C][C]50.856[/C][C]59.678[/C][C]29.517[/C][C]89.839[/C][C]0.2832[/C][C]0.7342[/C][C]0.7146[/C][C]0.9344[/C][/ROW]
[ROW][C]103[/C][C]41.992[/C][C]46.715[/C][C]15.0819[/C][C]78.3481[/C][C]0.3849[/C][C]0.3988[/C][C]0.7055[/C][C]0.7375[/C][/ROW]
[ROW][C]104[/C][C]39.284[/C][C]45.175[/C][C]12.1353[/C][C]78.2147[/C][C]0.3634[/C][C]0.5749[/C][C]0.6975[/C][C]0.6975[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=199844&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=199844&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[92])
8027.733-------
8133.666-------
8235.429-------
8327.438-------
848.17-------
8563.41-------
8638.04-------
8745.389-------
8837.353-------
8937.024-------
9050.957-------
9137.994-------
9236.454-------
9346.0842.38732.849351.92470.2240.88860.96340.8886
9443.37344.1530.661657.63840.45510.38960.89750.8683
9537.39536.15919.639152.67890.44170.1960.84960.486
9610.96316.891-2.184535.96650.27120.01760.81490.0222
9776.05872.13150.80493.4580.359110.78860.9995
9850.17946.76123.398470.12360.38720.0070.76780.8064
9957.45254.1128.875579.34450.39760.61990.75090.9149
10047.56846.07419.097273.05080.45680.20420.73680.7577
10150.0545.74517.131874.35820.3840.45030.72490.7378
10250.85659.67829.51789.8390.28320.73420.71460.9344
10341.99246.71515.081978.34810.38490.39880.70550.7375
10439.28445.17512.135378.21470.36340.57490.69750.6975







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
930.11480.0871013.638200
940.1559-0.01760.05240.60377.1212.6685
950.23310.03420.04631.52775.25662.2927
960.5762-0.3510.122535.141212.72773.5676
970.15090.05440.108915.421313.26643.6423
980.25490.07310.102911.682713.00253.6059
990.23790.06180.09711.16912.74063.5694
1000.29870.03240.08892.23211.4273.3804
1010.31910.09410.089518.53312.21653.4952
1020.2579-0.14780.095477.827718.77774.3333
1030.3455-0.10110.095922.306719.09854.3702
1040.3731-0.13040.098834.703920.39894.5165

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
93 & 0.1148 & 0.0871 & 0 & 13.6382 & 0 & 0 \tabularnewline
94 & 0.1559 & -0.0176 & 0.0524 & 0.6037 & 7.121 & 2.6685 \tabularnewline
95 & 0.2331 & 0.0342 & 0.0463 & 1.5277 & 5.2566 & 2.2927 \tabularnewline
96 & 0.5762 & -0.351 & 0.1225 & 35.1412 & 12.7277 & 3.5676 \tabularnewline
97 & 0.1509 & 0.0544 & 0.1089 & 15.4213 & 13.2664 & 3.6423 \tabularnewline
98 & 0.2549 & 0.0731 & 0.1029 & 11.6827 & 13.0025 & 3.6059 \tabularnewline
99 & 0.2379 & 0.0618 & 0.097 & 11.169 & 12.7406 & 3.5694 \tabularnewline
100 & 0.2987 & 0.0324 & 0.0889 & 2.232 & 11.427 & 3.3804 \tabularnewline
101 & 0.3191 & 0.0941 & 0.0895 & 18.533 & 12.2165 & 3.4952 \tabularnewline
102 & 0.2579 & -0.1478 & 0.0954 & 77.8277 & 18.7777 & 4.3333 \tabularnewline
103 & 0.3455 & -0.1011 & 0.0959 & 22.3067 & 19.0985 & 4.3702 \tabularnewline
104 & 0.3731 & -0.1304 & 0.0988 & 34.7039 & 20.3989 & 4.5165 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=199844&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]93[/C][C]0.1148[/C][C]0.0871[/C][C]0[/C][C]13.6382[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]94[/C][C]0.1559[/C][C]-0.0176[/C][C]0.0524[/C][C]0.6037[/C][C]7.121[/C][C]2.6685[/C][/ROW]
[ROW][C]95[/C][C]0.2331[/C][C]0.0342[/C][C]0.0463[/C][C]1.5277[/C][C]5.2566[/C][C]2.2927[/C][/ROW]
[ROW][C]96[/C][C]0.5762[/C][C]-0.351[/C][C]0.1225[/C][C]35.1412[/C][C]12.7277[/C][C]3.5676[/C][/ROW]
[ROW][C]97[/C][C]0.1509[/C][C]0.0544[/C][C]0.1089[/C][C]15.4213[/C][C]13.2664[/C][C]3.6423[/C][/ROW]
[ROW][C]98[/C][C]0.2549[/C][C]0.0731[/C][C]0.1029[/C][C]11.6827[/C][C]13.0025[/C][C]3.6059[/C][/ROW]
[ROW][C]99[/C][C]0.2379[/C][C]0.0618[/C][C]0.097[/C][C]11.169[/C][C]12.7406[/C][C]3.5694[/C][/ROW]
[ROW][C]100[/C][C]0.2987[/C][C]0.0324[/C][C]0.0889[/C][C]2.232[/C][C]11.427[/C][C]3.3804[/C][/ROW]
[ROW][C]101[/C][C]0.3191[/C][C]0.0941[/C][C]0.0895[/C][C]18.533[/C][C]12.2165[/C][C]3.4952[/C][/ROW]
[ROW][C]102[/C][C]0.2579[/C][C]-0.1478[/C][C]0.0954[/C][C]77.8277[/C][C]18.7777[/C][C]4.3333[/C][/ROW]
[ROW][C]103[/C][C]0.3455[/C][C]-0.1011[/C][C]0.0959[/C][C]22.3067[/C][C]19.0985[/C][C]4.3702[/C][/ROW]
[ROW][C]104[/C][C]0.3731[/C][C]-0.1304[/C][C]0.0988[/C][C]34.7039[/C][C]20.3989[/C][C]4.5165[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=199844&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=199844&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
930.11480.0871013.638200
940.1559-0.01760.05240.60377.1212.6685
950.23310.03420.04631.52775.25662.2927
960.5762-0.3510.122535.141212.72773.5676
970.15090.05440.108915.421313.26643.6423
980.25490.07310.102911.682713.00253.6059
990.23790.06180.09711.16912.74063.5694
1000.29870.03240.08892.23211.4273.3804
1010.31910.09410.089518.53312.21653.4952
1020.2579-0.14780.095477.827718.77774.3333
1030.3455-0.10110.095922.306719.09854.3702
1040.3731-0.13040.098834.703920.39894.5165



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