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, 16 Dec 2010 12:49:52 +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/16/t1292503684blnz680nnbwcl0k.htm/, Retrieved Fri, 03 May 2024 08:27:12 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=110884, Retrieved Fri, 03 May 2024 08:27:12 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact131
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
- R PD      [ARIMA Forecasting] [ARIMA forecasting...] [2010-12-03 14:52:09] [8b017ffbf7b0eded54d8efebfb3e4cfa]
-    D        [ARIMA Forecasting] [ARIMA forecasting...] [2010-12-03 14:56:31] [8b017ffbf7b0eded54d8efebfb3e4cfa]
-   P             [ARIMA Forecasting] [Paper - ARIMA (Ge...] [2010-12-16 12:49:52] [3de277db83c2673156e9464be2ef6f69] [Current]
Feedback Forum

Post a new message
Dataseries X:
9769
9321
9939
9336
10195
9464
10010
10213
9563
9890
9305
9391
9928
8686
9843
9627
10074
9503
10119
10000
9313
9866
9172
9241
9659
8904
9755
9080
9435
8971
10063
9793
9454
9759
8820
9403
9676
8642
9402
9610
9294
9448
10319
9548
9801
9596
8923
9746
9829
9125
9782
9441
9162
9915
10444
10209
9985
9842
9429
10132
9849
9172
10313
9819
9955
10048
10082
10541
10208
10233
9439
9963
10158
9225
10474
9757
10490
10281
10444
10640
10695
10786
9832
9747
10411
9511
10402
9701
10540
10112
10915
11183
10384
10834
9886
10216




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110884&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'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[84])
729963-------
7310158-------
749225-------
7510474-------
769757-------
7710490-------
7810281-------
7910444-------
8010640-------
8110695-------
8210786-------
839832-------
849747-------
851041110341.35539776.236810906.47390.40460.98040.73760.9804
8695119402.53748832.70519972.36970.35453e-040.72930.118
871040210645.904110071.687511220.12070.20260.99990.72130.9989
8897019923.44959345.152710501.74640.22540.05240.71370.7251
891054010651.16810069.071811233.26430.35410.99930.70630.9988
901011210437.05419851.418111022.69020.13830.36520.69930.9895
911091510595.102510006.167111184.03790.14350.94610.69250.9976
921118310786.307910194.295911378.320.09450.3350.68590.9997
931038410836.665610241.783511431.54760.06790.12690.67970.9998
941083410923.170510325.610211520.73080.3850.96150.67360.9999
9598869964.8189364.757610564.87840.39840.00230.66780.7616
96102169875.60369273.208710477.99860.1340.48650.66220.6622

\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[84]) \tabularnewline
72 & 9963 & - & - & - & - & - & - & - \tabularnewline
73 & 10158 & - & - & - & - & - & - & - \tabularnewline
74 & 9225 & - & - & - & - & - & - & - \tabularnewline
75 & 10474 & - & - & - & - & - & - & - \tabularnewline
76 & 9757 & - & - & - & - & - & - & - \tabularnewline
77 & 10490 & - & - & - & - & - & - & - \tabularnewline
78 & 10281 & - & - & - & - & - & - & - \tabularnewline
79 & 10444 & - & - & - & - & - & - & - \tabularnewline
80 & 10640 & - & - & - & - & - & - & - \tabularnewline
81 & 10695 & - & - & - & - & - & - & - \tabularnewline
82 & 10786 & - & - & - & - & - & - & - \tabularnewline
83 & 9832 & - & - & - & - & - & - & - \tabularnewline
84 & 9747 & - & - & - & - & - & - & - \tabularnewline
85 & 10411 & 10341.3553 & 9776.2368 & 10906.4739 & 0.4046 & 0.9804 & 0.7376 & 0.9804 \tabularnewline
86 & 9511 & 9402.5374 & 8832.7051 & 9972.3697 & 0.3545 & 3e-04 & 0.7293 & 0.118 \tabularnewline
87 & 10402 & 10645.9041 & 10071.6875 & 11220.1207 & 0.2026 & 0.9999 & 0.7213 & 0.9989 \tabularnewline
88 & 9701 & 9923.4495 & 9345.1527 & 10501.7464 & 0.2254 & 0.0524 & 0.7137 & 0.7251 \tabularnewline
89 & 10540 & 10651.168 & 10069.0718 & 11233.2643 & 0.3541 & 0.9993 & 0.7063 & 0.9988 \tabularnewline
90 & 10112 & 10437.0541 & 9851.4181 & 11022.6902 & 0.1383 & 0.3652 & 0.6993 & 0.9895 \tabularnewline
91 & 10915 & 10595.1025 & 10006.1671 & 11184.0379 & 0.1435 & 0.9461 & 0.6925 & 0.9976 \tabularnewline
92 & 11183 & 10786.3079 & 10194.2959 & 11378.32 & 0.0945 & 0.335 & 0.6859 & 0.9997 \tabularnewline
93 & 10384 & 10836.6656 & 10241.7835 & 11431.5476 & 0.0679 & 0.1269 & 0.6797 & 0.9998 \tabularnewline
94 & 10834 & 10923.1705 & 10325.6102 & 11520.7308 & 0.385 & 0.9615 & 0.6736 & 0.9999 \tabularnewline
95 & 9886 & 9964.818 & 9364.7576 & 10564.8784 & 0.3984 & 0.0023 & 0.6678 & 0.7616 \tabularnewline
96 & 10216 & 9875.6036 & 9273.2087 & 10477.9986 & 0.134 & 0.4865 & 0.6622 & 0.6622 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110884&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[84])[/C][/ROW]
[ROW][C]72[/C][C]9963[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]10158[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]9225[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]10474[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]9757[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]10490[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]10281[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]10444[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]10640[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]10695[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]10786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]9832[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]9747[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]10411[/C][C]10341.3553[/C][C]9776.2368[/C][C]10906.4739[/C][C]0.4046[/C][C]0.9804[/C][C]0.7376[/C][C]0.9804[/C][/ROW]
[ROW][C]86[/C][C]9511[/C][C]9402.5374[/C][C]8832.7051[/C][C]9972.3697[/C][C]0.3545[/C][C]3e-04[/C][C]0.7293[/C][C]0.118[/C][/ROW]
[ROW][C]87[/C][C]10402[/C][C]10645.9041[/C][C]10071.6875[/C][C]11220.1207[/C][C]0.2026[/C][C]0.9999[/C][C]0.7213[/C][C]0.9989[/C][/ROW]
[ROW][C]88[/C][C]9701[/C][C]9923.4495[/C][C]9345.1527[/C][C]10501.7464[/C][C]0.2254[/C][C]0.0524[/C][C]0.7137[/C][C]0.7251[/C][/ROW]
[ROW][C]89[/C][C]10540[/C][C]10651.168[/C][C]10069.0718[/C][C]11233.2643[/C][C]0.3541[/C][C]0.9993[/C][C]0.7063[/C][C]0.9988[/C][/ROW]
[ROW][C]90[/C][C]10112[/C][C]10437.0541[/C][C]9851.4181[/C][C]11022.6902[/C][C]0.1383[/C][C]0.3652[/C][C]0.6993[/C][C]0.9895[/C][/ROW]
[ROW][C]91[/C][C]10915[/C][C]10595.1025[/C][C]10006.1671[/C][C]11184.0379[/C][C]0.1435[/C][C]0.9461[/C][C]0.6925[/C][C]0.9976[/C][/ROW]
[ROW][C]92[/C][C]11183[/C][C]10786.3079[/C][C]10194.2959[/C][C]11378.32[/C][C]0.0945[/C][C]0.335[/C][C]0.6859[/C][C]0.9997[/C][/ROW]
[ROW][C]93[/C][C]10384[/C][C]10836.6656[/C][C]10241.7835[/C][C]11431.5476[/C][C]0.0679[/C][C]0.1269[/C][C]0.6797[/C][C]0.9998[/C][/ROW]
[ROW][C]94[/C][C]10834[/C][C]10923.1705[/C][C]10325.6102[/C][C]11520.7308[/C][C]0.385[/C][C]0.9615[/C][C]0.6736[/C][C]0.9999[/C][/ROW]
[ROW][C]95[/C][C]9886[/C][C]9964.818[/C][C]9364.7576[/C][C]10564.8784[/C][C]0.3984[/C][C]0.0023[/C][C]0.6678[/C][C]0.7616[/C][/ROW]
[ROW][C]96[/C][C]10216[/C][C]9875.6036[/C][C]9273.2087[/C][C]10477.9986[/C][C]0.134[/C][C]0.4865[/C][C]0.6622[/C][C]0.6622[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110884&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110884&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[84])
729963-------
7310158-------
749225-------
7510474-------
769757-------
7710490-------
7810281-------
7910444-------
8010640-------
8110695-------
8210786-------
839832-------
849747-------
851041110341.35539776.236810906.47390.40460.98040.73760.9804
8695119402.53748832.70519972.36970.35453e-040.72930.118
871040210645.904110071.687511220.12070.20260.99990.72130.9989
8897019923.44959345.152710501.74640.22540.05240.71370.7251
891054010651.16810069.071811233.26430.35410.99930.70630.9988
901011210437.05419851.418111022.69020.13830.36520.69930.9895
911091510595.102510006.167111184.03790.14350.94610.69250.9976
921118310786.307910194.295911378.320.09450.3350.68590.9997
931038410836.665610241.783511431.54760.06790.12690.67970.9998
941083410923.170510325.610211520.73080.3850.96150.67360.9999
9598869964.8189364.757610564.87840.39840.00230.66780.7616
96102169875.60369273.208710477.99860.1340.48650.66220.6622







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.02790.006704850.37800
860.03090.01150.009111764.13078307.254491.1441
870.0275-0.02290.013759489.212125367.9069159.2731
880.0297-0.02240.015949483.794931396.8789177.1916
890.0279-0.01040.014812358.332527589.1696166.0999
900.0286-0.03110.0175105660.184240601.0054201.4969
910.02840.03020.0193102334.424149420.0652222.3062
920.0280.03680.0215157364.582762913.1299250.8249
930.028-0.04180.0238204906.102678690.1269280.5176
940.0279-0.00820.02227951.37171616.2513267.6121
950.0307-0.00790.02096212.276965670.4354256.2624
960.03110.03450.022115869.680669853.7059264.2985

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.0279 & 0.0067 & 0 & 4850.378 & 0 & 0 \tabularnewline
86 & 0.0309 & 0.0115 & 0.0091 & 11764.1307 & 8307.2544 & 91.1441 \tabularnewline
87 & 0.0275 & -0.0229 & 0.0137 & 59489.2121 & 25367.9069 & 159.2731 \tabularnewline
88 & 0.0297 & -0.0224 & 0.0159 & 49483.7949 & 31396.8789 & 177.1916 \tabularnewline
89 & 0.0279 & -0.0104 & 0.0148 & 12358.3325 & 27589.1696 & 166.0999 \tabularnewline
90 & 0.0286 & -0.0311 & 0.0175 & 105660.1842 & 40601.0054 & 201.4969 \tabularnewline
91 & 0.0284 & 0.0302 & 0.0193 & 102334.4241 & 49420.0652 & 222.3062 \tabularnewline
92 & 0.028 & 0.0368 & 0.0215 & 157364.5827 & 62913.1299 & 250.8249 \tabularnewline
93 & 0.028 & -0.0418 & 0.0238 & 204906.1026 & 78690.1269 & 280.5176 \tabularnewline
94 & 0.0279 & -0.0082 & 0.0222 & 7951.371 & 71616.2513 & 267.6121 \tabularnewline
95 & 0.0307 & -0.0079 & 0.0209 & 6212.2769 & 65670.4354 & 256.2624 \tabularnewline
96 & 0.0311 & 0.0345 & 0.022 & 115869.6806 & 69853.7059 & 264.2985 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=110884&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]85[/C][C]0.0279[/C][C]0.0067[/C][C]0[/C][C]4850.378[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]0.0309[/C][C]0.0115[/C][C]0.0091[/C][C]11764.1307[/C][C]8307.2544[/C][C]91.1441[/C][/ROW]
[ROW][C]87[/C][C]0.0275[/C][C]-0.0229[/C][C]0.0137[/C][C]59489.2121[/C][C]25367.9069[/C][C]159.2731[/C][/ROW]
[ROW][C]88[/C][C]0.0297[/C][C]-0.0224[/C][C]0.0159[/C][C]49483.7949[/C][C]31396.8789[/C][C]177.1916[/C][/ROW]
[ROW][C]89[/C][C]0.0279[/C][C]-0.0104[/C][C]0.0148[/C][C]12358.3325[/C][C]27589.1696[/C][C]166.0999[/C][/ROW]
[ROW][C]90[/C][C]0.0286[/C][C]-0.0311[/C][C]0.0175[/C][C]105660.1842[/C][C]40601.0054[/C][C]201.4969[/C][/ROW]
[ROW][C]91[/C][C]0.0284[/C][C]0.0302[/C][C]0.0193[/C][C]102334.4241[/C][C]49420.0652[/C][C]222.3062[/C][/ROW]
[ROW][C]92[/C][C]0.028[/C][C]0.0368[/C][C]0.0215[/C][C]157364.5827[/C][C]62913.1299[/C][C]250.8249[/C][/ROW]
[ROW][C]93[/C][C]0.028[/C][C]-0.0418[/C][C]0.0238[/C][C]204906.1026[/C][C]78690.1269[/C][C]280.5176[/C][/ROW]
[ROW][C]94[/C][C]0.0279[/C][C]-0.0082[/C][C]0.0222[/C][C]7951.371[/C][C]71616.2513[/C][C]267.6121[/C][/ROW]
[ROW][C]95[/C][C]0.0307[/C][C]-0.0079[/C][C]0.0209[/C][C]6212.2769[/C][C]65670.4354[/C][C]256.2624[/C][/ROW]
[ROW][C]96[/C][C]0.0311[/C][C]0.0345[/C][C]0.022[/C][C]115869.6806[/C][C]69853.7059[/C][C]264.2985[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=110884&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=110884&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
850.02790.006704850.37800
860.03090.01150.009111764.13078307.254491.1441
870.0275-0.02290.013759489.212125367.9069159.2731
880.0297-0.02240.015949483.794931396.8789177.1916
890.0279-0.01040.014812358.332527589.1696166.0999
900.0286-0.03110.0175105660.184240601.0054201.4969
910.02840.03020.0193102334.424149420.0652222.3062
920.0280.03680.0215157364.582762913.1299250.8249
930.028-0.04180.0238204906.102678690.1269280.5176
940.0279-0.00820.02227951.37171616.2513267.6121
950.0307-0.00790.02096212.276965670.4354256.2624
960.03110.03450.022115869.680669853.7059264.2985



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