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 computationFri, 24 Dec 2010 16:14:37 +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/24/t12932071609gt76b1tmxxqbqu.htm/, Retrieved Tue, 30 Apr 2024 03:30:25 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115178, Retrieved Tue, 30 Apr 2024 03:30:25 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact103
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]
-   PD        [ARIMA Forecasting] [] [2010-12-24 16:14:37] [7b390cc0228d34e5578246b07143e3df] [Current]
Feedback Forum

Post a new message
Dataseries X:
3010
2910
3840
3580
3140
3550
3250
2820
2260
2060
2120
2210
2190
2180
2350
2440
2370
2440
2610
3040
3190
3120
3170
3600
3420
3650
4180
2960
2710
2950
3030
3770
4740
4450
5550
5580
5890
7480
10450
6360
6710
6200
4490
3480
2520
1920
2010
1950
2240
2370
2840
2700
2980
3290
3300
3000
2330
2190
1970
2170
2830
3190
3550
3240
3450
3570
3230
3260
2700




Summary of computational 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 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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115178&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115178&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115178&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'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[57])
452520-------
461920-------
472010-------
481950-------
492240-------
502370-------
512840-------
522700-------
532980-------
543290-------
553300-------
563000-------
572330-------
5821901987.37751765.73552285.54190.09140.01220.67110.0122
5919702018.40831667.58742603.49610.43560.28270.51120.1483
6021702002.19231566.87492875.46290.35320.52880.54660.2309
6128302186.25661597.98713743.60430.20890.50820.4730.4282
6231902302.21541603.69964658.90480.23020.33040.47750.4908
6335502577.89251682.3317301.36780.34330.39980.45670.541
6432402589.93091666.54678125.98740.4090.3670.48450.5367
6534502785.12791723.273313111.8080.44980.46560.48520.5344
6635702981.17641780.306432174.91690.48420.48740.49170.5174
6732303039.02061795.781565791.54480.49760.49340.49670.5088
6832602938.71921764.970725654.50010.48890.490.49790.5209
6927002579.99721646.09618683.26850.48460.41360.5320.532

