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, 22 Dec 2010 15:24:17 +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/22/t1293031415bv8fureiyhhirh7.htm/, Retrieved Mon, 06 May 2024 05:53:18 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114303, Retrieved Mon, 06 May 2024 05:53:18 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact171
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [s 0650692 paper] [2008-01-15 17:46:23] [d530bc48164a192180949b2df4f47d02]
-  M D    [ARIMA Forecasting] [Arima forecasting] [2010-12-22 15:24:17] [7cc6e89f95359dcad314da35cb7f084f] [Current]
Feedback Forum

Post a new message
Dataseries X:
300
302
400
392
373
379
303
324
353
392
327
376
329
359
413
338
422
390
370
367
406
418
346
350
330
318
382
337
372
422
428
426
396
458
315
337
386
352
383
439
397
453
363
365
474
373
403
384
364
361
419
352
363
410
361
383
342
369
361
317
386
318
407
393
404
498
438




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114303&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'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[55])
43363-------
44365-------
45474-------
46373-------
47403-------
48384-------
49364-------
50361-------
51419-------
52352-------
53363-------
54410-------
55361-------
56383363.4792268.909458.04940.34290.52050.48740.5205
57342383.9576250.2151517.70.26930.50560.09350.6317
58369385.4653221.665549.26570.42190.69850.55930.6151
59361350.8761161.7358540.01650.45820.42550.29450.4582
60317358.5757147.1104570.0410.350.4910.40690.491
61386353.3501121.7014584.99880.39120.62080.46410.4742
62318351.2264101.2763601.17640.39720.39250.46950.4695
63407388.2823121.2824655.28220.44540.6970.41080.5794
64393371.368788.3442654.39330.44050.40250.55340.5286
65404379.704881.5156677.8940.43660.46520.54370.5489
66498395.292882.6736707.91190.25980.47820.46330.5851
67438367.391340.9795693.80310.33580.21640.51530.5153

