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, 18 Dec 2008 06:56:09 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Dec/18/t1229608646akgondf6hx4ngy5.htm/, Retrieved Sun, 12 May 2024 01:38:24 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34774, Retrieved Sun, 12 May 2024 01:38:24 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact155
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper - ARIMA For...] [2008-12-18 13:56:09] [c33ddd06d9ea3933c8ac89c0e74c9b3a] [Current]
Feedback Forum

Post a new message
Dataseries X:
357
363
364
363
358
357
357
380
378
376
380
379
384
392
394
392
396
392
396
419
421
420
418
410
418
426
428
430
424
423
427
441
449
452
462
455
461
461
463
462
456
455
456
472
472
471
465
459
465
468
467
463
460
462
461
476
476
471
453
443
442
444
438
427
424
416
406
431
434
418
412
404
409
412
406
398
397
385
390
413
413
401
397
397




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=34774&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=34774&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34774&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[72])
60443-------
61442-------
62444-------
63438-------
64427-------
65424-------
66416-------
67406-------
68431-------
69434-------
70418-------
71412-------
72404-------
73409405.537395.0894415.98460.2580.613500.6135
74412408.7397394.023423.45630.33210.486200.7361
75406405.4645387.4644423.46470.47680.23832e-040.5634
76398398.2027377.4318418.97370.49240.23090.00330.2922
77397395.0151371.8017418.22840.43350.40050.00720.224
78385389.6765364.2543415.09860.35920.28620.02120.1347
79390383.9873356.5334411.44110.33390.47120.0580.0765
80413406.7007377.3555436.04580.3370.86770.05230.5716
81413408.9452377.8234440.0670.39920.39920.05730.6223
82401398.5223365.72431.32460.44120.19350.12220.3717
83397394.2889359.8881428.68980.43860.35110.15650.29
84397387.2332351.3048423.16150.29710.29710.18020.1802