\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[57]) \tabularnewline
45 & 2520 & - & - & - & - & - & - & - \tabularnewline
46 & 1920 & - & - & - & - & - & - & - \tabularnewline
47 & 2010 & - & - & - & - & - & - & - \tabularnewline
48 & 1950 & - & - & - & - & - & - & - \tabularnewline
49 & 2240 & - & - & - & - & - & - & - \tabularnewline
50 & 2370 & - & - & - & - & - & - & - \tabularnewline
51 & 2840 & - & - & - & - & - & - & - \tabularnewline
52 & 2700 & - & - & - & - & - & - & - \tabularnewline
53 & 2980 & - & - & - & - & - & - & - \tabularnewline
54 & 3290 & - & - & - & - & - & - & - \tabularnewline
55 & 3300 & - & - & - & - & - & - & - \tabularnewline
56 & 3000 & - & - & - & - & - & - & - \tabularnewline
57 & 2330 & - & - & - & - & - & - & - \tabularnewline
58 & 2190 & 1987.3775 & 1765.7355 & 2285.5419 & 0.0914 & 0.0122 & 0.6711 & 0.0122 \tabularnewline
59 & 1970 & 2018.4083 & 1667.5874 & 2603.4961 & 0.4356 & 0.2827 & 0.5112 & 0.1483 \tabularnewline
60 & 2170 & 2002.1923 & 1566.8749 & 2875.4629 & 0.3532 & 0.5288 & 0.5466 & 0.2309 \tabularnewline
61 & 2830 & 2186.2566 & 1597.9871 & 3743.6043 & 0.2089 & 0.5082 & 0.473 & 0.4282 \tabularnewline
62 & 3190 & 2302.2154 & 1603.6996 & 4658.9048 & 0.2302 & 0.3304 & 0.4775 & 0.4908 \tabularnewline
63 & 3550 & 2577.8925 & 1682.331 & 7301.3678 & 0.3433 & 0.3998 & 0.4567 & 0.541 \tabularnewline
64 & 3240 & 2589.9309 & 1666.5467 & 8125.9874 & 0.409 & 0.367 & 0.4845 & 0.5367 \tabularnewline
65 & 3450 & 2785.1279 & 1723.2733 & 13111.808 & 0.4498 & 0.4656 & 0.4852 & 0.5344 \tabularnewline
66 & 3570 & 2981.1764 & 1780.3064 & 32174.9169 & 0.4842 & 0.4874 & 0.4917 & 0.5174 \tabularnewline
67 & 3230 & 3039.0206 & 1795.7815 & 65791.5448 & 0.4976 & 0.4934 & 0.4967 & 0.5088 \tabularnewline
68 & 3260 & 2938.7192 & 1764.9707 & 25654.5001 & 0.4889 & 0.49 & 0.4979 & 0.5209 \tabularnewline
69 & 2700 & 2579.9972 & 1646.0961 & 8683.2685 & 0.4846 & 0.4136 & 0.532 & 0.532 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115178&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[57])[/C][/ROW]
[ROW][C]45[/C][C]2520[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]1920[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]2010[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]1950[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]2240[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]2370[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]2840[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]2700[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]2980[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]3290[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]3300[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]3000[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]2330[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]2190[/C][C]1987.3775[/C][C]1765.7355[/C][C]2285.5419[/C][C]0.0914[/C][C]0.0122[/C][C]0.6711[/C][C]0.0122[/C][/ROW]
[ROW][C]59[/C][C]1970[/C][C]2018.4083[/C][C]1667.5874[/C][C]2603.4961[/C][C]0.4356[/C][C]0.2827[/C][C]0.5112[/C][C]0.1483[/C][/ROW]
[ROW][C]60[/C][C]2170[/C][C]2002.1923[/C][C]1566.8749[/C][C]2875.4629[/C][C]0.3532[/C][C]0.5288[/C][C]0.5466[/C][C]0.2309[/C][/ROW]
[ROW][C]61[/C][C]2830[/C][C]2186.2566[/C][C]1597.9871[/C][C]3743.6043[/C][C]0.2089[/C][C]0.5082[/C][C]0.473[/C][C]0.4282[/C][/ROW]
[ROW][C]62[/C][C]3190[/C][C]2302.2154[/C][C]1603.6996[/C][C]4658.9048[/C][C]0.2302[/C][C]0.3304[/C][C]0.4775[/C][C]0.4908[/C][/ROW]
[ROW][C]63[/C][C]3550[/C][C]2577.8925[/C][C]1682.331[/C][C]7301.3678[/C][C]0.3433[/C][C]0.3998[/C][C]0.4567[/C][C]0.541[/C][/ROW]
[ROW][C]64[/C][C]3240[/C][C]2589.9309[/C][C]1666.5467[/C][C]8125.9874[/C][C]0.409[/C][C]0.367[/C][C]0.4845[/C][C]0.5367[/C][/ROW]
[ROW][C]65[/C][C]3450[/C][C]2785.1279[/C][C]1723.2733[/C][C]13111.808[/C][C]0.4498[/C][C]0.4656[/C][C]0.4852[/C][C]0.5344[/C][/ROW]
[ROW][C]66[/C][C]3570[/C][C]2981.1764[/C][C]1780.3064[/C][C]32174.9169[/C][C]0.4842[/C][C]0.4874[/C][C]0.4917[/C][C]0.5174[/C][/ROW]
[ROW][C]67[/C][C]3230[/C][C]3039.0206[/C][C]1795.7815[/C][C]65791.5448[/C][C]0.4976[/C][C]0.4934[/C][C]0.4967[/C][C]0.5088[/C][/ROW]
[ROW][C]68[/C][C]3260[/C][C]2938.7192[/C][C]1764.9707[/C][C]25654.5001[/C][C]0.4889[/C][C]0.49[/C][C]0.4979[/C][C]0.5209[/C][/ROW]
[ROW][C]69[/C][C]2700[/C][C]2579.9972[/C][C]1646.0961[/C][C]8683.2685[/C][C]0.4846[/C][C]0.4136[/C][C]0.532[/C][C]0.532[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115178&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115178&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[57])
452520-------
461920-------
472010-------
481950-------
492240-------
502370-------
512840-------
522700-------
532980-------
543290-------
553300-------
563000-------
572330-------
5821901987.37751765.73552285.54190.09140.01220.67110.0122
5919702018.40831667.58742603.49610.43560.28270.51120.1483
6021702002.19231566.87492875.46290.35320.52880.54660.2309
6128302186.25661597.98713743.60430.20890.50820.4730.4282
6231902302.21541603.69964658.90480.23020.33040.47750.4908
6335502577.89251682.3317301.36780.34330.39980.45670.541
6432402589.93091666.54678125.98740.4090.3670.48450.5367
6534502785.12791723.273313111.8080.44980.46560.48520.5344
6635702981.17641780.306432174.91690.48420.48740.49170.5174
6732303039.02061795.781565791.54480.49760.49340.49670.5088
6832602938.71921764.970725654.50010.48890.490.49790.5209
6927002579.99721646.09618683.26850.48460.41360.5320.532







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
580.07650.102041055.8700
590.1479-0.0240.0632343.365521699.6178147.3079
600.22250.08380.069928159.410723852.8821154.4438
610.36340.29450.1261414405.6055121491.0629348.5557
620.52230.38560.178788161.5338254825.1571504.8021
630.93480.37710.2112944992.9857369853.1285608.1555
641.09060.2510.2168422589.8005377386.9388614.3183
651.89170.23870.2196442054.9484385470.44620.8627
664.99630.19750.2171346713.2085381164.081617.3849
6710.53520.06280.201736473.1305346694.9859588.8081
683.94380.10930.1933103221.3817324561.0219569.7026
691.20690.04650.181114400.6622298714.3253546.5476

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
58 & 0.0765 & 0.102 & 0 & 41055.87 & 0 & 0 \tabularnewline
59 & 0.1479 & -0.024 & 0.063 & 2343.3655 & 21699.6178 & 147.3079 \tabularnewline
60 & 0.2225 & 0.0838 & 0.0699 & 28159.4107 & 23852.8821 & 154.4438 \tabularnewline
61 & 0.3634 & 0.2945 & 0.1261 & 414405.6055 & 121491.0629 & 348.5557 \tabularnewline
62 & 0.5223 & 0.3856 & 0.178 & 788161.5338 & 254825.1571 & 504.8021 \tabularnewline
63 & 0.9348 & 0.3771 & 0.2112 & 944992.9857 & 369853.1285 & 608.1555 \tabularnewline
64 & 1.0906 & 0.251 & 0.2168 & 422589.8005 & 377386.9388 & 614.3183 \tabularnewline
65 & 1.8917 & 0.2387 & 0.2196 & 442054.9484 & 385470.44 & 620.8627 \tabularnewline
66 & 4.9963 & 0.1975 & 0.2171 & 346713.2085 & 381164.081 & 617.3849 \tabularnewline
67 & 10.5352 & 0.0628 & 0.2017 & 36473.1305 & 346694.9859 & 588.8081 \tabularnewline
68 & 3.9438 & 0.1093 & 0.1933 & 103221.3817 & 324561.0219 & 569.7026 \tabularnewline
69 & 1.2069 & 0.0465 & 0.1811 & 14400.6622 & 298714.3253 & 546.5476 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115178&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]58[/C][C]0.0765[/C][C]0.102[/C][C]0[/C][C]41055.87[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]59[/C][C]0.1479[/C][C]-0.024[/C][C]0.063[/C][C]2343.3655[/C][C]21699.6178[/C][C]147.3079[/C][/ROW]
[ROW][C]60[/C][C]0.2225[/C][C]0.0838[/C][C]0.0699[/C][C]28159.4107[/C][C]23852.8821[/C][C]154.4438[/C][/ROW]
[ROW][C]61[/C][C]0.3634[/C][C]0.2945[/C][C]0.1261[/C][C]414405.6055[/C][C]121491.0629[/C][C]348.5557[/C][/ROW]
[ROW][C]62[/C][C]0.5223[/C][C]0.3856[/C][C]0.178[/C][C]788161.5338[/C][C]254825.1571[/C][C]504.8021[/C][/ROW]
[ROW][C]63[/C][C]0.9348[/C][C]0.3771[/C][C]0.2112[/C][C]944992.9857[/C][C]369853.1285[/C][C]608.1555[/C][/ROW]
[ROW][C]64[/C][C]1.0906[/C][C]0.251[/C][C]0.2168[/C][C]422589.8005[/C][C]377386.9388[/C][C]614.3183[/C][/ROW]
[ROW][C]65[/C][C]1.8917[/C][C]0.2387[/C][C]0.2196[/C][C]442054.9484[/C][C]385470.44[/C][C]620.8627[/C][/ROW]
[ROW][C]66[/C][C]4.9963[/C][C]0.1975[/C][C]0.2171[/C][C]346713.2085[/C][C]381164.081[/C][C]617.3849[/C][/ROW]
[ROW][C]67[/C][C]10.5352[/C][C]0.0628[/C][C]0.2017[/C][C]36473.1305[/C][C]346694.9859[/C][C]588.8081[/C][/ROW]
[ROW][C]68[/C][C]3.9438[/C][C]0.1093[/C][C]0.1933[/C][C]103221.3817[/C][C]324561.0219[/C][C]569.7026[/C][/ROW]
[ROW][C]69[/C][C]1.2069[/C][C]0.0465[/C][C]0.1811[/C][C]14400.6622[/C][C]298714.3253[/C][C]546.5476[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115178&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115178&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
580.07650.102041055.8700
590.1479-0.0240.0632343.365521699.6178147.3079
600.22250.08380.069928159.410723852.8821154.4438
610.36340.29450.1261414405.6055121491.0629348.5557
620.52230.38560.178788161.5338254825.1571504.8021
630.93480.37710.2112944992.9857369853.1285608.1555
641.09060.2510.2168422589.8005377386.9388614.3183
651.89170.23870.2196442054.9484385470.44620.8627
664.99630.19750.2171346713.2085381164.081617.3849
6710.53520.06280.201736473.1305346694.9859588.8081
683.94380.10930.1933103221.3817324561.0219569.7026
691.20690.04650.181114400.6622298714.3253546.5476



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