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 computationThu, 16 Dec 2010 21:35:27 +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/16/t1292535279csxl8cvgdsx8mxi.htm/, Retrieved Fri, 03 May 2024 07:19:57 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=111297, Retrieved Fri, 03 May 2024 07:19:57 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact196
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD      [ARIMA Forecasting] [] [2010-12-14 16:23:21] [897115520fe7b6114489bc0eeed64548]
-             [ARIMA Forecasting] [] [2010-12-15 11:20:23] [bfba28641a1925a39268a5d6ad3b00f2]
-   PD            [ARIMA Forecasting] [workshop 9 link 9] [2010-12-16 21:35:27] [95216a33d813bfae7986b08ea3322626] [Current]
Feedback Forum

Post a new message
Dataseries X:
33
24
24
31
25
28
24
25
16
17
11
12
39
19
14
15
7
12
12
14
9
8
4
7
3
5
0
-2
6
11
9
17
21
21
41
57
65
68
73
71
71
70
69
65
57
57
57
55
65
65
64
60
43
47
40
31
27
24
23
17




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

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111297&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 time4 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])
3657-------
3765-------
3868-------
3973-------
4071-------
4171-------
4270-------
4369-------
4465-------
4557-------
4657-------
4757-------
4855-------
496557.080443.502970.65790.12650.6180.12650.618
506555.941135.686376.19580.19030.19030.12160.5363
516456.130331.195381.06540.26810.24280.09240.5354
526055.989425.219186.75970.39920.30490.16950.5251
534355.105520.747789.46330.24490.390.18230.5024
544755.091116.408793.77340.34090.72990.2250.5018
554055.157613.215797.09960.23940.64850.25890.5029
563154.59419.29599.89320.15370.73610.32630.493
572753.97325.6649102.28150.13690.82440.45110.4834
582453.83362.6937104.97350.12640.84810.45170.4822
592352.8333-1.0465106.7130.13890.85290.43980.4686
601751.6786-4.7409108.0980.11420.84040.45410.4541

