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, 03 Dec 2012 06:53:56 -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/03/t1354535656ecfalvsc56o9g7a.htm/, Retrieved Sun, 05 May 2024 02:11:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=195720, Retrieved Sun, 05 May 2024 02:11:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact119
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [WS 9 - arima fore...] [2012-12-03 11:51:00] [b952eaabb01bdc8fc50f908b86502128]
- R P     [ARIMA Forecasting] [WS 9 - arima fore...] [2012-12-03 11:53:56] [fd3c35a156f52433b5d6e23e16a12a78] [Current]
Feedback Forum

Post a new message
Dataseries X:
8.64
8.89
8.87
8.81
8.87
9.06
9.12
8.66
8.17
8.04
7.71
7.55
7.52
7.38
7.52
7.31
6.92
7.09
7.05
7.37
7.05
6.79
6.35
6.44
6.89
7.16
7.46
7.91
7.86
8.02
8.38
8.50
8.40
8.24
8.33
8.28
8.15
8.06
7.79
7.28
7.52
7.23
7.13
7.21
6.99
6.77
6.69
6.39
6.85
6.74
6.56
6.62
6.71
6.67
6.54
6.14
6.13
5.86
5.88
5.75
5.53
5.86
5.90
5.95
5.69
5.53
5.71
5.60
5.73
5.60
5.41
5.13
5.00
5.04
5.10
4.96
4.90
4.80
4.48
4.29
4.27
4.18
4.02
3.82
4.13
4.16
3.98
4.26
4.70
4.96
5.13
5.35
5.41
5.42
5.51
5.75
5.67
5.46
5.56
5.56
5.54
5.53
5.65
5.58
5.57
5.36
5.23
5.11
5.07
5.04
5.34
5.43
5.31
5.12
4.97
5.00
4.64
4.80
5.10
5.11
5.12
5.36
5.26
5.27
5.10
4.94
4.68
4.41
4.60
4.53
4.18
4.00
3.87
4.09
4.13
3.74
3.81
4.11
4.14
3.99
4.28
4.37
4.24
4.19
4.01
3.95
4.30
4.37
4.40
4.29
4.12
4.07
3.93
3.79
3.67
3.53
3.69
3.69
3.48
3.31
3.16
3.25
3.14
3.19
3.43
3.45
3.31
3.51
3.53
3.83
4.02
3.99
4.11
3.96
3.83
3.71
3.81
3.73
3.99
4.17
4.00
4.10
4.24
4.45
4.62
4.49
4.45
4.49
4.36
4.32
4.45
4.13
4.14
4.30
4.42
4.67
4.96
4.73
4.52
4.36
4.15
3.92
3.88
4.20
3.95
3.78
3.69
3.77
3.66
3.53
3.50
3.14
3.42
3.30
2.81
3.15
3.37
4.05
4.00
4.20
4.21
4.24
4.24
4.17
4.12
4.35
3.98
3.62
4.39
5.01
4.07
3.70
3.59
3.44
3.33
2.98
3.14
2.55
2.49
2.53
2.43




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ jenkins.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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=195720&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=195720&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=195720&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 time1 seconds
R Server'Gwilym Jenkins' @ jenkins.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[229])
2173.37-------
2184.05-------
2194-------
2204.2-------
2214.21-------
2224.24-------
2234.24-------
2244.17-------
2254.12-------
2264.35-------
2273.98-------
2283.62-------
2294.39-------
2305.014.38783.97454.80120.00160.49590.94540.4959
2314.074.38573.80134.97010.14490.01810.90210.4942
2323.74.38353.66795.09910.03060.80480.69240.4929
2333.594.38143.55535.20740.03020.9470.65780.4918
2343.444.37923.45585.30260.02310.95310.61620.4909
2353.334.3773.36585.38830.02120.96530.60470.49
2362.984.37493.28295.46690.00610.96960.64350.4892
2373.144.37273.20565.53980.01920.99030.66440.4884
2382.554.37063.1335.60820.0020.97430.5130.4877
2392.494.36843.06425.67270.00240.99690.72030.4871
2402.534.36632.99875.73380.00420.99640.85760.4864
2412.434.36412.93615.79210.0040.99410.48580.4858

