Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 19 Dec 2007 07:05:00 -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/2007/Dec/19/t1198072050omylwb7rhw3c7y8.htm/, Retrieved Mon, 06 May 2024 18:34:20 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4653, Retrieved Mon, 06 May 2024 18:34:20 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact218
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-19 14:05:00] [e2f7a6e26aa7cf06a3d27eb5298a4843] [Current]
Feedback Forum

Post a new message
Dataseries X:
25.62
27.5
24.5
25.66
28.31
27.85
24.61
25.68
25.62
20.54
18.8
18.71
19.46
20.12
23.54
25.6
25.39
24.09
25.69
26.56
28.33
27.5
24.23
28.23
31.29
32.72
30.46
24.89
25.68
27.52
28.4
29.71
26.85
29.62
28.69
29.76
31.3
30.86
33.46
33.15
37.99
35.24
38.24
43.16
43.33
49.67
43.17
39.56
44.36
45.22
53.1
52.1
48.52
54.84
57.57
64.14
62.85
58.75
55.33
57.03
63.18
60.19
62.12
70.12
69.75
68.56
73.77
73.23
61.96
57.81
58.76
62.47
53.68
57.56
62.05
67.49
67.21
71.05
76.93
70.76




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4653&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]2 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=4653&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4653&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 time2 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[68])
5664.14-------
5762.85-------
5858.75-------
5955.33-------
6057.03-------
6163.18-------
6260.19-------
6362.12-------
6470.12-------
6569.75-------
6668.56-------
6773.77-------
6873.23-------
6961.9672.425363.327682.40080.01990.43720.970.4372
7057.8173.290260.729387.56560.01680.94010.97710.5033
7158.7671.81357.739588.12780.05840.95370.97620.4324
7262.4771.348556.001989.4210.16780.91390.93980.4192
7353.6873.082756.161993.28460.02990.84840.83170.4943
7457.5672.830254.734694.74710.0860.95660.87080.4857
7562.0574.47954.954698.40630.15430.91710.84430.5407
7667.4975.366754.6215101.08180.27410.84490.65540.5647
7767.2174.695753.1117101.77590.2940.6990.63980.5422
7871.0575.625452.9189104.40270.37770.71670.68480.5648
7976.9376.729552.8949107.22080.49490.64250.57540.589
8070.7677.684652.7845109.82790.33640.51840.6070.607