\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[55]) \tabularnewline
43 & 363 & - & - & - & - & - & - & - \tabularnewline
44 & 365 & - & - & - & - & - & - & - \tabularnewline
45 & 474 & - & - & - & - & - & - & - \tabularnewline
46 & 373 & - & - & - & - & - & - & - \tabularnewline
47 & 403 & - & - & - & - & - & - & - \tabularnewline
48 & 384 & - & - & - & - & - & - & - \tabularnewline
49 & 364 & - & - & - & - & - & - & - \tabularnewline
50 & 361 & - & - & - & - & - & - & - \tabularnewline
51 & 419 & - & - & - & - & - & - & - \tabularnewline
52 & 352 & - & - & - & - & - & - & - \tabularnewline
53 & 363 & - & - & - & - & - & - & - \tabularnewline
54 & 410 & - & - & - & - & - & - & - \tabularnewline
55 & 361 & - & - & - & - & - & - & - \tabularnewline
56 & 383 & 363.4792 & 268.909 & 458.0494 & 0.3429 & 0.5205 & 0.4874 & 0.5205 \tabularnewline
57 & 342 & 383.9576 & 250.2151 & 517.7 & 0.2693 & 0.5056 & 0.0935 & 0.6317 \tabularnewline
58 & 369 & 385.4653 & 221.665 & 549.2657 & 0.4219 & 0.6985 & 0.5593 & 0.6151 \tabularnewline
59 & 361 & 350.8761 & 161.7358 & 540.0165 & 0.4582 & 0.4255 & 0.2945 & 0.4582 \tabularnewline
60 & 317 & 358.5757 & 147.1104 & 570.041 & 0.35 & 0.491 & 0.4069 & 0.491 \tabularnewline
61 & 386 & 353.3501 & 121.7014 & 584.9988 & 0.3912 & 0.6208 & 0.4641 & 0.4742 \tabularnewline
62 & 318 & 351.2264 & 101.2763 & 601.1764 & 0.3972 & 0.3925 & 0.4695 & 0.4695 \tabularnewline
63 & 407 & 388.2823 & 121.2824 & 655.2822 & 0.4454 & 0.697 & 0.4108 & 0.5794 \tabularnewline
64 & 393 & 371.3687 & 88.3442 & 654.3933 & 0.4405 & 0.4025 & 0.5534 & 0.5286 \tabularnewline
65 & 404 & 379.7048 & 81.5156 & 677.894 & 0.4366 & 0.4652 & 0.5437 & 0.5489 \tabularnewline
66 & 498 & 395.2928 & 82.6736 & 707.9119 & 0.2598 & 0.4782 & 0.4633 & 0.5851 \tabularnewline
67 & 438 & 367.3913 & 40.9795 & 693.8031 & 0.3358 & 0.2164 & 0.5153 & 0.5153 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114303&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[55])[/C][/ROW]
[ROW][C]43[/C][C]363[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]365[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]474[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]373[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]403[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]384[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]364[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]361[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]419[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]352[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]363[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]410[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]361[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]383[/C][C]363.4792[/C][C]268.909[/C][C]458.0494[/C][C]0.3429[/C][C]0.5205[/C][C]0.4874[/C][C]0.5205[/C][/ROW]
[ROW][C]57[/C][C]342[/C][C]383.9576[/C][C]250.2151[/C][C]517.7[/C][C]0.2693[/C][C]0.5056[/C][C]0.0935[/C][C]0.6317[/C][/ROW]
[ROW][C]58[/C][C]369[/C][C]385.4653[/C][C]221.665[/C][C]549.2657[/C][C]0.4219[/C][C]0.6985[/C][C]0.5593[/C][C]0.6151[/C][/ROW]
[ROW][C]59[/C][C]361[/C][C]350.8761[/C][C]161.7358[/C][C]540.0165[/C][C]0.4582[/C][C]0.4255[/C][C]0.2945[/C][C]0.4582[/C][/ROW]
[ROW][C]60[/C][C]317[/C][C]358.5757[/C][C]147.1104[/C][C]570.041[/C][C]0.35[/C][C]0.491[/C][C]0.4069[/C][C]0.491[/C][/ROW]
[ROW][C]61[/C][C]386[/C][C]353.3501[/C][C]121.7014[/C][C]584.9988[/C][C]0.3912[/C][C]0.6208[/C][C]0.4641[/C][C]0.4742[/C][/ROW]
[ROW][C]62[/C][C]318[/C][C]351.2264[/C][C]101.2763[/C][C]601.1764[/C][C]0.3972[/C][C]0.3925[/C][C]0.4695[/C][C]0.4695[/C][/ROW]
[ROW][C]63[/C][C]407[/C][C]388.2823[/C][C]121.2824[/C][C]655.2822[/C][C]0.4454[/C][C]0.697[/C][C]0.4108[/C][C]0.5794[/C][/ROW]
[ROW][C]64[/C][C]393[/C][C]371.3687[/C][C]88.3442[/C][C]654.3933[/C][C]0.4405[/C][C]0.4025[/C][C]0.5534[/C][C]0.5286[/C][/ROW]
[ROW][C]65[/C][C]404[/C][C]379.7048[/C][C]81.5156[/C][C]677.894[/C][C]0.4366[/C][C]0.4652[/C][C]0.5437[/C][C]0.5489[/C][/ROW]
[ROW][C]66[/C][C]498[/C][C]395.2928[/C][C]82.6736[/C][C]707.9119[/C][C]0.2598[/C][C]0.4782[/C][C]0.4633[/C][C]0.5851[/C][/ROW]
[ROW][C]67[/C][C]438[/C][C]367.3913[/C][C]40.9795[/C][C]693.8031[/C][C]0.3358[/C][C]0.2164[/C][C]0.5153[/C][C]0.5153[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114303&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114303&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[55])
43363-------
44365-------
45474-------
46373-------
47403-------
48384-------
49364-------
50361-------
51419-------
52352-------
53363-------
54410-------
55361-------
56383363.4792268.909458.04940.34290.52050.48740.5205
57342383.9576250.2151517.70.26930.50560.09350.6317
58369385.4653221.665549.26570.42190.69850.55930.6151
59361350.8761161.7358540.01650.45820.42550.29450.4582
60317358.5757147.1104570.0410.350.4910.40690.491
61386353.3501121.7014584.99880.39120.62080.46410.4742
62318351.2264101.2763601.17640.39720.39250.46950.4695
63407388.2823121.2824655.28220.44540.6970.41080.5794
64393371.368788.3442654.39330.44050.40250.55340.5286
65404379.704881.5156677.8940.43660.46520.54370.5489
66498395.292882.6736707.91190.25980.47820.46330.5851
67438367.391340.9795693.80310.33580.21640.51530.5153







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
560.13270.05370.0045381.061331.75515.6352
570.1777-0.10930.00911760.437146.703112.1121
580.2168-0.04270.0036271.107522.59234.7531
590.2750.02890.0024102.49268.5412.9225
600.3009-0.11590.00971728.5376144.044812.0019
610.33450.09240.00771066.016988.83479.4252
620.3631-0.09460.00791103.991491.99939.5916
630.35080.04820.004350.350929.19595.4033
640.38880.05820.0049467.911238.99266.2444
650.40070.0640.0053590.254549.18797.0134
660.40350.25980.021710548.7721879.064329.649
670.45330.19220.0164985.5861415.465520.383

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
56 & 0.1327 & 0.0537 & 0.0045 & 381.0613 & 31.7551 & 5.6352 \tabularnewline
57 & 0.1777 & -0.1093 & 0.0091 & 1760.437 & 146.7031 & 12.1121 \tabularnewline
58 & 0.2168 & -0.0427 & 0.0036 & 271.1075 & 22.5923 & 4.7531 \tabularnewline
59 & 0.275 & 0.0289 & 0.0024 & 102.4926 & 8.541 & 2.9225 \tabularnewline
60 & 0.3009 & -0.1159 & 0.0097 & 1728.5376 & 144.0448 & 12.0019 \tabularnewline
61 & 0.3345 & 0.0924 & 0.0077 & 1066.0169 & 88.8347 & 9.4252 \tabularnewline
62 & 0.3631 & -0.0946 & 0.0079 & 1103.9914 & 91.9993 & 9.5916 \tabularnewline
63 & 0.3508 & 0.0482 & 0.004 & 350.3509 & 29.1959 & 5.4033 \tabularnewline
64 & 0.3888 & 0.0582 & 0.0049 & 467.9112 & 38.9926 & 6.2444 \tabularnewline
65 & 0.4007 & 0.064 & 0.0053 & 590.2545 & 49.1879 & 7.0134 \tabularnewline
66 & 0.4035 & 0.2598 & 0.0217 & 10548.7721 & 879.0643 & 29.649 \tabularnewline
67 & 0.4533 & 0.1922 & 0.016 & 4985.5861 & 415.4655 & 20.383 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114303&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]56[/C][C]0.1327[/C][C]0.0537[/C][C]0.0045[/C][C]381.0613[/C][C]31.7551[/C][C]5.6352[/C][/ROW]
[ROW][C]57[/C][C]0.1777[/C][C]-0.1093[/C][C]0.0091[/C][C]1760.437[/C][C]146.7031[/C][C]12.1121[/C][/ROW]
[ROW][C]58[/C][C]0.2168[/C][C]-0.0427[/C][C]0.0036[/C][C]271.1075[/C][C]22.5923[/C][C]4.7531[/C][/ROW]
[ROW][C]59[/C][C]0.275[/C][C]0.0289[/C][C]0.0024[/C][C]102.4926[/C][C]8.541[/C][C]2.9225[/C][/ROW]
[ROW][C]60[/C][C]0.3009[/C][C]-0.1159[/C][C]0.0097[/C][C]1728.5376[/C][C]144.0448[/C][C]12.0019[/C][/ROW]
[ROW][C]61[/C][C]0.3345[/C][C]0.0924[/C][C]0.0077[/C][C]1066.0169[/C][C]88.8347[/C][C]9.4252[/C][/ROW]
[ROW][C]62[/C][C]0.3631[/C][C]-0.0946[/C][C]0.0079[/C][C]1103.9914[/C][C]91.9993[/C][C]9.5916[/C][/ROW]
[ROW][C]63[/C][C]0.3508[/C][C]0.0482[/C][C]0.004[/C][C]350.3509[/C][C]29.1959[/C][C]5.4033[/C][/ROW]
[ROW][C]64[/C][C]0.3888[/C][C]0.0582[/C][C]0.0049[/C][C]467.9112[/C][C]38.9926[/C][C]6.2444[/C][/ROW]
[ROW][C]65[/C][C]0.4007[/C][C]0.064[/C][C]0.0053[/C][C]590.2545[/C][C]49.1879[/C][C]7.0134[/C][/ROW]
[ROW][C]66[/C][C]0.4035[/C][C]0.2598[/C][C]0.0217[/C][C]10548.7721[/C][C]879.0643[/C][C]29.649[/C][/ROW]
[ROW][C]67[/C][C]0.4533[/C][C]0.1922[/C][C]0.016[/C][C]4985.5861[/C][C]415.4655[/C][C]20.383[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114303&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114303&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
560.13270.05370.0045381.061331.75515.6352
570.1777-0.10930.00911760.437146.703112.1121
580.2168-0.04270.0036271.107522.59234.7531
590.2750.02890.0024102.49268.5412.9225
600.3009-0.11590.00971728.5376144.044812.0019
610.33450.09240.00771066.016988.83479.4252
620.3631-0.09460.00791103.991491.99939.5916
630.35080.04820.004350.350929.19595.4033
640.38880.05820.0049467.911238.99266.2444
650.40070.0640.0053590.254549.18797.0134
660.40350.25980.021710548.7721879.064329.649
670.45330.19220.0164985.5861415.465520.383



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 1 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; 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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')