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, 01 Dec 2011 09:56:27 -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/2011/Dec/01/t1322751409fmdms8cjjbjowdz.htm/, Retrieved Fri, 29 Mar 2024 08:41:13 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=149765, Retrieved Fri, 29 Mar 2024 08:41:13 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact96
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 Backward Selection] [Unemployment] [2010-11-29 17:10:28] [b98453cac15ba1066b407e146608df68]
-    D      [ARIMA Backward Selection] [WS 9 ARMA Parameters] [2010-12-03 21:54:01] [8081b8996d5947580de3eb171e82db4f]
-   PD        [ARIMA Backward Selection] [Workshop 9, ARIMA] [2010-12-05 19:24:43] [3635fb7041b1998c5a1332cf9de22bce]
-   P           [ARIMA Backward Selection] [Workshop 9, ARIMA] [2010-12-06 22:46:35] [3635fb7041b1998c5a1332cf9de22bce]
-   PD            [ARIMA Backward Selection] [] [2011-12-01 14:39:23] [d6b4d011b409693eac2700c83288e3e7]
- RM                  [ARIMA Forecasting] [] [2011-12-01 14:56:27] [e232377fd09030116200e3da7df6eeaf] [Current]
Feedback Forum

Post a new message
Dataseries X:
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
10943
9867
10203
10837
10573
10647
11502
10656
10866
10835
9945
10331




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=149765&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 time5 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[60])
489747-------
4910411-------
509511-------
5110402-------
529701-------
5310540-------
5410112-------
5510915-------
5611183-------
5710384-------
5810834-------
599886-------
6010216-------
611094310500.451210007.629810993.27250.03920.8710.6390.871
6298679694.31739201.364710187.270.246200.7670.019
631020310629.998710137.030811122.96670.04480.99880.81770.9501
641083710051.45979555.452910547.46650.0010.27460.9170.2578
651057310737.942610241.931611233.95360.25730.34770.78290.9804
661064710278.12259779.634410776.61060.07350.12310.74320.5965
671150210932.343810433.851411430.83610.01260.86910.52720.9976
681065611354.141310853.6211854.66260.00310.28130.74861
691086610502.649310002.087711003.2110.07740.27410.67890.8692
701083510945.627110443.370711447.88360.3330.6220.66840.9978
7199459945.97669443.627710448.32560.49853e-040.59250.146
721033110431.13789927.311510934.96410.34840.97070.79870.7987

