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 computationMon, 17 Dec 2012 09:27:33 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/17/t1355754516hnbm8fl06muwfh1.htm/, Retrieved Fri, 29 Mar 2024 09:06:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=200962, Retrieved Fri, 29 Mar 2024 09:06:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact282
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Variance Reduction Matrix] [] [2012-12-17 14:08:52] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [] [2012-12-17 14:27:33] [d76b387543b13b5e3afd8ff9e5fdc89f] [Current]
- RM        [ARIMA Forecasting] [] [2013-01-12 09:57:18] [74be16979710d4c4e7c6647856088456]
Feedback Forum

Post a new message
Dataseries X:
164
96
73
49
39
59
169
169
210
278
298
245
200
188
90
79
78
91
167
169
289
247
275
203
223
104
107
85
75
99
135
211
335
488
326
346
261
224
141
148
145
223
272
445
560
612
467
404
518
404
300
210
196
186
247
343
464
680
711
610
513
292
273
322
189
257
324
404
677
858
895
664
628
308
324
248
272




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net

\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 & 'Sir Maurice George Kendall' @ kendall.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200962&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]'Sir Maurice George Kendall' @ kendall.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200962&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200962&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'Sir Maurice George Kendall' @ kendall.wessa.net







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[65])
53196-------
54186-------
55247-------
56343-------
57464-------
58680-------
59711-------
60610-------
61513-------
62292-------
63273-------
64322-------
65189-------
66257256.3471158.9137413.51890.49680.79950.80980.7995
67324324.5547186.7152564.15170.49820.70970.73710.8663
68404465.8932241.994896.94990.38920.74060.71180.896
69677598.9485295.11841215.57740.4020.73230.6660.9037
70858770.6326357.76841659.94160.42370.58170.57920.9001
71895666.7536298.04241491.6010.29380.32480.45810.8719
72664577.3518248.15431343.25730.41230.20810.46670.8398
73628525.4405219.64751256.95840.39170.35520.51330.8163
74308344.5086140.1213847.02430.44340.13440.58110.7279
75324268.3243106.8655673.72470.39390.42390.4910.6493
76248250.133597.6701640.59250.49570.35540.35910.6205
77272188.149472.3096489.56390.29280.34860.49780.4978

