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, 29 Dec 2010 13:41:22 +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/29/t1293629945i2gyzoel276m28y.htm/, Retrieved Fri, 03 May 2024 04:35:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116825, Retrieved Fri, 03 May 2024 04:35:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact143
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Variance Reduction Matrix] [] [2010-12-24 15:11:40] [afd301b68d203992295e6972aed62880]
- RMPD  [ARIMA Forecasting] [] [2010-12-28 10:00:01] [afd301b68d203992295e6972aed62880]
-    D      [ARIMA Forecasting] [] [2010-12-29 13:41:22] [e180d4cd19004beeddc12e67012247dc] [Current]
Feedback Forum

Post a new message
Dataseries X:
01,303763
01,416094
01,052458
01,312283
01,309429
01,492409
01,026556
01,005406
01,334886
01,393873
01,128092
01,122787
01,213104
01,253528
01,094796
00,912944
01,195130
00,927499
00,965333
01,198078
00,966362
00,973685
00,994801
00,826262
00,688888
00,781307
00,604791
01,086240
00,774026
01,026032
00,676435
00,830525
00,791624
00,752391
00,670202
00,880336
00,914297
00,961042
00,930194
00,867966
00,989160
00,997288
00,798744
00,975379
00,934721
00,973234
00,815300
00,940209
00,794493
00,931340
00,922050
00,784517
00,822098
00,891026
00,807306
00,951441
01,147907
01,172609
01,281051
01,165962
00,978911
01,410951
01,197838
01,288368
01,102253
01,197657
01,299984
01,198611
01,299252
01,097604
01,399770
01,398396
01,401880
01,699717
01,397610
01,500135
01,400136
01,400427
01,341477
01,338580
01,482977
01,163253
01,328468
01,234550
01,484741
01,336579
01,339292
01,405225
01,333491
01,149740




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116825&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116825&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116825&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[78])
661.197657-------
671.299984-------
681.198611-------
691.299252-------
701.097604-------
711.39977-------
721.398396-------
731.40188-------
741.699717-------
751.39761-------
761.500135-------
771.400136-------
781.400427-------
791.34151.35351.03661.67030.47040.38570.62960.3857
801.33861.42221.08481.75960.31360.68040.9030.5502
811.4831.48941.12771.85120.48610.79310.84860.6852
821.16331.44391.05981.82810.07610.42110.96140.5879
831.32851.49531.08991.90070.210.94580.67790.6767
841.23461.49871.07311.92430.11190.78340.67790.6745
851.48471.43750.99281.88220.41750.81450.56240.5649
861.33661.65771.19462.12070.08710.76790.42940.8619
871.33931.46920.98841.94990.29820.70560.61480.6104
881.40521.53691.03912.03470.30210.78170.55750.7044
891.33351.48250.96821.99680.28510.61580.62320.6228
901.14971.52930.99912.05960.08030.76540.68310.6831

