Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 24 Jan 2008 05:59: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/Jan/24/t1201179510mygc70cp6erupnn.htm/, Retrieved Wed, 15 May 2024 00:02:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=8057, Retrieved Wed, 15 May 2024 00:02:19 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact288
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [arimawg] [2008-01-24 12:59:09] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
59.9
59.9
59.9
60.9
60.9
60.9
61.1
61.1
61.1
60.2
60.2
60.2
60.1
60.1
60.1
59.7
59.7
59.7
60.5
60.5
60.5
59.5
59.5
59.5
59.5
59.5
59.5
59.7
59.7
59.7
60.4
60.4
60.4
60
60
60
59
59
59
59.3
59.3
59.3
59.7
59.7
59.7
60.4
60.4
60.4
59.9
59.9
59.9
60.5
60.5
60.5
60.4
60.4
60.4
60.6
60.6
60.6
60.9
60.9
60.9
61
61
61
61.2
61.2
61.2
61.2
61.2
61.2
60.3
60.3
60.3
60.4
60.4
60.4
61.2
61.2
61.2
62.1
62.1
62.1
61.7
61.7
61.7
61.6
61.6
61.6




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

\begin{tabular}{lllllllll}
\hline
Summary of compuational 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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=8057&T=0

[TABLE]
[ROW][C]Summary of compuational 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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=8057&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8057&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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[78])
6661-------
6761.2-------
6861.2-------
6961.2-------
7061.2-------
7161.2-------
7261.2-------
7360.3-------
7460.3-------
7560.3-------
7660.4-------
7760.4-------
7860.4-------
7961.260.490259.902261.07250.00840.61920.00840.6192
8061.260.490259.656961.31210.04530.04530.04530.5851
8161.260.490259.46861.49530.08320.08320.08320.5698
8262.160.496659.314961.65560.00330.11710.11710.5649
8362.160.496659.173961.7910.00760.00760.14340.5581
8462.160.496659.046161.91310.01330.01330.16520.5532
8561.760.145958.568361.68330.02380.00640.42210.373
8661.760.145958.457861.7880.03180.03180.42710.3808
8761.760.145958.353861.88620.040.040.43110.3874
8861.660.190258.30162.02190.06570.05310.41120.4112
8961.660.190258.207262.10990.0750.0750.41520.4152
9061.660.190258.117562.19390.08390.08390.41870.4187

