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 22:52:19 +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/t1293576708vwntfvejx5q7qaj.htm/, Retrieved Sun, 05 May 2024 01:19:57 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116574, Retrieved Sun, 05 May 2024 01:19:57 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact119
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper ARIMA forecast] [2010-12-28 22:52:19] [a2e464febd5f86100a78930292e787b9] [Current]
Feedback Forum

Post a new message
Dataseries X:
1203
1319
1328
1260
1286
1274
1389
1255
1244
1336
1214
1239
1174
1061
1116
1123
1086
1074
965
1035
1016
941
1003
998
891
828
833
887
842
793
778
699
686
727
641
619
627
593
535
536
504
487
477
435
433
393
389
377
339
370
350
341
367
396
408
405
391
396
368
356




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116574&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 time3 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[48])
36619-------
37627-------
38593-------
39535-------
40536-------
41504-------
42487-------
43477-------
44435-------
45433-------
46393-------
47389-------
48377-------
49339346.3723248.8552443.88940.44110.269100.2691
50370330.3863218.8178441.95480.24320.439900.2064
51350315.8218196.8245434.81910.28670.18612e-040.1568
52341293.9354150.8564437.01440.25960.22125e-040.1276
53367275.9038114.5226437.28510.13430.21460.00280.1098
54396259.772384.325435.21950.0640.11550.00560.0952
55408241.229246.6751435.78320.04650.05950.00880.0857
56405223.584810.0198437.14980.0480.04530.02620.0796
57391207.0849-23.904438.07390.05930.04650.02760.0747
58396189.9937-59.9476439.9350.05310.05750.05570.0713
59368173.1429-96.2912442.57690.07820.05250.05820.069
60356156.9038-131.6499445.45740.08810.07580.06750.0675