\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[68]) \tabularnewline
56 & 64.14 & - & - & - & - & - & - & - \tabularnewline
57 & 62.85 & - & - & - & - & - & - & - \tabularnewline
58 & 58.75 & - & - & - & - & - & - & - \tabularnewline
59 & 55.33 & - & - & - & - & - & - & - \tabularnewline
60 & 57.03 & - & - & - & - & - & - & - \tabularnewline
61 & 63.18 & - & - & - & - & - & - & - \tabularnewline
62 & 60.19 & - & - & - & - & - & - & - \tabularnewline
63 & 62.12 & - & - & - & - & - & - & - \tabularnewline
64 & 70.12 & - & - & - & - & - & - & - \tabularnewline
65 & 69.75 & - & - & - & - & - & - & - \tabularnewline
66 & 68.56 & - & - & - & - & - & - & - \tabularnewline
67 & 73.77 & - & - & - & - & - & - & - \tabularnewline
68 & 73.23 & - & - & - & - & - & - & - \tabularnewline
69 & 61.96 & 72.4253 & 63.3276 & 82.4008 & 0.0199 & 0.4372 & 0.97 & 0.4372 \tabularnewline
70 & 57.81 & 73.2902 & 60.7293 & 87.5656 & 0.0168 & 0.9401 & 0.9771 & 0.5033 \tabularnewline
71 & 58.76 & 71.813 & 57.7395 & 88.1278 & 0.0584 & 0.9537 & 0.9762 & 0.4324 \tabularnewline
72 & 62.47 & 71.3485 & 56.0019 & 89.421 & 0.1678 & 0.9139 & 0.9398 & 0.4192 \tabularnewline
73 & 53.68 & 73.0827 & 56.1619 & 93.2846 & 0.0299 & 0.8484 & 0.8317 & 0.4943 \tabularnewline
74 & 57.56 & 72.8302 & 54.7346 & 94.7471 & 0.086 & 0.9566 & 0.8708 & 0.4857 \tabularnewline
75 & 62.05 & 74.479 & 54.9546 & 98.4063 & 0.1543 & 0.9171 & 0.8443 & 0.5407 \tabularnewline
76 & 67.49 & 75.3667 & 54.6215 & 101.0818 & 0.2741 & 0.8449 & 0.6554 & 0.5647 \tabularnewline
77 & 67.21 & 74.6957 & 53.1117 & 101.7759 & 0.294 & 0.699 & 0.6398 & 0.5422 \tabularnewline
78 & 71.05 & 75.6254 & 52.9189 & 104.4027 & 0.3777 & 0.7167 & 0.6848 & 0.5648 \tabularnewline
79 & 76.93 & 76.7295 & 52.8949 & 107.2208 & 0.4949 & 0.6425 & 0.5754 & 0.589 \tabularnewline
80 & 70.76 & 77.6846 & 52.7845 & 109.8279 & 0.3364 & 0.5184 & 0.607 & 0.607 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4653&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[68])[/C][/ROW]
[ROW][C]56[/C][C]64.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]62.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]58.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]55.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]57.03[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]63.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]60.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]62.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]70.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]69.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]68.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]73.77[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]73.23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]61.96[/C][C]72.4253[/C][C]63.3276[/C][C]82.4008[/C][C]0.0199[/C][C]0.4372[/C][C]0.97[/C][C]0.4372[/C][/ROW]
[ROW][C]70[/C][C]57.81[/C][C]73.2902[/C][C]60.7293[/C][C]87.5656[/C][C]0.0168[/C][C]0.9401[/C][C]0.9771[/C][C]0.5033[/C][/ROW]
[ROW][C]71[/C][C]58.76[/C][C]71.813[/C][C]57.7395[/C][C]88.1278[/C][C]0.0584[/C][C]0.9537[/C][C]0.9762[/C][C]0.4324[/C][/ROW]
[ROW][C]72[/C][C]62.47[/C][C]71.3485[/C][C]56.0019[/C][C]89.421[/C][C]0.1678[/C][C]0.9139[/C][C]0.9398[/C][C]0.4192[/C][/ROW]
[ROW][C]73[/C][C]53.68[/C][C]73.0827[/C][C]56.1619[/C][C]93.2846[/C][C]0.0299[/C][C]0.8484[/C][C]0.8317[/C][C]0.4943[/C][/ROW]
[ROW][C]74[/C][C]57.56[/C][C]72.8302[/C][C]54.7346[/C][C]94.7471[/C][C]0.086[/C][C]0.9566[/C][C]0.8708[/C][C]0.4857[/C][/ROW]
[ROW][C]75[/C][C]62.05[/C][C]74.479[/C][C]54.9546[/C][C]98.4063[/C][C]0.1543[/C][C]0.9171[/C][C]0.8443[/C][C]0.5407[/C][/ROW]
[ROW][C]76[/C][C]67.49[/C][C]75.3667[/C][C]54.6215[/C][C]101.0818[/C][C]0.2741[/C][C]0.8449[/C][C]0.6554[/C][C]0.5647[/C][/ROW]
[ROW][C]77[/C][C]67.21[/C][C]74.6957[/C][C]53.1117[/C][C]101.7759[/C][C]0.294[/C][C]0.699[/C][C]0.6398[/C][C]0.5422[/C][/ROW]
[ROW][C]78[/C][C]71.05[/C][C]75.6254[/C][C]52.9189[/C][C]104.4027[/C][C]0.3777[/C][C]0.7167[/C][C]0.6848[/C][C]0.5648[/C][/ROW]
[ROW][C]79[/C][C]76.93[/C][C]76.7295[/C][C]52.8949[/C][C]107.2208[/C][C]0.4949[/C][C]0.6425[/C][C]0.5754[/C][C]0.589[/C][/ROW]
[ROW][C]80[/C][C]70.76[/C][C]77.6846[/C][C]52.7845[/C][C]109.8279[/C][C]0.3364[/C][C]0.5184[/C][C]0.607[/C][C]0.607[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4653&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4653&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[68])
5664.14-------
5762.85-------
5858.75-------
5955.33-------
6057.03-------
6163.18-------
6260.19-------
6362.12-------
6470.12-------
6569.75-------
6668.56-------
6773.77-------
6873.23-------
6961.9672.425363.327682.40080.01990.43720.970.4372
7057.8173.290260.729387.56560.01680.94010.97710.5033
7158.7671.81357.739588.12780.05840.95370.97620.4324
7262.4771.348556.001989.4210.16780.91390.93980.4192
7353.6873.082756.161993.28460.02990.84840.83170.4943
7457.5672.830254.734694.74710.0860.95660.87080.4857
7562.0574.47954.954698.40630.15430.91710.84430.5407
7667.4975.366754.6215101.08180.27410.84490.65540.5647
7767.2174.695753.1117101.77590.2940.6990.63980.5422
7871.0575.625452.9189104.40270.37770.71670.68480.5648
7976.9376.729552.8949107.22080.49490.64250.57540.589
8070.7677.684652.7845109.82790.33640.51840.6070.607







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.0703-0.14450.012109.52359.1273.0211
700.0994-0.21120.0176239.637419.96984.4688
710.1159-0.18180.0151170.379814.19833.7681
720.1292-0.12440.010478.82816.5692.563
730.141-0.26550.0221376.466431.37225.6011
740.1535-0.20970.0175233.180319.43174.4081
750.1639-0.16690.0139154.48112.87343.588
760.1741-0.10450.008762.04215.17022.2738
770.185-0.10020.008456.03564.66962.1609
780.1941-0.06050.00520.93451.74451.3208
790.20270.00262e-040.04020.00340.0579
800.2111-0.08910.007447.95043.99591.999

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.0703 & -0.1445 & 0.012 & 109.5235 & 9.127 & 3.0211 \tabularnewline
70 & 0.0994 & -0.2112 & 0.0176 & 239.6374 & 19.9698 & 4.4688 \tabularnewline
71 & 0.1159 & -0.1818 & 0.0151 & 170.3798 & 14.1983 & 3.7681 \tabularnewline
72 & 0.1292 & -0.1244 & 0.0104 & 78.8281 & 6.569 & 2.563 \tabularnewline
73 & 0.141 & -0.2655 & 0.0221 & 376.4664 & 31.3722 & 5.6011 \tabularnewline
74 & 0.1535 & -0.2097 & 0.0175 & 233.1803 & 19.4317 & 4.4081 \tabularnewline
75 & 0.1639 & -0.1669 & 0.0139 & 154.481 & 12.8734 & 3.588 \tabularnewline
76 & 0.1741 & -0.1045 & 0.0087 & 62.0421 & 5.1702 & 2.2738 \tabularnewline
77 & 0.185 & -0.1002 & 0.0084 & 56.0356 & 4.6696 & 2.1609 \tabularnewline
78 & 0.1941 & -0.0605 & 0.005 & 20.9345 & 1.7445 & 1.3208 \tabularnewline
79 & 0.2027 & 0.0026 & 2e-04 & 0.0402 & 0.0034 & 0.0579 \tabularnewline
80 & 0.2111 & -0.0891 & 0.0074 & 47.9504 & 3.9959 & 1.999 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4653&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]69[/C][C]0.0703[/C][C]-0.1445[/C][C]0.012[/C][C]109.5235[/C][C]9.127[/C][C]3.0211[/C][/ROW]
[ROW][C]70[/C][C]0.0994[/C][C]-0.2112[/C][C]0.0176[/C][C]239.6374[/C][C]19.9698[/C][C]4.4688[/C][/ROW]
[ROW][C]71[/C][C]0.1159[/C][C]-0.1818[/C][C]0.0151[/C][C]170.3798[/C][C]14.1983[/C][C]3.7681[/C][/ROW]
[ROW][C]72[/C][C]0.1292[/C][C]-0.1244[/C][C]0.0104[/C][C]78.8281[/C][C]6.569[/C][C]2.563[/C][/ROW]
[ROW][C]73[/C][C]0.141[/C][C]-0.2655[/C][C]0.0221[/C][C]376.4664[/C][C]31.3722[/C][C]5.6011[/C][/ROW]
[ROW][C]74[/C][C]0.1535[/C][C]-0.2097[/C][C]0.0175[/C][C]233.1803[/C][C]19.4317[/C][C]4.4081[/C][/ROW]
[ROW][C]75[/C][C]0.1639[/C][C]-0.1669[/C][C]0.0139[/C][C]154.481[/C][C]12.8734[/C][C]3.588[/C][/ROW]
[ROW][C]76[/C][C]0.1741[/C][C]-0.1045[/C][C]0.0087[/C][C]62.0421[/C][C]5.1702[/C][C]2.2738[/C][/ROW]
[ROW][C]77[/C][C]0.185[/C][C]-0.1002[/C][C]0.0084[/C][C]56.0356[/C][C]4.6696[/C][C]2.1609[/C][/ROW]
[ROW][C]78[/C][C]0.1941[/C][C]-0.0605[/C][C]0.005[/C][C]20.9345[/C][C]1.7445[/C][C]1.3208[/C][/ROW]
[ROW][C]79[/C][C]0.2027[/C][C]0.0026[/C][C]2e-04[/C][C]0.0402[/C][C]0.0034[/C][C]0.0579[/C][/ROW]
[ROW][C]80[/C][C]0.2111[/C][C]-0.0891[/C][C]0.0074[/C][C]47.9504[/C][C]3.9959[/C][C]1.999[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4653&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4653&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
690.0703-0.14450.012109.52359.1273.0211
700.0994-0.21120.0176239.637419.96984.4688
710.1159-0.18180.0151170.379814.19833.7681
720.1292-0.12440.010478.82816.5692.563
730.141-0.26550.0221376.466431.37225.6011
740.1535-0.20970.0175233.180319.43174.4081
750.1639-0.16690.0139154.48112.87343.588
760.1741-0.10450.008762.04215.17022.2738
770.185-0.10020.008456.03564.66962.1609
780.1941-0.06050.00520.93451.74451.3208
790.20270.00262e-040.04020.00340.0579
800.2111-0.08910.007447.95043.99591.999



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