\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[60]) \tabularnewline
48 & 9747 & - & - & - & - & - & - & - \tabularnewline
49 & 10411 & - & - & - & - & - & - & - \tabularnewline
50 & 9511 & - & - & - & - & - & - & - \tabularnewline
51 & 10402 & - & - & - & - & - & - & - \tabularnewline
52 & 9701 & - & - & - & - & - & - & - \tabularnewline
53 & 10540 & - & - & - & - & - & - & - \tabularnewline
54 & 10112 & - & - & - & - & - & - & - \tabularnewline
55 & 10915 & - & - & - & - & - & - & - \tabularnewline
56 & 11183 & - & - & - & - & - & - & - \tabularnewline
57 & 10384 & - & - & - & - & - & - & - \tabularnewline
58 & 10834 & - & - & - & - & - & - & - \tabularnewline
59 & 9886 & - & - & - & - & - & - & - \tabularnewline
60 & 10216 & - & - & - & - & - & - & - \tabularnewline
61 & 10943 & 10500.4512 & 10007.6298 & 10993.2725 & 0.0392 & 0.871 & 0.639 & 0.871 \tabularnewline
62 & 9867 & 9694.3173 & 9201.3647 & 10187.27 & 0.2462 & 0 & 0.767 & 0.019 \tabularnewline
63 & 10203 & 10629.9987 & 10137.0308 & 11122.9667 & 0.0448 & 0.9988 & 0.8177 & 0.9501 \tabularnewline
64 & 10837 & 10051.4597 & 9555.4529 & 10547.4665 & 0.001 & 0.2746 & 0.917 & 0.2578 \tabularnewline
65 & 10573 & 10737.9426 & 10241.9316 & 11233.9536 & 0.2573 & 0.3477 & 0.7829 & 0.9804 \tabularnewline
66 & 10647 & 10278.1225 & 9779.6344 & 10776.6106 & 0.0735 & 0.1231 & 0.7432 & 0.5965 \tabularnewline
67 & 11502 & 10932.3438 & 10433.8514 & 11430.8361 & 0.0126 & 0.8691 & 0.5272 & 0.9976 \tabularnewline
68 & 10656 & 11354.1413 & 10853.62 & 11854.6626 & 0.0031 & 0.2813 & 0.7486 & 1 \tabularnewline
69 & 10866 & 10502.6493 & 10002.0877 & 11003.211 & 0.0774 & 0.2741 & 0.6789 & 0.8692 \tabularnewline
70 & 10835 & 10945.6271 & 10443.3707 & 11447.8836 & 0.333 & 0.622 & 0.6684 & 0.9978 \tabularnewline
71 & 9945 & 9945.9766 & 9443.6277 & 10448.3256 & 0.4985 & 3e-04 & 0.5925 & 0.146 \tabularnewline
72 & 10331 & 10431.1378 & 9927.3115 & 10934.9641 & 0.3484 & 0.9707 & 0.7987 & 0.7987 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=149765&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[60])[/C][/ROW]
[ROW][C]48[/C][C]9747[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]10411[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]9511[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]10402[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]9701[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]10540[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]10112[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]10915[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]11183[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]10384[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]10834[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]9886[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]10216[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]10943[/C][C]10500.4512[/C][C]10007.6298[/C][C]10993.2725[/C][C]0.0392[/C][C]0.871[/C][C]0.639[/C][C]0.871[/C][/ROW]
[ROW][C]62[/C][C]9867[/C][C]9694.3173[/C][C]9201.3647[/C][C]10187.27[/C][C]0.2462[/C][C]0[/C][C]0.767[/C][C]0.019[/C][/ROW]
[ROW][C]63[/C][C]10203[/C][C]10629.9987[/C][C]10137.0308[/C][C]11122.9667[/C][C]0.0448[/C][C]0.9988[/C][C]0.8177[/C][C]0.9501[/C][/ROW]
[ROW][C]64[/C][C]10837[/C][C]10051.4597[/C][C]9555.4529[/C][C]10547.4665[/C][C]0.001[/C][C]0.2746[/C][C]0.917[/C][C]0.2578[/C][/ROW]
[ROW][C]65[/C][C]10573[/C][C]10737.9426[/C][C]10241.9316[/C][C]11233.9536[/C][C]0.2573[/C][C]0.3477[/C][C]0.7829[/C][C]0.9804[/C][/ROW]
[ROW][C]66[/C][C]10647[/C][C]10278.1225[/C][C]9779.6344[/C][C]10776.6106[/C][C]0.0735[/C][C]0.1231[/C][C]0.7432[/C][C]0.5965[/C][/ROW]
[ROW][C]67[/C][C]11502[/C][C]10932.3438[/C][C]10433.8514[/C][C]11430.8361[/C][C]0.0126[/C][C]0.8691[/C][C]0.5272[/C][C]0.9976[/C][/ROW]
[ROW][C]68[/C][C]10656[/C][C]11354.1413[/C][C]10853.62[/C][C]11854.6626[/C][C]0.0031[/C][C]0.2813[/C][C]0.7486[/C][C]1[/C][/ROW]
[ROW][C]69[/C][C]10866[/C][C]10502.6493[/C][C]10002.0877[/C][C]11003.211[/C][C]0.0774[/C][C]0.2741[/C][C]0.6789[/C][C]0.8692[/C][/ROW]
[ROW][C]70[/C][C]10835[/C][C]10945.6271[/C][C]10443.3707[/C][C]11447.8836[/C][C]0.333[/C][C]0.622[/C][C]0.6684[/C][C]0.9978[/C][/ROW]
[ROW][C]71[/C][C]9945[/C][C]9945.9766[/C][C]9443.6277[/C][C]10448.3256[/C][C]0.4985[/C][C]3e-04[/C][C]0.5925[/C][C]0.146[/C][/ROW]
[ROW][C]72[/C][C]10331[/C][C]10431.1378[/C][C]9927.3115[/C][C]10934.9641[/C][C]0.3484[/C][C]0.9707[/C][C]0.7987[/C][C]0.7987[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=149765&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=149765&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[60])
489747-------
4910411-------
509511-------
5110402-------
529701-------
5310540-------
5410112-------
5510915-------
5611183-------
5710384-------
5810834-------
599886-------
6010216-------
611094310500.451210007.629810993.27250.03920.8710.6390.871
6298679694.31739201.364710187.270.246200.7670.019
631020310629.998710137.030811122.96670.04480.99880.81770.9501
641083710051.45979555.452910547.46650.0010.27460.9170.2578
651057310737.942610241.931611233.95360.25730.34770.78290.9804
661064710278.12259779.634410776.61060.07350.12310.74320.5965
671150210932.343810433.851411430.83610.01260.86910.52720.9976
681065611354.141310853.6211854.66260.00310.28130.74861
691086610502.649310002.087711003.2110.07740.27410.67890.8692
701083510945.627110443.370711447.88360.3330.6220.66840.9978
7199459945.97669443.627710448.32560.49853e-040.59250.146
721033110431.13789927.311510934.96410.34840.97070.79870.7987







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.02390.04210195849.481700
620.02590.01780.0329819.3049112834.3933335.9083
630.0237-0.04020.0334182327.9105135998.8991368.7803
640.02520.07820.0446617073.5221256267.5548506.2288
650.0236-0.01540.038727206.0598210455.2558458.754
660.02470.03590.0383136070.623198057.817445.0369
670.02330.05210.0402324508.2339216122.1623464.8894
680.0225-0.06150.0429487401.2231250032.0449500.032
690.02430.03460.042132023.6964236920.0062486.7443
700.0234-0.01010.038812238.3661214451.8422463.0895
710.0258-1e-040.03530.9538194956.3069441.5386
720.0246-0.00960.033110027.579179545.5795423.7282

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0239 & 0.0421 & 0 & 195849.4817 & 0 & 0 \tabularnewline
62 & 0.0259 & 0.0178 & 0.03 & 29819.3049 & 112834.3933 & 335.9083 \tabularnewline
63 & 0.0237 & -0.0402 & 0.0334 & 182327.9105 & 135998.8991 & 368.7803 \tabularnewline
64 & 0.0252 & 0.0782 & 0.0446 & 617073.5221 & 256267.5548 & 506.2288 \tabularnewline
65 & 0.0236 & -0.0154 & 0.0387 & 27206.0598 & 210455.2558 & 458.754 \tabularnewline
66 & 0.0247 & 0.0359 & 0.0383 & 136070.623 & 198057.817 & 445.0369 \tabularnewline
67 & 0.0233 & 0.0521 & 0.0402 & 324508.2339 & 216122.1623 & 464.8894 \tabularnewline
68 & 0.0225 & -0.0615 & 0.0429 & 487401.2231 & 250032.0449 & 500.032 \tabularnewline
69 & 0.0243 & 0.0346 & 0.042 & 132023.6964 & 236920.0062 & 486.7443 \tabularnewline
70 & 0.0234 & -0.0101 & 0.0388 & 12238.3661 & 214451.8422 & 463.0895 \tabularnewline
71 & 0.0258 & -1e-04 & 0.0353 & 0.9538 & 194956.3069 & 441.5386 \tabularnewline
72 & 0.0246 & -0.0096 & 0.0331 & 10027.579 & 179545.5795 & 423.7282 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=149765&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]61[/C][C]0.0239[/C][C]0.0421[/C][C]0[/C][C]195849.4817[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.0259[/C][C]0.0178[/C][C]0.03[/C][C]29819.3049[/C][C]112834.3933[/C][C]335.9083[/C][/ROW]
[ROW][C]63[/C][C]0.0237[/C][C]-0.0402[/C][C]0.0334[/C][C]182327.9105[/C][C]135998.8991[/C][C]368.7803[/C][/ROW]
[ROW][C]64[/C][C]0.0252[/C][C]0.0782[/C][C]0.0446[/C][C]617073.5221[/C][C]256267.5548[/C][C]506.2288[/C][/ROW]
[ROW][C]65[/C][C]0.0236[/C][C]-0.0154[/C][C]0.0387[/C][C]27206.0598[/C][C]210455.2558[/C][C]458.754[/C][/ROW]
[ROW][C]66[/C][C]0.0247[/C][C]0.0359[/C][C]0.0383[/C][C]136070.623[/C][C]198057.817[/C][C]445.0369[/C][/ROW]
[ROW][C]67[/C][C]0.0233[/C][C]0.0521[/C][C]0.0402[/C][C]324508.2339[/C][C]216122.1623[/C][C]464.8894[/C][/ROW]
[ROW][C]68[/C][C]0.0225[/C][C]-0.0615[/C][C]0.0429[/C][C]487401.2231[/C][C]250032.0449[/C][C]500.032[/C][/ROW]
[ROW][C]69[/C][C]0.0243[/C][C]0.0346[/C][C]0.042[/C][C]132023.6964[/C][C]236920.0062[/C][C]486.7443[/C][/ROW]
[ROW][C]70[/C][C]0.0234[/C][C]-0.0101[/C][C]0.0388[/C][C]12238.3661[/C][C]214451.8422[/C][C]463.0895[/C][/ROW]
[ROW][C]71[/C][C]0.0258[/C][C]-1e-04[/C][C]0.0353[/C][C]0.9538[/C][C]194956.3069[/C][C]441.5386[/C][/ROW]
[ROW][C]72[/C][C]0.0246[/C][C]-0.0096[/C][C]0.0331[/C][C]10027.579[/C][C]179545.5795[/C][C]423.7282[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=149765&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=149765&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
610.02390.04210195849.481700
620.02590.01780.0329819.3049112834.3933335.9083
630.0237-0.04020.0334182327.9105135998.8991368.7803
640.02520.07820.0446617073.5221256267.5548506.2288
650.0236-0.01540.038727206.0598210455.2558458.754
660.02470.03590.0383136070.623198057.817445.0369
670.02330.05210.0402324508.2339216122.1623464.8894
680.0225-0.06150.0429487401.2231250032.0449500.032
690.02430.03460.042132023.6964236920.0062486.7443
700.0234-0.01010.038812238.3661214451.8422463.0895
710.0258-1e-040.03530.9538194956.3069441.5386
720.0246-0.00960.033110027.579179545.5795423.7282



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