\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 & 619 & - & - & - & - & - & - & - \tabularnewline
37 & 627 & - & - & - & - & - & - & - \tabularnewline
38 & 593 & - & - & - & - & - & - & - \tabularnewline
39 & 535 & - & - & - & - & - & - & - \tabularnewline
40 & 536 & - & - & - & - & - & - & - \tabularnewline
41 & 504 & - & - & - & - & - & - & - \tabularnewline
42 & 487 & - & - & - & - & - & - & - \tabularnewline
43 & 477 & - & - & - & - & - & - & - \tabularnewline
44 & 435 & - & - & - & - & - & - & - \tabularnewline
45 & 433 & - & - & - & - & - & - & - \tabularnewline
46 & 393 & - & - & - & - & - & - & - \tabularnewline
47 & 389 & - & - & - & - & - & - & - \tabularnewline
48 & 377 & - & - & - & - & - & - & - \tabularnewline
49 & 339 & 346.3723 & 248.8552 & 443.8894 & 0.4411 & 0.2691 & 0 & 0.2691 \tabularnewline
50 & 370 & 330.3863 & 218.8178 & 441.9548 & 0.2432 & 0.4399 & 0 & 0.2064 \tabularnewline
51 & 350 & 315.8218 & 196.8245 & 434.8191 & 0.2867 & 0.1861 & 2e-04 & 0.1568 \tabularnewline
52 & 341 & 293.9354 & 150.8564 & 437.0144 & 0.2596 & 0.2212 & 5e-04 & 0.1276 \tabularnewline
53 & 367 & 275.9038 & 114.5226 & 437.2851 & 0.1343 & 0.2146 & 0.0028 & 0.1098 \tabularnewline
54 & 396 & 259.7723 & 84.325 & 435.2195 & 0.064 & 0.1155 & 0.0056 & 0.0952 \tabularnewline
55 & 408 & 241.2292 & 46.6751 & 435.7832 & 0.0465 & 0.0595 & 0.0088 & 0.0857 \tabularnewline
56 & 405 & 223.5848 & 10.0198 & 437.1498 & 0.048 & 0.0453 & 0.0262 & 0.0796 \tabularnewline
57 & 391 & 207.0849 & -23.904 & 438.0739 & 0.0593 & 0.0465 & 0.0276 & 0.0747 \tabularnewline
58 & 396 & 189.9937 & -59.9476 & 439.935 & 0.0531 & 0.0575 & 0.0557 & 0.0713 \tabularnewline
59 & 368 & 173.1429 & -96.2912 & 442.5769 & 0.0782 & 0.0525 & 0.0582 & 0.069 \tabularnewline
60 & 356 & 156.9038 & -131.6499 & 445.4574 & 0.0881 & 0.0758 & 0.0675 & 0.0675 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116574&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]619[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]627[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]593[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]535[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]536[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]504[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]487[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]477[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]435[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]433[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]393[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]389[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]377[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]339[/C][C]346.3723[/C][C]248.8552[/C][C]443.8894[/C][C]0.4411[/C][C]0.2691[/C][C]0[/C][C]0.2691[/C][/ROW]
[ROW][C]50[/C][C]370[/C][C]330.3863[/C][C]218.8178[/C][C]441.9548[/C][C]0.2432[/C][C]0.4399[/C][C]0[/C][C]0.2064[/C][/ROW]
[ROW][C]51[/C][C]350[/C][C]315.8218[/C][C]196.8245[/C][C]434.8191[/C][C]0.2867[/C][C]0.1861[/C][C]2e-04[/C][C]0.1568[/C][/ROW]
[ROW][C]52[/C][C]341[/C][C]293.9354[/C][C]150.8564[/C][C]437.0144[/C][C]0.2596[/C][C]0.2212[/C][C]5e-04[/C][C]0.1276[/C][/ROW]
[ROW][C]53[/C][C]367[/C][C]275.9038[/C][C]114.5226[/C][C]437.2851[/C][C]0.1343[/C][C]0.2146[/C][C]0.0028[/C][C]0.1098[/C][/ROW]
[ROW][C]54[/C][C]396[/C][C]259.7723[/C][C]84.325[/C][C]435.2195[/C][C]0.064[/C][C]0.1155[/C][C]0.0056[/C][C]0.0952[/C][/ROW]
[ROW][C]55[/C][C]408[/C][C]241.2292[/C][C]46.6751[/C][C]435.7832[/C][C]0.0465[/C][C]0.0595[/C][C]0.0088[/C][C]0.0857[/C][/ROW]
[ROW][C]56[/C][C]405[/C][C]223.5848[/C][C]10.0198[/C][C]437.1498[/C][C]0.048[/C][C]0.0453[/C][C]0.0262[/C][C]0.0796[/C][/ROW]
[ROW][C]57[/C][C]391[/C][C]207.0849[/C][C]-23.904[/C][C]438.0739[/C][C]0.0593[/C][C]0.0465[/C][C]0.0276[/C][C]0.0747[/C][/ROW]
[ROW][C]58[/C][C]396[/C][C]189.9937[/C][C]-59.9476[/C][C]439.935[/C][C]0.0531[/C][C]0.0575[/C][C]0.0557[/C][C]0.0713[/C][/ROW]
[ROW][C]59[/C][C]368[/C][C]173.1429[/C][C]-96.2912[/C][C]442.5769[/C][C]0.0782[/C][C]0.0525[/C][C]0.0582[/C][C]0.069[/C][/ROW]
[ROW][C]60[/C][C]356[/C][C]156.9038[/C][C]-131.6499[/C][C]445.4574[/C][C]0.0881[/C][C]0.0758[/C][C]0.0675[/C][C]0.0675[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116574&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116574&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])
36619-------
37627-------
38593-------
39535-------
40536-------
41504-------
42487-------
43477-------
44435-------
45433-------
46393-------
47389-------
48377-------
49339346.3723248.8552443.88940.44110.269100.2691
50370330.3863218.8178441.95480.24320.439900.2064
51350315.8218196.8245434.81910.28670.18612e-040.1568
52341293.9354150.8564437.01440.25960.22125e-040.1276
53367275.9038114.5226437.28510.13430.21460.00280.1098
54396259.772384.325435.21950.0640.11550.00560.0952
55408241.229246.6751435.78320.04650.05950.00880.0857
56405223.584810.0198437.14980.0480.04530.02620.0796
57391207.0849-23.904438.07390.05930.04650.02760.0747
58396189.9937-59.9476439.9350.05310.05750.05570.0713
59368173.1429-96.2912442.57690.07820.05250.05820.069
60356156.9038-131.6499445.45740.08810.07580.06750.0675







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.1436-0.0213054.350800
500.17230.11990.07061569.2425811.796628.492
510.19220.10820.08311168.1517930.581730.5054
520.24840.16010.10242215.07341251.704635.3794
530.29840.33020.14798298.51132661.065951.5855
540.34460.52440.210718557.99615310.554372.8736
550.41150.69130.279327812.50818525.119192.3316
560.48730.81140.345932911.470911573.4131107.5798
570.56910.88810.406133824.75314045.7842118.5149
580.67121.08430.473942438.593816885.0652129.9425
590.79391.12540.533137969.302718801.814137.1197
600.93831.26890.594539639.316120538.2725143.3118

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.1436 & -0.0213 & 0 & 54.3508 & 0 & 0 \tabularnewline
50 & 0.1723 & 0.1199 & 0.0706 & 1569.2425 & 811.7966 & 28.492 \tabularnewline
51 & 0.1922 & 0.1082 & 0.0831 & 1168.1517 & 930.5817 & 30.5054 \tabularnewline
52 & 0.2484 & 0.1601 & 0.1024 & 2215.0734 & 1251.7046 & 35.3794 \tabularnewline
53 & 0.2984 & 0.3302 & 0.1479 & 8298.5113 & 2661.0659 & 51.5855 \tabularnewline
54 & 0.3446 & 0.5244 & 0.2107 & 18557.9961 & 5310.5543 & 72.8736 \tabularnewline
55 & 0.4115 & 0.6913 & 0.2793 & 27812.5081 & 8525.1191 & 92.3316 \tabularnewline
56 & 0.4873 & 0.8114 & 0.3459 & 32911.4709 & 11573.4131 & 107.5798 \tabularnewline
57 & 0.5691 & 0.8881 & 0.4061 & 33824.753 & 14045.7842 & 118.5149 \tabularnewline
58 & 0.6712 & 1.0843 & 0.4739 & 42438.5938 & 16885.0652 & 129.9425 \tabularnewline
59 & 0.7939 & 1.1254 & 0.5331 & 37969.3027 & 18801.814 & 137.1197 \tabularnewline
60 & 0.9383 & 1.2689 & 0.5945 & 39639.3161 & 20538.2725 & 143.3118 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116574&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.1436[/C][C]-0.0213[/C][C]0[/C][C]54.3508[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.1723[/C][C]0.1199[/C][C]0.0706[/C][C]1569.2425[/C][C]811.7966[/C][C]28.492[/C][/ROW]
[ROW][C]51[/C][C]0.1922[/C][C]0.1082[/C][C]0.0831[/C][C]1168.1517[/C][C]930.5817[/C][C]30.5054[/C][/ROW]
[ROW][C]52[/C][C]0.2484[/C][C]0.1601[/C][C]0.1024[/C][C]2215.0734[/C][C]1251.7046[/C][C]35.3794[/C][/ROW]
[ROW][C]53[/C][C]0.2984[/C][C]0.3302[/C][C]0.1479[/C][C]8298.5113[/C][C]2661.0659[/C][C]51.5855[/C][/ROW]
[ROW][C]54[/C][C]0.3446[/C][C]0.5244[/C][C]0.2107[/C][C]18557.9961[/C][C]5310.5543[/C][C]72.8736[/C][/ROW]
[ROW][C]55[/C][C]0.4115[/C][C]0.6913[/C][C]0.2793[/C][C]27812.5081[/C][C]8525.1191[/C][C]92.3316[/C][/ROW]
[ROW][C]56[/C][C]0.4873[/C][C]0.8114[/C][C]0.3459[/C][C]32911.4709[/C][C]11573.4131[/C][C]107.5798[/C][/ROW]
[ROW][C]57[/C][C]0.5691[/C][C]0.8881[/C][C]0.4061[/C][C]33824.753[/C][C]14045.7842[/C][C]118.5149[/C][/ROW]
[ROW][C]58[/C][C]0.6712[/C][C]1.0843[/C][C]0.4739[/C][C]42438.5938[/C][C]16885.0652[/C][C]129.9425[/C][/ROW]
[ROW][C]59[/C][C]0.7939[/C][C]1.1254[/C][C]0.5331[/C][C]37969.3027[/C][C]18801.814[/C][C]137.1197[/C][/ROW]
[ROW][C]60[/C][C]0.9383[/C][C]1.2689[/C][C]0.5945[/C][C]39639.3161[/C][C]20538.2725[/C][C]143.3118[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116574&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116574&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.1436-0.0213054.350800
500.17230.11990.07061569.2425811.796628.492
510.19220.10820.08311168.1517930.581730.5054
520.24840.16010.10242215.07341251.704635.3794
530.29840.33020.14798298.51132661.065951.5855
540.34460.52440.210718557.99615310.554372.8736
550.41150.69130.279327812.50818525.119192.3316
560.48730.81140.345932911.470911573.4131107.5798
570.56910.88810.406133824.75314045.7842118.5149
580.67121.08430.473942438.593816885.0652129.9425
590.79391.12540.533137969.302718801.814137.1197
600.93831.26890.594539639.316120538.2725143.3118



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