\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[229]) \tabularnewline
217 & 3.37 & - & - & - & - & - & - & - \tabularnewline
218 & 4.05 & - & - & - & - & - & - & - \tabularnewline
219 & 4 & - & - & - & - & - & - & - \tabularnewline
220 & 4.2 & - & - & - & - & - & - & - \tabularnewline
221 & 4.21 & - & - & - & - & - & - & - \tabularnewline
222 & 4.24 & - & - & - & - & - & - & - \tabularnewline
223 & 4.24 & - & - & - & - & - & - & - \tabularnewline
224 & 4.17 & - & - & - & - & - & - & - \tabularnewline
225 & 4.12 & - & - & - & - & - & - & - \tabularnewline
226 & 4.35 & - & - & - & - & - & - & - \tabularnewline
227 & 3.98 & - & - & - & - & - & - & - \tabularnewline
228 & 3.62 & - & - & - & - & - & - & - \tabularnewline
229 & 4.39 & - & - & - & - & - & - & - \tabularnewline
230 & 5.01 & 4.3878 & 3.9745 & 4.8012 & 0.0016 & 0.4959 & 0.9454 & 0.4959 \tabularnewline
231 & 4.07 & 4.3857 & 3.8013 & 4.9701 & 0.1449 & 0.0181 & 0.9021 & 0.4942 \tabularnewline
232 & 3.7 & 4.3835 & 3.6679 & 5.0991 & 0.0306 & 0.8048 & 0.6924 & 0.4929 \tabularnewline
233 & 3.59 & 4.3814 & 3.5553 & 5.2074 & 0.0302 & 0.947 & 0.6578 & 0.4918 \tabularnewline
234 & 3.44 & 4.3792 & 3.4558 & 5.3026 & 0.0231 & 0.9531 & 0.6162 & 0.4909 \tabularnewline
235 & 3.33 & 4.377 & 3.3658 & 5.3883 & 0.0212 & 0.9653 & 0.6047 & 0.49 \tabularnewline
236 & 2.98 & 4.3749 & 3.2829 & 5.4669 & 0.0061 & 0.9696 & 0.6435 & 0.4892 \tabularnewline
237 & 3.14 & 4.3727 & 3.2056 & 5.5398 & 0.0192 & 0.9903 & 0.6644 & 0.4884 \tabularnewline
238 & 2.55 & 4.3706 & 3.133 & 5.6082 & 0.002 & 0.9743 & 0.513 & 0.4877 \tabularnewline
239 & 2.49 & 4.3684 & 3.0642 & 5.6727 & 0.0024 & 0.9969 & 0.7203 & 0.4871 \tabularnewline
240 & 2.53 & 4.3663 & 2.9987 & 5.7338 & 0.0042 & 0.9964 & 0.8576 & 0.4864 \tabularnewline
241 & 2.43 & 4.3641 & 2.9361 & 5.7921 & 0.004 & 0.9941 & 0.4858 & 0.4858 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=195720&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[229])[/C][/ROW]
[ROW][C]217[/C][C]3.37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]218[/C][C]4.05[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]219[/C][C]4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]220[/C][C]4.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]221[/C][C]4.21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]222[/C][C]4.24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]223[/C][C]4.24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]224[/C][C]4.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]225[/C][C]4.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]226[/C][C]4.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]227[/C][C]3.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]228[/C][C]3.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]229[/C][C]4.39[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]230[/C][C]5.01[/C][C]4.3878[/C][C]3.9745[/C][C]4.8012[/C][C]0.0016[/C][C]0.4959[/C][C]0.9454[/C][C]0.4959[/C][/ROW]
[ROW][C]231[/C][C]4.07[/C][C]4.3857[/C][C]3.8013[/C][C]4.9701[/C][C]0.1449[/C][C]0.0181[/C][C]0.9021[/C][C]0.4942[/C][/ROW]
[ROW][C]232[/C][C]3.7[/C][C]4.3835[/C][C]3.6679[/C][C]5.0991[/C][C]0.0306[/C][C]0.8048[/C][C]0.6924[/C][C]0.4929[/C][/ROW]
[ROW][C]233[/C][C]3.59[/C][C]4.3814[/C][C]3.5553[/C][C]5.2074[/C][C]0.0302[/C][C]0.947[/C][C]0.6578[/C][C]0.4918[/C][/ROW]
[ROW][C]234[/C][C]3.44[/C][C]4.3792[/C][C]3.4558[/C][C]5.3026[/C][C]0.0231[/C][C]0.9531[/C][C]0.6162[/C][C]0.4909[/C][/ROW]
[ROW][C]235[/C][C]3.33[/C][C]4.377[/C][C]3.3658[/C][C]5.3883[/C][C]0.0212[/C][C]0.9653[/C][C]0.6047[/C][C]0.49[/C][/ROW]
[ROW][C]236[/C][C]2.98[/C][C]4.3749[/C][C]3.2829[/C][C]5.4669[/C][C]0.0061[/C][C]0.9696[/C][C]0.6435[/C][C]0.4892[/C][/ROW]
[ROW][C]237[/C][C]3.14[/C][C]4.3727[/C][C]3.2056[/C][C]5.5398[/C][C]0.0192[/C][C]0.9903[/C][C]0.6644[/C][C]0.4884[/C][/ROW]
[ROW][C]238[/C][C]2.55[/C][C]4.3706[/C][C]3.133[/C][C]5.6082[/C][C]0.002[/C][C]0.9743[/C][C]0.513[/C][C]0.4877[/C][/ROW]
[ROW][C]239[/C][C]2.49[/C][C]4.3684[/C][C]3.0642[/C][C]5.6727[/C][C]0.0024[/C][C]0.9969[/C][C]0.7203[/C][C]0.4871[/C][/ROW]
[ROW][C]240[/C][C]2.53[/C][C]4.3663[/C][C]2.9987[/C][C]5.7338[/C][C]0.0042[/C][C]0.9964[/C][C]0.8576[/C][C]0.4864[/C][/ROW]
[ROW][C]241[/C][C]2.43[/C][C]4.3641[/C][C]2.9361[/C][C]5.7921[/C][C]0.004[/C][C]0.9941[/C][C]0.4858[/C][C]0.4858[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=195720&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=195720&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[229])
2173.37-------
2184.05-------
2194-------
2204.2-------
2214.21-------
2224.24-------
2234.24-------
2244.17-------
2254.12-------
2264.35-------
2273.98-------
2283.62-------
2294.39-------
2305.014.38783.97454.80120.00160.49590.94540.4959
2314.074.38573.80134.97010.14490.01810.90210.4942
2323.74.38353.66795.09910.03060.80480.69240.4929
2333.594.38143.55535.20740.03020.9470.65780.4918
2343.444.37923.45585.30260.02310.95310.61620.4909
2353.334.3773.36585.38830.02120.96530.60470.49
2362.984.37493.28295.46690.00610.96960.64350.4892
2373.144.37273.20565.53980.01920.99030.66440.4884
2382.554.37063.1335.60820.0020.97430.5130.4877
2392.494.36843.06425.67270.00240.99690.72030.4871
2402.534.36632.99875.73380.00420.99640.85760.4864
2412.434.36412.93615.79210.0040.99410.48580.4858







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
2300.04810.141800.387100
2310.068-0.0720.10690.09970.24340.4933
2320.0833-0.15590.12320.46720.3180.5639
2330.0962-0.18060.13760.62620.3950.6285
2340.1076-0.21450.1530.88210.49250.7017
2350.1179-0.23920.16731.09630.59310.7701
2360.1274-0.31880.1891.94570.78630.8867
2370.1362-0.28190.20061.51960.8780.937
2380.1445-0.41660.22463.31451.14871.0718
2390.1523-0.430.24513.52841.38671.1776
2400.1598-0.42060.26113.37191.56711.2519
2410.1669-0.44320.27633.74081.74831.3222

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
230 & 0.0481 & 0.1418 & 0 & 0.3871 & 0 & 0 \tabularnewline
231 & 0.068 & -0.072 & 0.1069 & 0.0997 & 0.2434 & 0.4933 \tabularnewline
232 & 0.0833 & -0.1559 & 0.1232 & 0.4672 & 0.318 & 0.5639 \tabularnewline
233 & 0.0962 & -0.1806 & 0.1376 & 0.6262 & 0.395 & 0.6285 \tabularnewline
234 & 0.1076 & -0.2145 & 0.153 & 0.8821 & 0.4925 & 0.7017 \tabularnewline
235 & 0.1179 & -0.2392 & 0.1673 & 1.0963 & 0.5931 & 0.7701 \tabularnewline
236 & 0.1274 & -0.3188 & 0.189 & 1.9457 & 0.7863 & 0.8867 \tabularnewline
237 & 0.1362 & -0.2819 & 0.2006 & 1.5196 & 0.878 & 0.937 \tabularnewline
238 & 0.1445 & -0.4166 & 0.2246 & 3.3145 & 1.1487 & 1.0718 \tabularnewline
239 & 0.1523 & -0.43 & 0.2451 & 3.5284 & 1.3867 & 1.1776 \tabularnewline
240 & 0.1598 & -0.4206 & 0.2611 & 3.3719 & 1.5671 & 1.2519 \tabularnewline
241 & 0.1669 & -0.4432 & 0.2763 & 3.7408 & 1.7483 & 1.3222 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=195720&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]230[/C][C]0.0481[/C][C]0.1418[/C][C]0[/C][C]0.3871[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]231[/C][C]0.068[/C][C]-0.072[/C][C]0.1069[/C][C]0.0997[/C][C]0.2434[/C][C]0.4933[/C][/ROW]
[ROW][C]232[/C][C]0.0833[/C][C]-0.1559[/C][C]0.1232[/C][C]0.4672[/C][C]0.318[/C][C]0.5639[/C][/ROW]
[ROW][C]233[/C][C]0.0962[/C][C]-0.1806[/C][C]0.1376[/C][C]0.6262[/C][C]0.395[/C][C]0.6285[/C][/ROW]
[ROW][C]234[/C][C]0.1076[/C][C]-0.2145[/C][C]0.153[/C][C]0.8821[/C][C]0.4925[/C][C]0.7017[/C][/ROW]
[ROW][C]235[/C][C]0.1179[/C][C]-0.2392[/C][C]0.1673[/C][C]1.0963[/C][C]0.5931[/C][C]0.7701[/C][/ROW]
[ROW][C]236[/C][C]0.1274[/C][C]-0.3188[/C][C]0.189[/C][C]1.9457[/C][C]0.7863[/C][C]0.8867[/C][/ROW]
[ROW][C]237[/C][C]0.1362[/C][C]-0.2819[/C][C]0.2006[/C][C]1.5196[/C][C]0.878[/C][C]0.937[/C][/ROW]
[ROW][C]238[/C][C]0.1445[/C][C]-0.4166[/C][C]0.2246[/C][C]3.3145[/C][C]1.1487[/C][C]1.0718[/C][/ROW]
[ROW][C]239[/C][C]0.1523[/C][C]-0.43[/C][C]0.2451[/C][C]3.5284[/C][C]1.3867[/C][C]1.1776[/C][/ROW]
[ROW][C]240[/C][C]0.1598[/C][C]-0.4206[/C][C]0.2611[/C][C]3.3719[/C][C]1.5671[/C][C]1.2519[/C][/ROW]
[ROW][C]241[/C][C]0.1669[/C][C]-0.4432[/C][C]0.2763[/C][C]3.7408[/C][C]1.7483[/C][C]1.3222[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=195720&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=195720&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
2300.04810.141800.387100
2310.068-0.0720.10690.09970.24340.4933
2320.0833-0.15590.12320.46720.3180.5639
2330.0962-0.18060.13760.62620.3950.6285
2340.1076-0.21450.1530.88210.49250.7017
2350.1179-0.23920.16731.09630.59310.7701
2360.1274-0.31880.1891.94570.78630.8867
2370.1362-0.28190.20061.51960.8780.937
2380.1445-0.41660.22463.31451.14871.0718
2390.1523-0.430.24513.52841.38671.1776
2400.1598-0.42060.26113.37191.56711.2519
2410.1669-0.44320.27633.74081.74831.3222



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