\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 & 57 & - & - & - & - & - & - & - \tabularnewline
37 & 65 & - & - & - & - & - & - & - \tabularnewline
38 & 68 & - & - & - & - & - & - & - \tabularnewline
39 & 73 & - & - & - & - & - & - & - \tabularnewline
40 & 71 & - & - & - & - & - & - & - \tabularnewline
41 & 71 & - & - & - & - & - & - & - \tabularnewline
42 & 70 & - & - & - & - & - & - & - \tabularnewline
43 & 69 & - & - & - & - & - & - & - \tabularnewline
44 & 65 & - & - & - & - & - & - & - \tabularnewline
45 & 57 & - & - & - & - & - & - & - \tabularnewline
46 & 57 & - & - & - & - & - & - & - \tabularnewline
47 & 57 & - & - & - & - & - & - & - \tabularnewline
48 & 55 & - & - & - & - & - & - & - \tabularnewline
49 & 65 & 57.0804 & 43.5029 & 70.6579 & 0.1265 & 0.618 & 0.1265 & 0.618 \tabularnewline
50 & 65 & 55.9411 & 35.6863 & 76.1958 & 0.1903 & 0.1903 & 0.1216 & 0.5363 \tabularnewline
51 & 64 & 56.1303 & 31.1953 & 81.0654 & 0.2681 & 0.2428 & 0.0924 & 0.5354 \tabularnewline
52 & 60 & 55.9894 & 25.2191 & 86.7597 & 0.3992 & 0.3049 & 0.1695 & 0.5251 \tabularnewline
53 & 43 & 55.1055 & 20.7477 & 89.4633 & 0.2449 & 0.39 & 0.1823 & 0.5024 \tabularnewline
54 & 47 & 55.0911 & 16.4087 & 93.7734 & 0.3409 & 0.7299 & 0.225 & 0.5018 \tabularnewline
55 & 40 & 55.1576 & 13.2157 & 97.0996 & 0.2394 & 0.6485 & 0.2589 & 0.5029 \tabularnewline
56 & 31 & 54.5941 & 9.295 & 99.8932 & 0.1537 & 0.7361 & 0.3263 & 0.493 \tabularnewline
57 & 27 & 53.9732 & 5.6649 & 102.2815 & 0.1369 & 0.8244 & 0.4511 & 0.4834 \tabularnewline
58 & 24 & 53.8336 & 2.6937 & 104.9735 & 0.1264 & 0.8481 & 0.4517 & 0.4822 \tabularnewline
59 & 23 & 52.8333 & -1.0465 & 106.713 & 0.1389 & 0.8529 & 0.4398 & 0.4686 \tabularnewline
60 & 17 & 51.6786 & -4.7409 & 108.098 & 0.1142 & 0.8404 & 0.4541 & 0.4541 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111297&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]57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]68[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]73[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]70[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]65[/C][C]57.0804[/C][C]43.5029[/C][C]70.6579[/C][C]0.1265[/C][C]0.618[/C][C]0.1265[/C][C]0.618[/C][/ROW]
[ROW][C]50[/C][C]65[/C][C]55.9411[/C][C]35.6863[/C][C]76.1958[/C][C]0.1903[/C][C]0.1903[/C][C]0.1216[/C][C]0.5363[/C][/ROW]
[ROW][C]51[/C][C]64[/C][C]56.1303[/C][C]31.1953[/C][C]81.0654[/C][C]0.2681[/C][C]0.2428[/C][C]0.0924[/C][C]0.5354[/C][/ROW]
[ROW][C]52[/C][C]60[/C][C]55.9894[/C][C]25.2191[/C][C]86.7597[/C][C]0.3992[/C][C]0.3049[/C][C]0.1695[/C][C]0.5251[/C][/ROW]
[ROW][C]53[/C][C]43[/C][C]55.1055[/C][C]20.7477[/C][C]89.4633[/C][C]0.2449[/C][C]0.39[/C][C]0.1823[/C][C]0.5024[/C][/ROW]
[ROW][C]54[/C][C]47[/C][C]55.0911[/C][C]16.4087[/C][C]93.7734[/C][C]0.3409[/C][C]0.7299[/C][C]0.225[/C][C]0.5018[/C][/ROW]
[ROW][C]55[/C][C]40[/C][C]55.1576[/C][C]13.2157[/C][C]97.0996[/C][C]0.2394[/C][C]0.6485[/C][C]0.2589[/C][C]0.5029[/C][/ROW]
[ROW][C]56[/C][C]31[/C][C]54.5941[/C][C]9.295[/C][C]99.8932[/C][C]0.1537[/C][C]0.7361[/C][C]0.3263[/C][C]0.493[/C][/ROW]
[ROW][C]57[/C][C]27[/C][C]53.9732[/C][C]5.6649[/C][C]102.2815[/C][C]0.1369[/C][C]0.8244[/C][C]0.4511[/C][C]0.4834[/C][/ROW]
[ROW][C]58[/C][C]24[/C][C]53.8336[/C][C]2.6937[/C][C]104.9735[/C][C]0.1264[/C][C]0.8481[/C][C]0.4517[/C][C]0.4822[/C][/ROW]
[ROW][C]59[/C][C]23[/C][C]52.8333[/C][C]-1.0465[/C][C]106.713[/C][C]0.1389[/C][C]0.8529[/C][C]0.4398[/C][C]0.4686[/C][/ROW]
[ROW][C]60[/C][C]17[/C][C]51.6786[/C][C]-4.7409[/C][C]108.098[/C][C]0.1142[/C][C]0.8404[/C][C]0.4541[/C][C]0.4541[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111297&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111297&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])
3657-------
3765-------
3868-------
3973-------
4071-------
4171-------
4270-------
4369-------
4465-------
4557-------
4657-------
4757-------
4855-------
496557.080443.502970.65790.12650.6180.12650.618
506555.941135.686376.19580.19030.19030.12160.5363
516456.130331.195381.06540.26810.24280.09240.5354
526055.989425.219186.75970.39920.30490.16950.5251
534355.105520.747789.46330.24490.390.18230.5024
544755.091116.408793.77340.34090.72990.2250.5018
554055.157613.215797.09960.23940.64850.25890.5029
563154.59419.29599.89320.15370.73610.32630.493
572753.97325.6649102.28150.13690.82440.45110.4834
582453.83362.6937104.97350.12640.84810.45170.4822
592352.8333-1.0465106.7130.13890.85290.43980.4686
601751.6786-4.7409108.0980.11420.84040.45410.4541







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.12140.1387062.720200
500.18470.16190.150382.064372.39228.5084
510.22670.14020.14761.931468.90538.3009
520.28040.07160.128116.085155.70027.4633
530.3181-0.21970.1464146.542373.86868.5947
540.3582-0.14690.146565.465472.46818.5128
550.388-0.27480.1648229.753794.93759.7436
560.4233-0.43220.1983556.6804152.655312.3554
570.4567-0.49980.2318727.5558216.533214.7151
580.4847-0.55420.264890.046283.884516.8489
590.5203-0.56470.2913890.0242338.988118.4116
600.557-0.6710.3231202.6025410.955920.272

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1214 & 0.1387 & 0 & 62.7202 & 0 & 0 \tabularnewline
50 & 0.1847 & 0.1619 & 0.1503 & 82.0643 & 72.3922 & 8.5084 \tabularnewline
51 & 0.2267 & 0.1402 & 0.147 & 61.9314 & 68.9053 & 8.3009 \tabularnewline
52 & 0.2804 & 0.0716 & 0.1281 & 16.0851 & 55.7002 & 7.4633 \tabularnewline
53 & 0.3181 & -0.2197 & 0.1464 & 146.5423 & 73.8686 & 8.5947 \tabularnewline
54 & 0.3582 & -0.1469 & 0.1465 & 65.4654 & 72.4681 & 8.5128 \tabularnewline
55 & 0.388 & -0.2748 & 0.1648 & 229.7537 & 94.9375 & 9.7436 \tabularnewline
56 & 0.4233 & -0.4322 & 0.1983 & 556.6804 & 152.6553 & 12.3554 \tabularnewline
57 & 0.4567 & -0.4998 & 0.2318 & 727.5558 & 216.5332 & 14.7151 \tabularnewline
58 & 0.4847 & -0.5542 & 0.264 & 890.046 & 283.8845 & 16.8489 \tabularnewline
59 & 0.5203 & -0.5647 & 0.2913 & 890.0242 & 338.9881 & 18.4116 \tabularnewline
60 & 0.557 & -0.671 & 0.323 & 1202.6025 & 410.9559 & 20.272 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111297&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.1214[/C][C]0.1387[/C][C]0[/C][C]62.7202[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.1847[/C][C]0.1619[/C][C]0.1503[/C][C]82.0643[/C][C]72.3922[/C][C]8.5084[/C][/ROW]
[ROW][C]51[/C][C]0.2267[/C][C]0.1402[/C][C]0.147[/C][C]61.9314[/C][C]68.9053[/C][C]8.3009[/C][/ROW]
[ROW][C]52[/C][C]0.2804[/C][C]0.0716[/C][C]0.1281[/C][C]16.0851[/C][C]55.7002[/C][C]7.4633[/C][/ROW]
[ROW][C]53[/C][C]0.3181[/C][C]-0.2197[/C][C]0.1464[/C][C]146.5423[/C][C]73.8686[/C][C]8.5947[/C][/ROW]
[ROW][C]54[/C][C]0.3582[/C][C]-0.1469[/C][C]0.1465[/C][C]65.4654[/C][C]72.4681[/C][C]8.5128[/C][/ROW]
[ROW][C]55[/C][C]0.388[/C][C]-0.2748[/C][C]0.1648[/C][C]229.7537[/C][C]94.9375[/C][C]9.7436[/C][/ROW]
[ROW][C]56[/C][C]0.4233[/C][C]-0.4322[/C][C]0.1983[/C][C]556.6804[/C][C]152.6553[/C][C]12.3554[/C][/ROW]
[ROW][C]57[/C][C]0.4567[/C][C]-0.4998[/C][C]0.2318[/C][C]727.5558[/C][C]216.5332[/C][C]14.7151[/C][/ROW]
[ROW][C]58[/C][C]0.4847[/C][C]-0.5542[/C][C]0.264[/C][C]890.046[/C][C]283.8845[/C][C]16.8489[/C][/ROW]
[ROW][C]59[/C][C]0.5203[/C][C]-0.5647[/C][C]0.2913[/C][C]890.0242[/C][C]338.9881[/C][C]18.4116[/C][/ROW]
[ROW][C]60[/C][C]0.557[/C][C]-0.671[/C][C]0.323[/C][C]1202.6025[/C][C]410.9559[/C][C]20.272[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111297&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111297&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.12140.1387062.720200
500.18470.16190.150382.064372.39228.5084
510.22670.14020.14761.931468.90538.3009
520.28040.07160.128116.085155.70027.4633
530.3181-0.21970.1464146.542373.86868.5947
540.3582-0.14690.146565.465472.46818.5128
550.388-0.27480.1648229.753794.93759.7436
560.4233-0.43220.1983556.6804152.655312.3554
570.4567-0.49980.2318727.5558216.533214.7151
580.4847-0.55420.264890.046283.884516.8489
590.5203-0.56470.2913890.0242338.988118.4116
600.557-0.6710.3231202.6025410.955920.272



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