\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[78]) \tabularnewline
66 & 1.197657 & - & - & - & - & - & - & - \tabularnewline
67 & 1.299984 & - & - & - & - & - & - & - \tabularnewline
68 & 1.198611 & - & - & - & - & - & - & - \tabularnewline
69 & 1.299252 & - & - & - & - & - & - & - \tabularnewline
70 & 1.097604 & - & - & - & - & - & - & - \tabularnewline
71 & 1.39977 & - & - & - & - & - & - & - \tabularnewline
72 & 1.398396 & - & - & - & - & - & - & - \tabularnewline
73 & 1.40188 & - & - & - & - & - & - & - \tabularnewline
74 & 1.699717 & - & - & - & - & - & - & - \tabularnewline
75 & 1.39761 & - & - & - & - & - & - & - \tabularnewline
76 & 1.500135 & - & - & - & - & - & - & - \tabularnewline
77 & 1.400136 & - & - & - & - & - & - & - \tabularnewline
78 & 1.400427 & - & - & - & - & - & - & - \tabularnewline
79 & 1.3415 & 1.3535 & 1.0366 & 1.6703 & 0.4704 & 0.3857 & 0.6296 & 0.3857 \tabularnewline
80 & 1.3386 & 1.4222 & 1.0848 & 1.7596 & 0.3136 & 0.6804 & 0.903 & 0.5502 \tabularnewline
81 & 1.483 & 1.4894 & 1.1277 & 1.8512 & 0.4861 & 0.7931 & 0.8486 & 0.6852 \tabularnewline
82 & 1.1633 & 1.4439 & 1.0598 & 1.8281 & 0.0761 & 0.4211 & 0.9614 & 0.5879 \tabularnewline
83 & 1.3285 & 1.4953 & 1.0899 & 1.9007 & 0.21 & 0.9458 & 0.6779 & 0.6767 \tabularnewline
84 & 1.2346 & 1.4987 & 1.0731 & 1.9243 & 0.1119 & 0.7834 & 0.6779 & 0.6745 \tabularnewline
85 & 1.4847 & 1.4375 & 0.9928 & 1.8822 & 0.4175 & 0.8145 & 0.5624 & 0.5649 \tabularnewline
86 & 1.3366 & 1.6577 & 1.1946 & 2.1207 & 0.0871 & 0.7679 & 0.4294 & 0.8619 \tabularnewline
87 & 1.3393 & 1.4692 & 0.9884 & 1.9499 & 0.2982 & 0.7056 & 0.6148 & 0.6104 \tabularnewline
88 & 1.4052 & 1.5369 & 1.0391 & 2.0347 & 0.3021 & 0.7817 & 0.5575 & 0.7044 \tabularnewline
89 & 1.3335 & 1.4825 & 0.9682 & 1.9968 & 0.2851 & 0.6158 & 0.6232 & 0.6228 \tabularnewline
90 & 1.1497 & 1.5293 & 0.9991 & 2.0596 & 0.0803 & 0.7654 & 0.6831 & 0.6831 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116825&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[78])[/C][/ROW]
[ROW][C]66[/C][C]1.197657[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]1.299984[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]1.198611[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]1.299252[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]1.097604[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]1.39977[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]1.398396[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]1.40188[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]1.699717[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]1.39761[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]1.500135[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]1.400136[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]1.400427[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]1.3415[/C][C]1.3535[/C][C]1.0366[/C][C]1.6703[/C][C]0.4704[/C][C]0.3857[/C][C]0.6296[/C][C]0.3857[/C][/ROW]
[ROW][C]80[/C][C]1.3386[/C][C]1.4222[/C][C]1.0848[/C][C]1.7596[/C][C]0.3136[/C][C]0.6804[/C][C]0.903[/C][C]0.5502[/C][/ROW]
[ROW][C]81[/C][C]1.483[/C][C]1.4894[/C][C]1.1277[/C][C]1.8512[/C][C]0.4861[/C][C]0.7931[/C][C]0.8486[/C][C]0.6852[/C][/ROW]
[ROW][C]82[/C][C]1.1633[/C][C]1.4439[/C][C]1.0598[/C][C]1.8281[/C][C]0.0761[/C][C]0.4211[/C][C]0.9614[/C][C]0.5879[/C][/ROW]
[ROW][C]83[/C][C]1.3285[/C][C]1.4953[/C][C]1.0899[/C][C]1.9007[/C][C]0.21[/C][C]0.9458[/C][C]0.6779[/C][C]0.6767[/C][/ROW]
[ROW][C]84[/C][C]1.2346[/C][C]1.4987[/C][C]1.0731[/C][C]1.9243[/C][C]0.1119[/C][C]0.7834[/C][C]0.6779[/C][C]0.6745[/C][/ROW]
[ROW][C]85[/C][C]1.4847[/C][C]1.4375[/C][C]0.9928[/C][C]1.8822[/C][C]0.4175[/C][C]0.8145[/C][C]0.5624[/C][C]0.5649[/C][/ROW]
[ROW][C]86[/C][C]1.3366[/C][C]1.6577[/C][C]1.1946[/C][C]2.1207[/C][C]0.0871[/C][C]0.7679[/C][C]0.4294[/C][C]0.8619[/C][/ROW]
[ROW][C]87[/C][C]1.3393[/C][C]1.4692[/C][C]0.9884[/C][C]1.9499[/C][C]0.2982[/C][C]0.7056[/C][C]0.6148[/C][C]0.6104[/C][/ROW]
[ROW][C]88[/C][C]1.4052[/C][C]1.5369[/C][C]1.0391[/C][C]2.0347[/C][C]0.3021[/C][C]0.7817[/C][C]0.5575[/C][C]0.7044[/C][/ROW]
[ROW][C]89[/C][C]1.3335[/C][C]1.4825[/C][C]0.9682[/C][C]1.9968[/C][C]0.2851[/C][C]0.6158[/C][C]0.6232[/C][C]0.6228[/C][/ROW]
[ROW][C]90[/C][C]1.1497[/C][C]1.5293[/C][C]0.9991[/C][C]2.0596[/C][C]0.0803[/C][C]0.7654[/C][C]0.6831[/C][C]0.6831[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116825&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116825&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[78])
661.197657-------
671.299984-------
681.198611-------
691.299252-------
701.097604-------
711.39977-------
721.398396-------
731.40188-------
741.699717-------
751.39761-------
761.500135-------
771.400136-------
781.400427-------
791.34151.35351.03661.67030.47040.38570.62960.3857
801.33861.42221.08481.75960.31360.68040.9030.5502
811.4831.48941.12771.85120.48610.79310.84860.6852
821.16331.44391.05981.82810.07610.42110.96140.5879
831.32851.49531.08991.90070.210.94580.67790.6767
841.23461.49871.07311.92430.11190.78340.67790.6745
851.48471.43750.99281.88220.41750.81450.56240.5649
861.33661.65771.19462.12070.08710.76790.42940.8619
871.33931.46920.98841.94990.29820.70560.61480.6104
881.40521.53691.03912.03470.30210.78170.55750.7044
891.33351.48250.96821.99680.28510.61580.62320.6228
901.14971.52930.99912.05960.08030.76540.68310.6831







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
790.1194-0.008901e-0400
800.121-0.05880.03380.0070.00360.0597
810.1239-0.00430.02400.00240.0489
820.1357-0.19440.06660.07880.02150.1466
830.1383-0.11160.07560.02780.02280.1509
840.1449-0.17620.09240.06980.03060.1749
850.15780.03290.08390.00220.02650.1629
860.1425-0.19370.09760.10310.03610.19
870.1669-0.08840.09660.01690.0340.1843
880.1653-0.08570.09550.01730.03230.1797
890.177-0.10050.09590.02220.03140.1772
900.1769-0.24820.10860.14410.04080.2019

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
79 & 0.1194 & -0.0089 & 0 & 1e-04 & 0 & 0 \tabularnewline
80 & 0.121 & -0.0588 & 0.0338 & 0.007 & 0.0036 & 0.0597 \tabularnewline
81 & 0.1239 & -0.0043 & 0.024 & 0 & 0.0024 & 0.0489 \tabularnewline
82 & 0.1357 & -0.1944 & 0.0666 & 0.0788 & 0.0215 & 0.1466 \tabularnewline
83 & 0.1383 & -0.1116 & 0.0756 & 0.0278 & 0.0228 & 0.1509 \tabularnewline
84 & 0.1449 & -0.1762 & 0.0924 & 0.0698 & 0.0306 & 0.1749 \tabularnewline
85 & 0.1578 & 0.0329 & 0.0839 & 0.0022 & 0.0265 & 0.1629 \tabularnewline
86 & 0.1425 & -0.1937 & 0.0976 & 0.1031 & 0.0361 & 0.19 \tabularnewline
87 & 0.1669 & -0.0884 & 0.0966 & 0.0169 & 0.034 & 0.1843 \tabularnewline
88 & 0.1653 & -0.0857 & 0.0955 & 0.0173 & 0.0323 & 0.1797 \tabularnewline
89 & 0.177 & -0.1005 & 0.0959 & 0.0222 & 0.0314 & 0.1772 \tabularnewline
90 & 0.1769 & -0.2482 & 0.1086 & 0.1441 & 0.0408 & 0.2019 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116825&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]79[/C][C]0.1194[/C][C]-0.0089[/C][C]0[/C][C]1e-04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]80[/C][C]0.121[/C][C]-0.0588[/C][C]0.0338[/C][C]0.007[/C][C]0.0036[/C][C]0.0597[/C][/ROW]
[ROW][C]81[/C][C]0.1239[/C][C]-0.0043[/C][C]0.024[/C][C]0[/C][C]0.0024[/C][C]0.0489[/C][/ROW]
[ROW][C]82[/C][C]0.1357[/C][C]-0.1944[/C][C]0.0666[/C][C]0.0788[/C][C]0.0215[/C][C]0.1466[/C][/ROW]
[ROW][C]83[/C][C]0.1383[/C][C]-0.1116[/C][C]0.0756[/C][C]0.0278[/C][C]0.0228[/C][C]0.1509[/C][/ROW]
[ROW][C]84[/C][C]0.1449[/C][C]-0.1762[/C][C]0.0924[/C][C]0.0698[/C][C]0.0306[/C][C]0.1749[/C][/ROW]
[ROW][C]85[/C][C]0.1578[/C][C]0.0329[/C][C]0.0839[/C][C]0.0022[/C][C]0.0265[/C][C]0.1629[/C][/ROW]
[ROW][C]86[/C][C]0.1425[/C][C]-0.1937[/C][C]0.0976[/C][C]0.1031[/C][C]0.0361[/C][C]0.19[/C][/ROW]
[ROW][C]87[/C][C]0.1669[/C][C]-0.0884[/C][C]0.0966[/C][C]0.0169[/C][C]0.034[/C][C]0.1843[/C][/ROW]
[ROW][C]88[/C][C]0.1653[/C][C]-0.0857[/C][C]0.0955[/C][C]0.0173[/C][C]0.0323[/C][C]0.1797[/C][/ROW]
[ROW][C]89[/C][C]0.177[/C][C]-0.1005[/C][C]0.0959[/C][C]0.0222[/C][C]0.0314[/C][C]0.1772[/C][/ROW]
[ROW][C]90[/C][C]0.1769[/C][C]-0.2482[/C][C]0.1086[/C][C]0.1441[/C][C]0.0408[/C][C]0.2019[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116825&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116825&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
790.1194-0.008901e-0400
800.121-0.05880.03380.0070.00360.0597
810.1239-0.00430.02400.00240.0489
820.1357-0.19440.06660.07880.02150.1466
830.1383-0.11160.07560.02780.02280.1509
840.1449-0.17620.09240.06980.03060.1749
850.15780.03290.08390.00220.02650.1629
860.1425-0.19370.09760.10310.03610.19
870.1669-0.08840.09660.01690.0340.1843
880.1653-0.08570.09550.01730.03230.1797
890.177-0.10050.09590.02220.03140.1772
900.1769-0.24820.10860.14410.04080.2019



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