\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[65]) \tabularnewline
53 & 196 & - & - & - & - & - & - & - \tabularnewline
54 & 186 & - & - & - & - & - & - & - \tabularnewline
55 & 247 & - & - & - & - & - & - & - \tabularnewline
56 & 343 & - & - & - & - & - & - & - \tabularnewline
57 & 464 & - & - & - & - & - & - & - \tabularnewline
58 & 680 & - & - & - & - & - & - & - \tabularnewline
59 & 711 & - & - & - & - & - & - & - \tabularnewline
60 & 610 & - & - & - & - & - & - & - \tabularnewline
61 & 513 & - & - & - & - & - & - & - \tabularnewline
62 & 292 & - & - & - & - & - & - & - \tabularnewline
63 & 273 & - & - & - & - & - & - & - \tabularnewline
64 & 322 & - & - & - & - & - & - & - \tabularnewline
65 & 189 & - & - & - & - & - & - & - \tabularnewline
66 & 257 & 256.3471 & 158.9137 & 413.5189 & 0.4968 & 0.7995 & 0.8098 & 0.7995 \tabularnewline
67 & 324 & 324.5547 & 186.7152 & 564.1517 & 0.4982 & 0.7097 & 0.7371 & 0.8663 \tabularnewline
68 & 404 & 465.8932 & 241.994 & 896.9499 & 0.3892 & 0.7406 & 0.7118 & 0.896 \tabularnewline
69 & 677 & 598.9485 & 295.1184 & 1215.5774 & 0.402 & 0.7323 & 0.666 & 0.9037 \tabularnewline
70 & 858 & 770.6326 & 357.7684 & 1659.9416 & 0.4237 & 0.5817 & 0.5792 & 0.9001 \tabularnewline
71 & 895 & 666.7536 & 298.0424 & 1491.601 & 0.2938 & 0.3248 & 0.4581 & 0.8719 \tabularnewline
72 & 664 & 577.3518 & 248.1543 & 1343.2573 & 0.4123 & 0.2081 & 0.4667 & 0.8398 \tabularnewline
73 & 628 & 525.4405 & 219.6475 & 1256.9584 & 0.3917 & 0.3552 & 0.5133 & 0.8163 \tabularnewline
74 & 308 & 344.5086 & 140.1213 & 847.0243 & 0.4434 & 0.1344 & 0.5811 & 0.7279 \tabularnewline
75 & 324 & 268.3243 & 106.8655 & 673.7247 & 0.3939 & 0.4239 & 0.491 & 0.6493 \tabularnewline
76 & 248 & 250.1335 & 97.6701 & 640.5925 & 0.4957 & 0.3554 & 0.3591 & 0.6205 \tabularnewline
77 & 272 & 188.1494 & 72.3096 & 489.5639 & 0.2928 & 0.3486 & 0.4978 & 0.4978 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200962&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[65])[/C][/ROW]
[ROW][C]53[/C][C]196[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]186[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]247[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]343[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]464[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]680[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]711[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]610[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]513[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]292[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]273[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]322[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]189[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]257[/C][C]256.3471[/C][C]158.9137[/C][C]413.5189[/C][C]0.4968[/C][C]0.7995[/C][C]0.8098[/C][C]0.7995[/C][/ROW]
[ROW][C]67[/C][C]324[/C][C]324.5547[/C][C]186.7152[/C][C]564.1517[/C][C]0.4982[/C][C]0.7097[/C][C]0.7371[/C][C]0.8663[/C][/ROW]
[ROW][C]68[/C][C]404[/C][C]465.8932[/C][C]241.994[/C][C]896.9499[/C][C]0.3892[/C][C]0.7406[/C][C]0.7118[/C][C]0.896[/C][/ROW]
[ROW][C]69[/C][C]677[/C][C]598.9485[/C][C]295.1184[/C][C]1215.5774[/C][C]0.402[/C][C]0.7323[/C][C]0.666[/C][C]0.9037[/C][/ROW]
[ROW][C]70[/C][C]858[/C][C]770.6326[/C][C]357.7684[/C][C]1659.9416[/C][C]0.4237[/C][C]0.5817[/C][C]0.5792[/C][C]0.9001[/C][/ROW]
[ROW][C]71[/C][C]895[/C][C]666.7536[/C][C]298.0424[/C][C]1491.601[/C][C]0.2938[/C][C]0.3248[/C][C]0.4581[/C][C]0.8719[/C][/ROW]
[ROW][C]72[/C][C]664[/C][C]577.3518[/C][C]248.1543[/C][C]1343.2573[/C][C]0.4123[/C][C]0.2081[/C][C]0.4667[/C][C]0.8398[/C][/ROW]
[ROW][C]73[/C][C]628[/C][C]525.4405[/C][C]219.6475[/C][C]1256.9584[/C][C]0.3917[/C][C]0.3552[/C][C]0.5133[/C][C]0.8163[/C][/ROW]
[ROW][C]74[/C][C]308[/C][C]344.5086[/C][C]140.1213[/C][C]847.0243[/C][C]0.4434[/C][C]0.1344[/C][C]0.5811[/C][C]0.7279[/C][/ROW]
[ROW][C]75[/C][C]324[/C][C]268.3243[/C][C]106.8655[/C][C]673.7247[/C][C]0.3939[/C][C]0.4239[/C][C]0.491[/C][C]0.6493[/C][/ROW]
[ROW][C]76[/C][C]248[/C][C]250.1335[/C][C]97.6701[/C][C]640.5925[/C][C]0.4957[/C][C]0.3554[/C][C]0.3591[/C][C]0.6205[/C][/ROW]
[ROW][C]77[/C][C]272[/C][C]188.1494[/C][C]72.3096[/C][C]489.5639[/C][C]0.2928[/C][C]0.3486[/C][C]0.4978[/C][C]0.4978[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200962&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200962&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[65])
53196-------
54186-------
55247-------
56343-------
57464-------
58680-------
59711-------
60610-------
61513-------
62292-------
63273-------
64322-------
65189-------
66257256.3471158.9137413.51890.49680.79950.80980.7995
67324324.5547186.7152564.15170.49820.70970.73710.8663
68404465.8932241.994896.94990.38920.74060.71180.896
69677598.9485295.11841215.57740.4020.73230.6660.9037
70858770.6326357.76841659.94160.42370.58170.57920.9001
71895666.7536298.04241491.6010.29380.32480.45810.8719
72664577.3518248.15431343.25730.41230.20810.46670.8398
73628525.4405219.64751256.95840.39170.35520.51330.8163
74308344.5086140.1213847.02430.44340.13440.58110.7279
75324268.3243106.8655673.72470.39390.42390.4910.6493
76248250.133597.6701640.59250.49570.35540.35910.6205
77272188.149472.3096489.56390.29280.34860.49780.4978







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
660.31280.002500.426300
670.3766-0.00170.00210.30760.3670.6058
680.4721-0.13280.04573830.76571277.166635.7375
690.52530.13030.06696092.04062480.885149.8085
700.58880.11340.07627633.05653511.319359.2564
710.63120.34230.120552096.413111608.835107.7443
720.67680.15010.12477507.914911022.9892104.9904
730.71030.19520.133510518.446410959.9214104.6896
740.7442-0.1060.13051332.87839890.249999.4497
750.77080.20750.13823099.78169211.203195.975
760.7964-0.00850.12644.55188374.234891.5108
770.81730.44570.1537030.92748262.292590.8972

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
66 & 0.3128 & 0.0025 & 0 & 0.4263 & 0 & 0 \tabularnewline
67 & 0.3766 & -0.0017 & 0.0021 & 0.3076 & 0.367 & 0.6058 \tabularnewline
68 & 0.4721 & -0.1328 & 0.0457 & 3830.7657 & 1277.1666 & 35.7375 \tabularnewline
69 & 0.5253 & 0.1303 & 0.0669 & 6092.0406 & 2480.8851 & 49.8085 \tabularnewline
70 & 0.5888 & 0.1134 & 0.0762 & 7633.0565 & 3511.3193 & 59.2564 \tabularnewline
71 & 0.6312 & 0.3423 & 0.1205 & 52096.4131 & 11608.835 & 107.7443 \tabularnewline
72 & 0.6768 & 0.1501 & 0.1247 & 7507.9149 & 11022.9892 & 104.9904 \tabularnewline
73 & 0.7103 & 0.1952 & 0.1335 & 10518.4464 & 10959.9214 & 104.6896 \tabularnewline
74 & 0.7442 & -0.106 & 0.1305 & 1332.8783 & 9890.2499 & 99.4497 \tabularnewline
75 & 0.7708 & 0.2075 & 0.1382 & 3099.7816 & 9211.2031 & 95.975 \tabularnewline
76 & 0.7964 & -0.0085 & 0.1264 & 4.5518 & 8374.2348 & 91.5108 \tabularnewline
77 & 0.8173 & 0.4457 & 0.153 & 7030.9274 & 8262.2925 & 90.8972 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=200962&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]66[/C][C]0.3128[/C][C]0.0025[/C][C]0[/C][C]0.4263[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]67[/C][C]0.3766[/C][C]-0.0017[/C][C]0.0021[/C][C]0.3076[/C][C]0.367[/C][C]0.6058[/C][/ROW]
[ROW][C]68[/C][C]0.4721[/C][C]-0.1328[/C][C]0.0457[/C][C]3830.7657[/C][C]1277.1666[/C][C]35.7375[/C][/ROW]
[ROW][C]69[/C][C]0.5253[/C][C]0.1303[/C][C]0.0669[/C][C]6092.0406[/C][C]2480.8851[/C][C]49.8085[/C][/ROW]
[ROW][C]70[/C][C]0.5888[/C][C]0.1134[/C][C]0.0762[/C][C]7633.0565[/C][C]3511.3193[/C][C]59.2564[/C][/ROW]
[ROW][C]71[/C][C]0.6312[/C][C]0.3423[/C][C]0.1205[/C][C]52096.4131[/C][C]11608.835[/C][C]107.7443[/C][/ROW]
[ROW][C]72[/C][C]0.6768[/C][C]0.1501[/C][C]0.1247[/C][C]7507.9149[/C][C]11022.9892[/C][C]104.9904[/C][/ROW]
[ROW][C]73[/C][C]0.7103[/C][C]0.1952[/C][C]0.1335[/C][C]10518.4464[/C][C]10959.9214[/C][C]104.6896[/C][/ROW]
[ROW][C]74[/C][C]0.7442[/C][C]-0.106[/C][C]0.1305[/C][C]1332.8783[/C][C]9890.2499[/C][C]99.4497[/C][/ROW]
[ROW][C]75[/C][C]0.7708[/C][C]0.2075[/C][C]0.1382[/C][C]3099.7816[/C][C]9211.2031[/C][C]95.975[/C][/ROW]
[ROW][C]76[/C][C]0.7964[/C][C]-0.0085[/C][C]0.1264[/C][C]4.5518[/C][C]8374.2348[/C][C]91.5108[/C][/ROW]
[ROW][C]77[/C][C]0.8173[/C][C]0.4457[/C][C]0.153[/C][C]7030.9274[/C][C]8262.2925[/C][C]90.8972[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=200962&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=200962&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
660.31280.002500.426300
670.3766-0.00170.00210.30760.3670.6058
680.4721-0.13280.04573830.76571277.166635.7375
690.52530.13030.06696092.04062480.885149.8085
700.58880.11340.07627633.05653511.319359.2564
710.63120.34230.120552096.413111608.835107.7443
720.67680.15010.12477507.914911022.9892104.9904
730.71030.19520.133510518.446410959.9214104.6896
740.7442-0.1060.13051332.87839890.249999.4497
750.77080.20750.13823099.78169211.203195.975
760.7964-0.00850.12644.55188374.234891.5108
770.81730.44570.1537030.92748262.292590.8972



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