\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[72]) \tabularnewline
60 & 443 & - & - & - & - & - & - & - \tabularnewline
61 & 442 & - & - & - & - & - & - & - \tabularnewline
62 & 444 & - & - & - & - & - & - & - \tabularnewline
63 & 438 & - & - & - & - & - & - & - \tabularnewline
64 & 427 & - & - & - & - & - & - & - \tabularnewline
65 & 424 & - & - & - & - & - & - & - \tabularnewline
66 & 416 & - & - & - & - & - & - & - \tabularnewline
67 & 406 & - & - & - & - & - & - & - \tabularnewline
68 & 431 & - & - & - & - & - & - & - \tabularnewline
69 & 434 & - & - & - & - & - & - & - \tabularnewline
70 & 418 & - & - & - & - & - & - & - \tabularnewline
71 & 412 & - & - & - & - & - & - & - \tabularnewline
72 & 404 & - & - & - & - & - & - & - \tabularnewline
73 & 409 & 405.537 & 395.0894 & 415.9846 & 0.258 & 0.6135 & 0 & 0.6135 \tabularnewline
74 & 412 & 408.7397 & 394.023 & 423.4563 & 0.3321 & 0.4862 & 0 & 0.7361 \tabularnewline
75 & 406 & 405.4645 & 387.4644 & 423.4647 & 0.4768 & 0.2383 & 2e-04 & 0.5634 \tabularnewline
76 & 398 & 398.2027 & 377.4318 & 418.9737 & 0.4924 & 0.2309 & 0.0033 & 0.2922 \tabularnewline
77 & 397 & 395.0151 & 371.8017 & 418.2284 & 0.4335 & 0.4005 & 0.0072 & 0.224 \tabularnewline
78 & 385 & 389.6765 & 364.2543 & 415.0986 & 0.3592 & 0.2862 & 0.0212 & 0.1347 \tabularnewline
79 & 390 & 383.9873 & 356.5334 & 411.4411 & 0.3339 & 0.4712 & 0.058 & 0.0765 \tabularnewline
80 & 413 & 406.7007 & 377.3555 & 436.0458 & 0.337 & 0.8677 & 0.0523 & 0.5716 \tabularnewline
81 & 413 & 408.9452 & 377.8234 & 440.067 & 0.3992 & 0.3992 & 0.0573 & 0.6223 \tabularnewline
82 & 401 & 398.5223 & 365.72 & 431.3246 & 0.4412 & 0.1935 & 0.1222 & 0.3717 \tabularnewline
83 & 397 & 394.2889 & 359.8881 & 428.6898 & 0.4386 & 0.3511 & 0.1565 & 0.29 \tabularnewline
84 & 397 & 387.2332 & 351.3048 & 423.1615 & 0.2971 & 0.2971 & 0.1802 & 0.1802 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34774&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[72])[/C][/ROW]
[ROW][C]60[/C][C]443[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]442[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]444[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]438[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]427[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]424[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]416[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]406[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]431[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]434[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]418[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]412[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]404[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]409[/C][C]405.537[/C][C]395.0894[/C][C]415.9846[/C][C]0.258[/C][C]0.6135[/C][C]0[/C][C]0.6135[/C][/ROW]
[ROW][C]74[/C][C]412[/C][C]408.7397[/C][C]394.023[/C][C]423.4563[/C][C]0.3321[/C][C]0.4862[/C][C]0[/C][C]0.7361[/C][/ROW]
[ROW][C]75[/C][C]406[/C][C]405.4645[/C][C]387.4644[/C][C]423.4647[/C][C]0.4768[/C][C]0.2383[/C][C]2e-04[/C][C]0.5634[/C][/ROW]
[ROW][C]76[/C][C]398[/C][C]398.2027[/C][C]377.4318[/C][C]418.9737[/C][C]0.4924[/C][C]0.2309[/C][C]0.0033[/C][C]0.2922[/C][/ROW]
[ROW][C]77[/C][C]397[/C][C]395.0151[/C][C]371.8017[/C][C]418.2284[/C][C]0.4335[/C][C]0.4005[/C][C]0.0072[/C][C]0.224[/C][/ROW]
[ROW][C]78[/C][C]385[/C][C]389.6765[/C][C]364.2543[/C][C]415.0986[/C][C]0.3592[/C][C]0.2862[/C][C]0.0212[/C][C]0.1347[/C][/ROW]
[ROW][C]79[/C][C]390[/C][C]383.9873[/C][C]356.5334[/C][C]411.4411[/C][C]0.3339[/C][C]0.4712[/C][C]0.058[/C][C]0.0765[/C][/ROW]
[ROW][C]80[/C][C]413[/C][C]406.7007[/C][C]377.3555[/C][C]436.0458[/C][C]0.337[/C][C]0.8677[/C][C]0.0523[/C][C]0.5716[/C][/ROW]
[ROW][C]81[/C][C]413[/C][C]408.9452[/C][C]377.8234[/C][C]440.067[/C][C]0.3992[/C][C]0.3992[/C][C]0.0573[/C][C]0.6223[/C][/ROW]
[ROW][C]82[/C][C]401[/C][C]398.5223[/C][C]365.72[/C][C]431.3246[/C][C]0.4412[/C][C]0.1935[/C][C]0.1222[/C][C]0.3717[/C][/ROW]
[ROW][C]83[/C][C]397[/C][C]394.2889[/C][C]359.8881[/C][C]428.6898[/C][C]0.4386[/C][C]0.3511[/C][C]0.1565[/C][C]0.29[/C][/ROW]
[ROW][C]84[/C][C]397[/C][C]387.2332[/C][C]351.3048[/C][C]423.1615[/C][C]0.2971[/C][C]0.2971[/C][C]0.1802[/C][C]0.1802[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34774&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34774&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[72])
60443-------
61442-------
62444-------
63438-------
64427-------
65424-------
66416-------
67406-------
68431-------
69434-------
70418-------
71412-------
72404-------
73409405.537395.0894415.98460.2580.613500.6135
74412408.7397394.023423.45630.33210.486200.7361
75406405.4645387.4644423.46470.47680.23832e-040.5634
76398398.2027377.4318418.97370.49240.23090.00330.2922
77397395.0151371.8017418.22840.43350.40050.00720.224
78385389.6765364.2543415.09860.35920.28620.02120.1347
79390383.9873356.5334411.44110.33390.47120.0580.0765
80413406.7007377.3555436.04580.3370.86770.05230.5716
81413408.9452377.8234440.0670.39920.39920.05730.6223
82401398.5223365.72431.32460.44120.19350.12220.3717
83397394.2889359.8881428.68980.43860.35110.15650.29
84397387.2332351.3048423.16150.29710.29710.18020.1802







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.01310.00857e-0411.99250.99940.9997
740.01840.0087e-0410.62980.88580.9412
750.02260.00131e-040.28670.02390.1546
760.0266-5e-0400.04110.00340.0585
770.030.0054e-043.93990.32830.573
780.0333-0.0120.00121.86941.82251.35
790.03650.01570.001336.15313.01281.7357
800.03680.01550.001339.68163.30681.8185
810.03880.00998e-0416.44151.37011.1705
820.0420.00625e-046.13890.51160.7152
830.04450.00696e-047.34990.61250.7826
840.04730.02520.002195.3917.94932.8194

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.0131 & 0.0085 & 7e-04 & 11.9925 & 0.9994 & 0.9997 \tabularnewline
74 & 0.0184 & 0.008 & 7e-04 & 10.6298 & 0.8858 & 0.9412 \tabularnewline
75 & 0.0226 & 0.0013 & 1e-04 & 0.2867 & 0.0239 & 0.1546 \tabularnewline
76 & 0.0266 & -5e-04 & 0 & 0.0411 & 0.0034 & 0.0585 \tabularnewline
77 & 0.03 & 0.005 & 4e-04 & 3.9399 & 0.3283 & 0.573 \tabularnewline
78 & 0.0333 & -0.012 & 0.001 & 21.8694 & 1.8225 & 1.35 \tabularnewline
79 & 0.0365 & 0.0157 & 0.0013 & 36.1531 & 3.0128 & 1.7357 \tabularnewline
80 & 0.0368 & 0.0155 & 0.0013 & 39.6816 & 3.3068 & 1.8185 \tabularnewline
81 & 0.0388 & 0.0099 & 8e-04 & 16.4415 & 1.3701 & 1.1705 \tabularnewline
82 & 0.042 & 0.0062 & 5e-04 & 6.1389 & 0.5116 & 0.7152 \tabularnewline
83 & 0.0445 & 0.0069 & 6e-04 & 7.3499 & 0.6125 & 0.7826 \tabularnewline
84 & 0.0473 & 0.0252 & 0.0021 & 95.391 & 7.9493 & 2.8194 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34774&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]73[/C][C]0.0131[/C][C]0.0085[/C][C]7e-04[/C][C]11.9925[/C][C]0.9994[/C][C]0.9997[/C][/ROW]
[ROW][C]74[/C][C]0.0184[/C][C]0.008[/C][C]7e-04[/C][C]10.6298[/C][C]0.8858[/C][C]0.9412[/C][/ROW]
[ROW][C]75[/C][C]0.0226[/C][C]0.0013[/C][C]1e-04[/C][C]0.2867[/C][C]0.0239[/C][C]0.1546[/C][/ROW]
[ROW][C]76[/C][C]0.0266[/C][C]-5e-04[/C][C]0[/C][C]0.0411[/C][C]0.0034[/C][C]0.0585[/C][/ROW]
[ROW][C]77[/C][C]0.03[/C][C]0.005[/C][C]4e-04[/C][C]3.9399[/C][C]0.3283[/C][C]0.573[/C][/ROW]
[ROW][C]78[/C][C]0.0333[/C][C]-0.012[/C][C]0.001[/C][C]21.8694[/C][C]1.8225[/C][C]1.35[/C][/ROW]
[ROW][C]79[/C][C]0.0365[/C][C]0.0157[/C][C]0.0013[/C][C]36.1531[/C][C]3.0128[/C][C]1.7357[/C][/ROW]
[ROW][C]80[/C][C]0.0368[/C][C]0.0155[/C][C]0.0013[/C][C]39.6816[/C][C]3.3068[/C][C]1.8185[/C][/ROW]
[ROW][C]81[/C][C]0.0388[/C][C]0.0099[/C][C]8e-04[/C][C]16.4415[/C][C]1.3701[/C][C]1.1705[/C][/ROW]
[ROW][C]82[/C][C]0.042[/C][C]0.0062[/C][C]5e-04[/C][C]6.1389[/C][C]0.5116[/C][C]0.7152[/C][/ROW]
[ROW][C]83[/C][C]0.0445[/C][C]0.0069[/C][C]6e-04[/C][C]7.3499[/C][C]0.6125[/C][C]0.7826[/C][/ROW]
[ROW][C]84[/C][C]0.0473[/C][C]0.0252[/C][C]0.0021[/C][C]95.391[/C][C]7.9493[/C][C]2.8194[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34774&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34774&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
730.01310.00857e-0411.99250.99940.9997
740.01840.0087e-0410.62980.88580.9412
750.02260.00131e-040.28670.02390.1546
760.0266-5e-0400.04110.00340.0585
770.030.0054e-043.93990.32830.573
780.0333-0.0120.00121.86941.82251.35
790.03650.01570.001336.15313.01281.7357
800.03680.01550.001339.68163.30681.8185
810.03880.00998e-0416.44151.37011.1705
820.0420.00625e-046.13890.51160.7152
830.04450.00696e-047.34990.61250.7826
840.04730.02520.002195.3917.94932.8194



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