\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 & 61 & - & - & - & - & - & - & - \tabularnewline
67 & 61.2 & - & - & - & - & - & - & - \tabularnewline
68 & 61.2 & - & - & - & - & - & - & - \tabularnewline
69 & 61.2 & - & - & - & - & - & - & - \tabularnewline
70 & 61.2 & - & - & - & - & - & - & - \tabularnewline
71 & 61.2 & - & - & - & - & - & - & - \tabularnewline
72 & 61.2 & - & - & - & - & - & - & - \tabularnewline
73 & 60.3 & - & - & - & - & - & - & - \tabularnewline
74 & 60.3 & - & - & - & - & - & - & - \tabularnewline
75 & 60.3 & - & - & - & - & - & - & - \tabularnewline
76 & 60.4 & - & - & - & - & - & - & - \tabularnewline
77 & 60.4 & - & - & - & - & - & - & - \tabularnewline
78 & 60.4 & - & - & - & - & - & - & - \tabularnewline
79 & 61.2 & 60.4902 & 59.9022 & 61.0725 & 0.0084 & 0.6192 & 0.0084 & 0.6192 \tabularnewline
80 & 61.2 & 60.4902 & 59.6569 & 61.3121 & 0.0453 & 0.0453 & 0.0453 & 0.5851 \tabularnewline
81 & 61.2 & 60.4902 & 59.468 & 61.4953 & 0.0832 & 0.0832 & 0.0832 & 0.5698 \tabularnewline
82 & 62.1 & 60.4966 & 59.3149 & 61.6556 & 0.0033 & 0.1171 & 0.1171 & 0.5649 \tabularnewline
83 & 62.1 & 60.4966 & 59.1739 & 61.791 & 0.0076 & 0.0076 & 0.1434 & 0.5581 \tabularnewline
84 & 62.1 & 60.4966 & 59.0461 & 61.9131 & 0.0133 & 0.0133 & 0.1652 & 0.5532 \tabularnewline
85 & 61.7 & 60.1459 & 58.5683 & 61.6833 & 0.0238 & 0.0064 & 0.4221 & 0.373 \tabularnewline
86 & 61.7 & 60.1459 & 58.4578 & 61.788 & 0.0318 & 0.0318 & 0.4271 & 0.3808 \tabularnewline
87 & 61.7 & 60.1459 & 58.3538 & 61.8862 & 0.04 & 0.04 & 0.4311 & 0.3874 \tabularnewline
88 & 61.6 & 60.1902 & 58.301 & 62.0219 & 0.0657 & 0.0531 & 0.4112 & 0.4112 \tabularnewline
89 & 61.6 & 60.1902 & 58.2072 & 62.1099 & 0.075 & 0.075 & 0.4152 & 0.4152 \tabularnewline
90 & 61.6 & 60.1902 & 58.1175 & 62.1939 & 0.0839 & 0.0839 & 0.4187 & 0.4187 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=8057&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]61[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]61.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]61.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]61.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]61.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]61.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]61.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]60.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]60.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]60.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]60.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]60.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]60.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]61.2[/C][C]60.4902[/C][C]59.9022[/C][C]61.0725[/C][C]0.0084[/C][C]0.6192[/C][C]0.0084[/C][C]0.6192[/C][/ROW]
[ROW][C]80[/C][C]61.2[/C][C]60.4902[/C][C]59.6569[/C][C]61.3121[/C][C]0.0453[/C][C]0.0453[/C][C]0.0453[/C][C]0.5851[/C][/ROW]
[ROW][C]81[/C][C]61.2[/C][C]60.4902[/C][C]59.468[/C][C]61.4953[/C][C]0.0832[/C][C]0.0832[/C][C]0.0832[/C][C]0.5698[/C][/ROW]
[ROW][C]82[/C][C]62.1[/C][C]60.4966[/C][C]59.3149[/C][C]61.6556[/C][C]0.0033[/C][C]0.1171[/C][C]0.1171[/C][C]0.5649[/C][/ROW]
[ROW][C]83[/C][C]62.1[/C][C]60.4966[/C][C]59.1739[/C][C]61.791[/C][C]0.0076[/C][C]0.0076[/C][C]0.1434[/C][C]0.5581[/C][/ROW]
[ROW][C]84[/C][C]62.1[/C][C]60.4966[/C][C]59.0461[/C][C]61.9131[/C][C]0.0133[/C][C]0.0133[/C][C]0.1652[/C][C]0.5532[/C][/ROW]
[ROW][C]85[/C][C]61.7[/C][C]60.1459[/C][C]58.5683[/C][C]61.6833[/C][C]0.0238[/C][C]0.0064[/C][C]0.4221[/C][C]0.373[/C][/ROW]
[ROW][C]86[/C][C]61.7[/C][C]60.1459[/C][C]58.4578[/C][C]61.788[/C][C]0.0318[/C][C]0.0318[/C][C]0.4271[/C][C]0.3808[/C][/ROW]
[ROW][C]87[/C][C]61.7[/C][C]60.1459[/C][C]58.3538[/C][C]61.8862[/C][C]0.04[/C][C]0.04[/C][C]0.4311[/C][C]0.3874[/C][/ROW]
[ROW][C]88[/C][C]61.6[/C][C]60.1902[/C][C]58.301[/C][C]62.0219[/C][C]0.0657[/C][C]0.0531[/C][C]0.4112[/C][C]0.4112[/C][/ROW]
[ROW][C]89[/C][C]61.6[/C][C]60.1902[/C][C]58.2072[/C][C]62.1099[/C][C]0.075[/C][C]0.075[/C][C]0.4152[/C][C]0.4152[/C][/ROW]
[ROW][C]90[/C][C]61.6[/C][C]60.1902[/C][C]58.1175[/C][C]62.1939[/C][C]0.0839[/C][C]0.0839[/C][C]0.4187[/C][C]0.4187[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=8057&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8057&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])
6661-------
6761.2-------
6861.2-------
6961.2-------
7061.2-------
7161.2-------
7261.2-------
7360.3-------
7460.3-------
7560.3-------
7660.4-------
7760.4-------
7860.4-------
7961.260.490259.902261.07250.00840.61920.00840.6192
8061.260.490259.656961.31210.04530.04530.04530.5851
8161.260.490259.46861.49530.08320.08320.08320.5698
8262.160.496659.314961.65560.00330.11710.11710.5649
8362.160.496659.173961.7910.00760.00760.14340.5581
8462.160.496659.046161.91310.01330.01330.16520.5532
8561.760.145958.568361.68330.02380.00640.42210.373
8661.760.145958.457861.7880.03180.03180.42710.3808
8761.760.145958.353861.88620.040.040.43110.3874
8861.660.190258.30162.02190.06570.05310.41120.4112
8961.660.190258.207262.10990.0750.0750.41520.4152
9061.660.190258.117562.19390.08390.08390.41870.4187







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
790.00490.01170.0010.50390.0420.2049
800.00690.01170.0010.50390.0420.2049
810.00850.01170.0010.50390.0420.2049
820.00980.02650.00222.5710.21420.4629
830.01090.02650.00222.5710.21420.4629
840.01190.02650.00222.5710.21420.4629
850.0130.02580.00222.41510.20130.4486
860.01390.02580.00222.41510.20130.4486
870.01480.02580.00222.41510.20130.4486
880.01550.02340.0021.98750.16560.407
890.01630.02340.0021.98750.16560.407
900.0170.02340.0021.98750.16560.407

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
79 & 0.0049 & 0.0117 & 0.001 & 0.5039 & 0.042 & 0.2049 \tabularnewline
80 & 0.0069 & 0.0117 & 0.001 & 0.5039 & 0.042 & 0.2049 \tabularnewline
81 & 0.0085 & 0.0117 & 0.001 & 0.5039 & 0.042 & 0.2049 \tabularnewline
82 & 0.0098 & 0.0265 & 0.0022 & 2.571 & 0.2142 & 0.4629 \tabularnewline
83 & 0.0109 & 0.0265 & 0.0022 & 2.571 & 0.2142 & 0.4629 \tabularnewline
84 & 0.0119 & 0.0265 & 0.0022 & 2.571 & 0.2142 & 0.4629 \tabularnewline
85 & 0.013 & 0.0258 & 0.0022 & 2.4151 & 0.2013 & 0.4486 \tabularnewline
86 & 0.0139 & 0.0258 & 0.0022 & 2.4151 & 0.2013 & 0.4486 \tabularnewline
87 & 0.0148 & 0.0258 & 0.0022 & 2.4151 & 0.2013 & 0.4486 \tabularnewline
88 & 0.0155 & 0.0234 & 0.002 & 1.9875 & 0.1656 & 0.407 \tabularnewline
89 & 0.0163 & 0.0234 & 0.002 & 1.9875 & 0.1656 & 0.407 \tabularnewline
90 & 0.017 & 0.0234 & 0.002 & 1.9875 & 0.1656 & 0.407 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=8057&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.0049[/C][C]0.0117[/C][C]0.001[/C][C]0.5039[/C][C]0.042[/C][C]0.2049[/C][/ROW]
[ROW][C]80[/C][C]0.0069[/C][C]0.0117[/C][C]0.001[/C][C]0.5039[/C][C]0.042[/C][C]0.2049[/C][/ROW]
[ROW][C]81[/C][C]0.0085[/C][C]0.0117[/C][C]0.001[/C][C]0.5039[/C][C]0.042[/C][C]0.2049[/C][/ROW]
[ROW][C]82[/C][C]0.0098[/C][C]0.0265[/C][C]0.0022[/C][C]2.571[/C][C]0.2142[/C][C]0.4629[/C][/ROW]
[ROW][C]83[/C][C]0.0109[/C][C]0.0265[/C][C]0.0022[/C][C]2.571[/C][C]0.2142[/C][C]0.4629[/C][/ROW]
[ROW][C]84[/C][C]0.0119[/C][C]0.0265[/C][C]0.0022[/C][C]2.571[/C][C]0.2142[/C][C]0.4629[/C][/ROW]
[ROW][C]85[/C][C]0.013[/C][C]0.0258[/C][C]0.0022[/C][C]2.4151[/C][C]0.2013[/C][C]0.4486[/C][/ROW]
[ROW][C]86[/C][C]0.0139[/C][C]0.0258[/C][C]0.0022[/C][C]2.4151[/C][C]0.2013[/C][C]0.4486[/C][/ROW]
[ROW][C]87[/C][C]0.0148[/C][C]0.0258[/C][C]0.0022[/C][C]2.4151[/C][C]0.2013[/C][C]0.4486[/C][/ROW]
[ROW][C]88[/C][C]0.0155[/C][C]0.0234[/C][C]0.002[/C][C]1.9875[/C][C]0.1656[/C][C]0.407[/C][/ROW]
[ROW][C]89[/C][C]0.0163[/C][C]0.0234[/C][C]0.002[/C][C]1.9875[/C][C]0.1656[/C][C]0.407[/C][/ROW]
[ROW][C]90[/C][C]0.017[/C][C]0.0234[/C][C]0.002[/C][C]1.9875[/C][C]0.1656[/C][C]0.407[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=8057&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=8057&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.00490.01170.0010.50390.0420.2049
800.00690.01170.0010.50390.0420.2049
810.00850.01170.0010.50390.0420.2049
820.00980.02650.00222.5710.21420.4629
830.01090.02650.00222.5710.21420.4629
840.01190.02650.00222.5710.21420.4629
850.0130.02580.00222.41510.20130.4486
860.01390.02580.00222.41510.20130.4486
870.01480.02580.00222.41510.20130.4486
880.01550.02340.0021.98750.16560.407
890.01630.02340.0021.98750.16560.407
900.0170.02340.0021.98750.16560.407



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