Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimabackwardselection.wasp
Title produced by softwareARIMA Backward Selection
Date of computationThu, 15 Dec 2016 22:50:05 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2016/Dec/15/t1481838917x8gur8ptp7k70ja.htm/, Retrieved Fri, 01 Nov 2024 03:43:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=300030, Retrieved Fri, 01 Nov 2024 03:43:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact84
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Backward Selection] [arima backward N2142] [2016-12-15 21:50:05] [31f526a885cd288e1bc58dc4a6a7fb1f] [Current]
Feedback Forum

Post a new message
Dataseries X:
4926
5242
5650
5042
4738
4178
3688
3870
3822
3872
3216
3366
4034
4514
5286
4940
5112
5188
4588
4754
4898
5422
5458
5088
5676
6518
6768
6306
6296
5728
5604
4956
4744
5160
3782
4114
5488
5874
6812
6658
6236
5542
5468
5738
5828
6168
5324
5038
5662
5868
6008
6206
5880
5594
5216
5522
5748
5966
5600
5546
5798
6218
7020
6684
6386
6680
6332
7128
7592
8468
7892
7866
8270
7536
7990
7638
8040
7564
7234
7718
7722
7966
7412
6792
7316
7424
7910
7574
7414
7292
6432
6630
6594
7318
6634
6032
6460
6446
6890
6638
6872
7516
6474
6812
6532
6908
6502
5656
5948
5608
7062
6074
5998
5944
5914
6286
6340
6666
6090
6264
7052
6666
5060
6818
6830
6986




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time3 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=300030&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]3 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=300030&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300030&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 Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R ServerBig Analytics Cloud Computing Center







ARIMA Parameter Estimation and Backward Selection
Iterationsar1sar2sma1
Estimates ( 1 )0.65140.0027-0.866
(p-val)(0 )(0.9795 )(0 )
Estimates ( 2 )0.65120-0.8645
(p-val)(0 )(NA )(0 )
Estimates ( 3 )NANANA
(p-val)(NA )(NA )(NA )
Estimates ( 4 )NANANA
(p-val)(NA )(NA )(NA )
Estimates ( 5 )NANANA
(p-val)(NA )(NA )(NA )

\begin{tabular}{lllllllll}
\hline
ARIMA Parameter Estimation and Backward Selection \tabularnewline
Iteration & sar1 & sar2 & sma1 \tabularnewline
Estimates ( 1 ) & 0.6514 & 0.0027 & -0.866 \tabularnewline
(p-val) & (0 ) & (0.9795 ) & (0 ) \tabularnewline
Estimates ( 2 ) & 0.6512 & 0 & -0.8645 \tabularnewline
(p-val) & (0 ) & (NA ) & (0 ) \tabularnewline
Estimates ( 3 ) & NA & NA & NA \tabularnewline
(p-val) & (NA ) & (NA ) & (NA ) \tabularnewline
Estimates ( 4 ) & NA & NA & NA \tabularnewline
(p-val) & (NA ) & (NA ) & (NA ) \tabularnewline
Estimates ( 5 ) & NA & NA & NA \tabularnewline
(p-val) & (NA ) & (NA ) & (NA ) \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=300030&T=1

[TABLE]
[ROW][C]ARIMA Parameter Estimation and Backward Selection[/C][/ROW]
[ROW][C]Iteration[/C][C]sar1[/C][C]sar2[/C][C]sma1[/C][/ROW]
[ROW][C]Estimates ( 1 )[/C][C]0.6514[/C][C]0.0027[/C][C]-0.866[/C][/ROW]
[ROW][C](p-val)[/C][C](0 )[/C][C](0.9795 )[/C][C](0 )[/C][/ROW]
[ROW][C]Estimates ( 2 )[/C][C]0.6512[/C][C]0[/C][C]-0.8645[/C][/ROW]
[ROW][C](p-val)[/C][C](0 )[/C][C](NA )[/C][C](0 )[/C][/ROW]
[ROW][C]Estimates ( 3 )[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C](p-val)[/C][C](NA )[/C][C](NA )[/C][C](NA )[/C][/ROW]
[ROW][C]Estimates ( 4 )[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C](p-val)[/C][C](NA )[/C][C](NA )[/C][C](NA )[/C][/ROW]
[ROW][C]Estimates ( 5 )[/C][C]NA[/C][C]NA[/C][C]NA[/C][/ROW]
[ROW][C](p-val)[/C][C](NA )[/C][C](NA )[/C][C](NA )[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=300030&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300030&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

ARIMA Parameter Estimation and Backward Selection
Iterationsar1sar2sma1
Estimates ( 1 )0.65140.0027-0.866
(p-val)(0 )(0.9795 )(0 )
Estimates ( 2 )0.65120-0.8645
(p-val)(0 )(NA )(0 )
Estimates ( 3 )NANANA
(p-val)(NA )(NA )(NA )
Estimates ( 4 )NANANA
(p-val)(NA )(NA )(NA )
Estimates ( 5 )NANANA
(p-val)(NA )(NA )(NA )







Estimated ARIMA Residuals
Value
4.92599734238116
304.210274835409
444.027735708521
-490.73390063713
-321.616097755096
-628.708767884572
-658.517433691038
-63.0281580119238
-218.621406488616
-107.447522246976
-779.437855206497
-96.1232257135065
488.340174322208
466.399340141248
860.448371839167
-105.48877794315
303.875403816789
227.870748381445
-452.593267944063
164.740711217968
180.100182767117
585.644939654112
201.389428454685
-220.459443839103
637.981029835814
1012.41462961942
576.657072048338
-127.742059053064
179.637448929863
-404.681699051479
-104.437596735902
-656.140836706434
-357.778976165776
246.00338563435
-1435.36321243049
-14.5215194842936
1148.87218517017
485.024364505713
1102.89907308452
189.064092531356
-160.48507442876
-557.68575475664
-103.76013663051
230.211942269544
113.687804143005
379.102416844075
-737.412926588386
-375.741884735739
487.175114666312
222.197622728126
196.559722049069
276.471125297395
-215.929482351309
-261.176267766354
-417.005641099057
191.868198667249
193.850724097031
237.839087094638
-302.642229015274
-78.2664438554051
220.380304554369
446.844747501697
914.70570919511
-67.4114851374487
-139.672525161113
368.056805463276
-219.972904591995
831.394346056689
666.414550623467
1148.72599581129
-153.075057741246
214.273917919127
608.038896793581
-470.535439245331
523.545090483679
-192.371051565456
463.472448210847
-335.547761758717
-311.605939609979
430.386619014335
62.3296446032873
294.070079393441
-458.286657146556
-656.663722627717
360.680841169031
80.6907061448833
484.120797787879
-233.617413914958
-144.753693833641
-142.231825202503
-903.27270771785
-23.7092521231012
-183.191454530113
588.277987397786
-646.058047047314
-717.88112158318
200.292797666804
-117.718574256572
350.027872165135
-238.053389217028
190.802986148822
657.48808290494
-892.739995028855
241.902349154768
-287.880679991428
308.176831832868
-383.287808964192
-914.473368345871
52.2351626200042
-482.691483851483
1256.68108804593
-845.917909587935
-168.900881605333
-148.105667603399
-122.877859056013
285.276906608289
58.8152147131241
340.759298023684
-493.40128641851
121.037623394232
781.025463135544
-223.395177079577
-1550.14459481795
1462.74400470938
137.913616906044
262.890110023287

\begin{tabular}{lllllllll}
\hline
Estimated ARIMA Residuals \tabularnewline
Value \tabularnewline
4.92599734238116 \tabularnewline
304.210274835409 \tabularnewline
444.027735708521 \tabularnewline
-490.73390063713 \tabularnewline
-321.616097755096 \tabularnewline
-628.708767884572 \tabularnewline
-658.517433691038 \tabularnewline
-63.0281580119238 \tabularnewline
-218.621406488616 \tabularnewline
-107.447522246976 \tabularnewline
-779.437855206497 \tabularnewline
-96.1232257135065 \tabularnewline
488.340174322208 \tabularnewline
466.399340141248 \tabularnewline
860.448371839167 \tabularnewline
-105.48877794315 \tabularnewline
303.875403816789 \tabularnewline
227.870748381445 \tabularnewline
-452.593267944063 \tabularnewline
164.740711217968 \tabularnewline
180.100182767117 \tabularnewline
585.644939654112 \tabularnewline
201.389428454685 \tabularnewline
-220.459443839103 \tabularnewline
637.981029835814 \tabularnewline
1012.41462961942 \tabularnewline
576.657072048338 \tabularnewline
-127.742059053064 \tabularnewline
179.637448929863 \tabularnewline
-404.681699051479 \tabularnewline
-104.437596735902 \tabularnewline
-656.140836706434 \tabularnewline
-357.778976165776 \tabularnewline
246.00338563435 \tabularnewline
-1435.36321243049 \tabularnewline
-14.5215194842936 \tabularnewline
1148.87218517017 \tabularnewline
485.024364505713 \tabularnewline
1102.89907308452 \tabularnewline
189.064092531356 \tabularnewline
-160.48507442876 \tabularnewline
-557.68575475664 \tabularnewline
-103.76013663051 \tabularnewline
230.211942269544 \tabularnewline
113.687804143005 \tabularnewline
379.102416844075 \tabularnewline
-737.412926588386 \tabularnewline
-375.741884735739 \tabularnewline
487.175114666312 \tabularnewline
222.197622728126 \tabularnewline
196.559722049069 \tabularnewline
276.471125297395 \tabularnewline
-215.929482351309 \tabularnewline
-261.176267766354 \tabularnewline
-417.005641099057 \tabularnewline
191.868198667249 \tabularnewline
193.850724097031 \tabularnewline
237.839087094638 \tabularnewline
-302.642229015274 \tabularnewline
-78.2664438554051 \tabularnewline
220.380304554369 \tabularnewline
446.844747501697 \tabularnewline
914.70570919511 \tabularnewline
-67.4114851374487 \tabularnewline
-139.672525161113 \tabularnewline
368.056805463276 \tabularnewline
-219.972904591995 \tabularnewline
831.394346056689 \tabularnewline
666.414550623467 \tabularnewline
1148.72599581129 \tabularnewline
-153.075057741246 \tabularnewline
214.273917919127 \tabularnewline
608.038896793581 \tabularnewline
-470.535439245331 \tabularnewline
523.545090483679 \tabularnewline
-192.371051565456 \tabularnewline
463.472448210847 \tabularnewline
-335.547761758717 \tabularnewline
-311.605939609979 \tabularnewline
430.386619014335 \tabularnewline
62.3296446032873 \tabularnewline
294.070079393441 \tabularnewline
-458.286657146556 \tabularnewline
-656.663722627717 \tabularnewline
360.680841169031 \tabularnewline
80.6907061448833 \tabularnewline
484.120797787879 \tabularnewline
-233.617413914958 \tabularnewline
-144.753693833641 \tabularnewline
-142.231825202503 \tabularnewline
-903.27270771785 \tabularnewline
-23.7092521231012 \tabularnewline
-183.191454530113 \tabularnewline
588.277987397786 \tabularnewline
-646.058047047314 \tabularnewline
-717.88112158318 \tabularnewline
200.292797666804 \tabularnewline
-117.718574256572 \tabularnewline
350.027872165135 \tabularnewline
-238.053389217028 \tabularnewline
190.802986148822 \tabularnewline
657.48808290494 \tabularnewline
-892.739995028855 \tabularnewline
241.902349154768 \tabularnewline
-287.880679991428 \tabularnewline
308.176831832868 \tabularnewline
-383.287808964192 \tabularnewline
-914.473368345871 \tabularnewline
52.2351626200042 \tabularnewline
-482.691483851483 \tabularnewline
1256.68108804593 \tabularnewline
-845.917909587935 \tabularnewline
-168.900881605333 \tabularnewline
-148.105667603399 \tabularnewline
-122.877859056013 \tabularnewline
285.276906608289 \tabularnewline
58.8152147131241 \tabularnewline
340.759298023684 \tabularnewline
-493.40128641851 \tabularnewline
121.037623394232 \tabularnewline
781.025463135544 \tabularnewline
-223.395177079577 \tabularnewline
-1550.14459481795 \tabularnewline
1462.74400470938 \tabularnewline
137.913616906044 \tabularnewline
262.890110023287 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=300030&T=2

[TABLE]
[ROW][C]Estimated ARIMA Residuals[/C][/ROW]
[ROW][C]Value[/C][/ROW]
[ROW][C]4.92599734238116[/C][/ROW]
[ROW][C]304.210274835409[/C][/ROW]
[ROW][C]444.027735708521[/C][/ROW]
[ROW][C]-490.73390063713[/C][/ROW]
[ROW][C]-321.616097755096[/C][/ROW]
[ROW][C]-628.708767884572[/C][/ROW]
[ROW][C]-658.517433691038[/C][/ROW]
[ROW][C]-63.0281580119238[/C][/ROW]
[ROW][C]-218.621406488616[/C][/ROW]
[ROW][C]-107.447522246976[/C][/ROW]
[ROW][C]-779.437855206497[/C][/ROW]
[ROW][C]-96.1232257135065[/C][/ROW]
[ROW][C]488.340174322208[/C][/ROW]
[ROW][C]466.399340141248[/C][/ROW]
[ROW][C]860.448371839167[/C][/ROW]
[ROW][C]-105.48877794315[/C][/ROW]
[ROW][C]303.875403816789[/C][/ROW]
[ROW][C]227.870748381445[/C][/ROW]
[ROW][C]-452.593267944063[/C][/ROW]
[ROW][C]164.740711217968[/C][/ROW]
[ROW][C]180.100182767117[/C][/ROW]
[ROW][C]585.644939654112[/C][/ROW]
[ROW][C]201.389428454685[/C][/ROW]
[ROW][C]-220.459443839103[/C][/ROW]
[ROW][C]637.981029835814[/C][/ROW]
[ROW][C]1012.41462961942[/C][/ROW]
[ROW][C]576.657072048338[/C][/ROW]
[ROW][C]-127.742059053064[/C][/ROW]
[ROW][C]179.637448929863[/C][/ROW]
[ROW][C]-404.681699051479[/C][/ROW]
[ROW][C]-104.437596735902[/C][/ROW]
[ROW][C]-656.140836706434[/C][/ROW]
[ROW][C]-357.778976165776[/C][/ROW]
[ROW][C]246.00338563435[/C][/ROW]
[ROW][C]-1435.36321243049[/C][/ROW]
[ROW][C]-14.5215194842936[/C][/ROW]
[ROW][C]1148.87218517017[/C][/ROW]
[ROW][C]485.024364505713[/C][/ROW]
[ROW][C]1102.89907308452[/C][/ROW]
[ROW][C]189.064092531356[/C][/ROW]
[ROW][C]-160.48507442876[/C][/ROW]
[ROW][C]-557.68575475664[/C][/ROW]
[ROW][C]-103.76013663051[/C][/ROW]
[ROW][C]230.211942269544[/C][/ROW]
[ROW][C]113.687804143005[/C][/ROW]
[ROW][C]379.102416844075[/C][/ROW]
[ROW][C]-737.412926588386[/C][/ROW]
[ROW][C]-375.741884735739[/C][/ROW]
[ROW][C]487.175114666312[/C][/ROW]
[ROW][C]222.197622728126[/C][/ROW]
[ROW][C]196.559722049069[/C][/ROW]
[ROW][C]276.471125297395[/C][/ROW]
[ROW][C]-215.929482351309[/C][/ROW]
[ROW][C]-261.176267766354[/C][/ROW]
[ROW][C]-417.005641099057[/C][/ROW]
[ROW][C]191.868198667249[/C][/ROW]
[ROW][C]193.850724097031[/C][/ROW]
[ROW][C]237.839087094638[/C][/ROW]
[ROW][C]-302.642229015274[/C][/ROW]
[ROW][C]-78.2664438554051[/C][/ROW]
[ROW][C]220.380304554369[/C][/ROW]
[ROW][C]446.844747501697[/C][/ROW]
[ROW][C]914.70570919511[/C][/ROW]
[ROW][C]-67.4114851374487[/C][/ROW]
[ROW][C]-139.672525161113[/C][/ROW]
[ROW][C]368.056805463276[/C][/ROW]
[ROW][C]-219.972904591995[/C][/ROW]
[ROW][C]831.394346056689[/C][/ROW]
[ROW][C]666.414550623467[/C][/ROW]
[ROW][C]1148.72599581129[/C][/ROW]
[ROW][C]-153.075057741246[/C][/ROW]
[ROW][C]214.273917919127[/C][/ROW]
[ROW][C]608.038896793581[/C][/ROW]
[ROW][C]-470.535439245331[/C][/ROW]
[ROW][C]523.545090483679[/C][/ROW]
[ROW][C]-192.371051565456[/C][/ROW]
[ROW][C]463.472448210847[/C][/ROW]
[ROW][C]-335.547761758717[/C][/ROW]
[ROW][C]-311.605939609979[/C][/ROW]
[ROW][C]430.386619014335[/C][/ROW]
[ROW][C]62.3296446032873[/C][/ROW]
[ROW][C]294.070079393441[/C][/ROW]
[ROW][C]-458.286657146556[/C][/ROW]
[ROW][C]-656.663722627717[/C][/ROW]
[ROW][C]360.680841169031[/C][/ROW]
[ROW][C]80.6907061448833[/C][/ROW]
[ROW][C]484.120797787879[/C][/ROW]
[ROW][C]-233.617413914958[/C][/ROW]
[ROW][C]-144.753693833641[/C][/ROW]
[ROW][C]-142.231825202503[/C][/ROW]
[ROW][C]-903.27270771785[/C][/ROW]
[ROW][C]-23.7092521231012[/C][/ROW]
[ROW][C]-183.191454530113[/C][/ROW]
[ROW][C]588.277987397786[/C][/ROW]
[ROW][C]-646.058047047314[/C][/ROW]
[ROW][C]-717.88112158318[/C][/ROW]
[ROW][C]200.292797666804[/C][/ROW]
[ROW][C]-117.718574256572[/C][/ROW]
[ROW][C]350.027872165135[/C][/ROW]
[ROW][C]-238.053389217028[/C][/ROW]
[ROW][C]190.802986148822[/C][/ROW]
[ROW][C]657.48808290494[/C][/ROW]
[ROW][C]-892.739995028855[/C][/ROW]
[ROW][C]241.902349154768[/C][/ROW]
[ROW][C]-287.880679991428[/C][/ROW]
[ROW][C]308.176831832868[/C][/ROW]
[ROW][C]-383.287808964192[/C][/ROW]
[ROW][C]-914.473368345871[/C][/ROW]
[ROW][C]52.2351626200042[/C][/ROW]
[ROW][C]-482.691483851483[/C][/ROW]
[ROW][C]1256.68108804593[/C][/ROW]
[ROW][C]-845.917909587935[/C][/ROW]
[ROW][C]-168.900881605333[/C][/ROW]
[ROW][C]-148.105667603399[/C][/ROW]
[ROW][C]-122.877859056013[/C][/ROW]
[ROW][C]285.276906608289[/C][/ROW]
[ROW][C]58.8152147131241[/C][/ROW]
[ROW][C]340.759298023684[/C][/ROW]
[ROW][C]-493.40128641851[/C][/ROW]
[ROW][C]121.037623394232[/C][/ROW]
[ROW][C]781.025463135544[/C][/ROW]
[ROW][C]-223.395177079577[/C][/ROW]
[ROW][C]-1550.14459481795[/C][/ROW]
[ROW][C]1462.74400470938[/C][/ROW]
[ROW][C]137.913616906044[/C][/ROW]
[ROW][C]262.890110023287[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=300030&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=300030&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Estimated ARIMA Residuals
Value
4.92599734238116
304.210274835409
444.027735708521
-490.73390063713
-321.616097755096
-628.708767884572
-658.517433691038
-63.0281580119238
-218.621406488616
-107.447522246976
-779.437855206497
-96.1232257135065
488.340174322208
466.399340141248
860.448371839167
-105.48877794315
303.875403816789
227.870748381445
-452.593267944063
164.740711217968
180.100182767117
585.644939654112
201.389428454685
-220.459443839103
637.981029835814
1012.41462961942
576.657072048338
-127.742059053064
179.637448929863
-404.681699051479
-104.437596735902
-656.140836706434
-357.778976165776
246.00338563435
-1435.36321243049
-14.5215194842936
1148.87218517017
485.024364505713
1102.89907308452
189.064092531356
-160.48507442876
-557.68575475664
-103.76013663051
230.211942269544
113.687804143005
379.102416844075
-737.412926588386
-375.741884735739
487.175114666312
222.197622728126
196.559722049069
276.471125297395
-215.929482351309
-261.176267766354
-417.005641099057
191.868198667249
193.850724097031
237.839087094638
-302.642229015274
-78.2664438554051
220.380304554369
446.844747501697
914.70570919511
-67.4114851374487
-139.672525161113
368.056805463276
-219.972904591995
831.394346056689
666.414550623467
1148.72599581129
-153.075057741246
214.273917919127
608.038896793581
-470.535439245331
523.545090483679
-192.371051565456
463.472448210847
-335.547761758717
-311.605939609979
430.386619014335
62.3296446032873
294.070079393441
-458.286657146556
-656.663722627717
360.680841169031
80.6907061448833
484.120797787879
-233.617413914958
-144.753693833641
-142.231825202503
-903.27270771785
-23.7092521231012
-183.191454530113
588.277987397786
-646.058047047314
-717.88112158318
200.292797666804
-117.718574256572
350.027872165135
-238.053389217028
190.802986148822
657.48808290494
-892.739995028855
241.902349154768
-287.880679991428
308.176831832868
-383.287808964192
-914.473368345871
52.2351626200042
-482.691483851483
1256.68108804593
-845.917909587935
-168.900881605333
-148.105667603399
-122.877859056013
285.276906608289
58.8152147131241
340.759298023684
-493.40128641851
121.037623394232
781.025463135544
-223.395177079577
-1550.14459481795
1462.74400470938
137.913616906044
262.890110023287



Parameters (Session):
par1 = FALSE ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 1 ; par6 = 0 ; par7 = 0 ; par8 = 2 ; par9 = 1 ;
Parameters (R input):
par1 = FALSE ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 1 ; par6 = 0 ; par7 = 0 ; par8 = 2 ; par9 = 1 ;
R code (references can be found in the software module):
par9 <- '1'
par8 <- '2'
par7 <- '0'
par6 <- '1'
par5 <- '1'
par4 <- '0'
par3 <- '1'
par2 <- '1'
par1 <- 'FALSE'
library(lattice)
if (par1 == 'TRUE') par1 <- TRUE
if (par1 == 'FALSE') par1 <- FALSE
par2 <- as.numeric(par2) #Box-Cox lambda transformation parameter
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) #degree (p) of the non-seasonal AR(p) polynomial
par7 <- as.numeric(par7) #degree (q) of the non-seasonal MA(q) polynomial
par8 <- as.numeric(par8) #degree (P) of the seasonal AR(P) polynomial
par9 <- as.numeric(par9) #degree (Q) of the seasonal MA(Q) polynomial
armaGR <- function(arima.out, names, n){
try1 <- arima.out$coef
try2 <- sqrt(diag(arima.out$var.coef))
try.data.frame <- data.frame(matrix(NA,ncol=4,nrow=length(names)))
dimnames(try.data.frame) <- list(names,c('coef','std','tstat','pv'))
try.data.frame[,1] <- try1
for(i in 1:length(try2)) try.data.frame[which(rownames(try.data.frame)==names(try2)[i]),2] <- try2[i]
try.data.frame[,3] <- try.data.frame[,1] / try.data.frame[,2]
try.data.frame[,4] <- round((1-pt(abs(try.data.frame[,3]),df=n-(length(try2)+1)))*2,5)
vector <- rep(NA,length(names))
vector[is.na(try.data.frame[,4])] <- 0
maxi <- which.max(try.data.frame[,4])
continue <- max(try.data.frame[,4],na.rm=TRUE) > .05
vector[maxi] <- 0
list(summary=try.data.frame,next.vector=vector,continue=continue)
}
arimaSelect <- function(series, order=c(13,0,0), seasonal=list(order=c(2,0,0),period=12), include.mean=F){
nrc <- order[1]+order[3]+seasonal$order[1]+seasonal$order[3]
coeff <- matrix(NA, nrow=nrc*2, ncol=nrc)
pval <- matrix(NA, nrow=nrc*2, ncol=nrc)
mylist <- rep(list(NULL), nrc)
names <- NULL
if(order[1] > 0) names <- paste('ar',1:order[1],sep='')
if(order[3] > 0) names <- c( names , paste('ma',1:order[3],sep='') )
if(seasonal$order[1] > 0) names <- c(names, paste('sar',1:seasonal$order[1],sep=''))
if(seasonal$order[3] > 0) names <- c(names, paste('sma',1:seasonal$order[3],sep=''))
arima.out <- arima(series, order=order, seasonal=seasonal, include.mean=include.mean, method='ML')
mylist[[1]] <- arima.out
last.arma <- armaGR(arima.out, names, length(series))
mystop <- FALSE
i <- 1
coeff[i,] <- last.arma[[1]][,1]
pval [i,] <- last.arma[[1]][,4]
i <- 2
aic <- arima.out$aic
while(!mystop){
mylist[[i]] <- arima.out
arima.out <- arima(series, order=order, seasonal=seasonal, include.mean=include.mean, method='ML', fixed=last.arma$next.vector)
aic <- c(aic, arima.out$aic)
last.arma <- armaGR(arima.out, names, length(series))
mystop <- !last.arma$continue
coeff[i,] <- last.arma[[1]][,1]
pval [i,] <- last.arma[[1]][,4]
i <- i+1
}
list(coeff, pval, mylist, aic=aic)
}
arimaSelectplot <- function(arimaSelect.out,noms,choix){
noms <- names(arimaSelect.out[[3]][[1]]$coef)
coeff <- arimaSelect.out[[1]]
k <- min(which(is.na(coeff[,1])))-1
coeff <- coeff[1:k,]
pval <- arimaSelect.out[[2]][1:k,]
aic <- arimaSelect.out$aic[1:k]
coeff[coeff==0] <- NA
n <- ncol(coeff)
if(missing(choix)) choix <- k
layout(matrix(c(1,1,1,2,
3,3,3,2,
3,3,3,4,
5,6,7,7),nr=4),
widths=c(10,35,45,15),
heights=c(30,30,15,15))
couleurs <- rainbow(75)[1:50]#(50)
ticks <- pretty(coeff)
par(mar=c(1,1,3,1))
plot(aic,k:1-.5,type='o',pch=21,bg='blue',cex=2,axes=F,lty=2,xpd=NA)
points(aic[choix],k-choix+.5,pch=21,cex=4,bg=2,xpd=NA)
title('aic',line=2)
par(mar=c(3,0,0,0))
plot(0,axes=F,xlab='',ylab='',xlim=range(ticks),ylim=c(.1,1))
rect(xleft = min(ticks) + (0:49)/50*(max(ticks)-min(ticks)),
xright = min(ticks) + (1:50)/50*(max(ticks)-min(ticks)),
ytop = rep(1,50),
ybottom= rep(0,50),col=couleurs,border=NA)
axis(1,ticks)
rect(xleft=min(ticks),xright=max(ticks),ytop=1,ybottom=0)
text(mean(coeff,na.rm=T),.5,'coefficients',cex=2,font=2)
par(mar=c(1,1,3,1))
image(1:n,1:k,t(coeff[k:1,]),axes=F,col=couleurs,zlim=range(ticks))
for(i in 1:n) for(j in 1:k) if(!is.na(coeff[j,i])) {
if(pval[j,i]<.01) symb = 'green'
else if( (pval[j,i]<.05) & (pval[j,i]>=.01)) symb = 'orange'
else if( (pval[j,i]<.1) & (pval[j,i]>=.05)) symb = 'red'
else symb = 'black'
polygon(c(i+.5 ,i+.2 ,i+.5 ,i+.5),
c(k-j+0.5,k-j+0.5,k-j+0.8,k-j+0.5),
col=symb)
if(j==choix) {
rect(xleft=i-.5,
xright=i+.5,
ybottom=k-j+1.5,
ytop=k-j+.5,
lwd=4)
text(i,
k-j+1,
round(coeff[j,i],2),
cex=1.2,
font=2)
}
else{
rect(xleft=i-.5,xright=i+.5,ybottom=k-j+1.5,ytop=k-j+.5)
text(i,k-j+1,round(coeff[j,i],2),cex=1.2,font=1)
}
}
axis(3,1:n,noms)
par(mar=c(0.5,0,0,0.5))
plot(0,axes=F,xlab='',ylab='',type='n',xlim=c(0,8),ylim=c(-.2,.8))
cols <- c('green','orange','red','black')
niv <- c('0','0.01','0.05','0.1')
for(i in 0:3){
polygon(c(1+2*i ,1+2*i ,1+2*i-.5 ,1+2*i),
c(.4 ,.7 , .4 , .4),
col=cols[i+1])
text(2*i,0.5,niv[i+1],cex=1.5)
}
text(8,.5,1,cex=1.5)
text(4,0,'p-value',cex=2)
box()
residus <- arimaSelect.out[[3]][[choix]]$res
par(mar=c(1,2,4,1))
acf(residus,main='')
title('acf',line=.5)
par(mar=c(1,2,4,1))
pacf(residus,main='')
title('pacf',line=.5)
par(mar=c(2,2,4,1))
qqnorm(residus,main='')
title('qq-norm',line=.5)
qqline(residus)
residus
}
if (par2 == 0) x <- log(x)
if (par2 != 0) x <- x^par2
(selection <- arimaSelect(x, order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5)))
bitmap(file='test1.png')
resid <- arimaSelectplot(selection)
dev.off()
resid
bitmap(file='test2.png')
acf(resid,length(resid)/2, main='Residual Autocorrelation Function')
dev.off()
bitmap(file='test3.png')
pacf(resid,length(resid)/2, main='Residual Partial Autocorrelation Function')
dev.off()
bitmap(file='test4.png')
cpgram(resid, main='Residual Cumulative Periodogram')
dev.off()
bitmap(file='test5.png')
hist(resid, main='Residual Histogram', xlab='values of Residuals')
dev.off()
bitmap(file='test6.png')
densityplot(~resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test7.png')
qqnorm(resid, main='Residual Normal Q-Q Plot')
qqline(resid)
dev.off()
ncols <- length(selection[[1]][1,])
nrows <- length(selection[[2]][,1])-1
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'ARIMA Parameter Estimation and Backward Selection', ncols+1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Iteration', header=TRUE)
for (i in 1:ncols) {
a<-table.element(a,names(selection[[3]][[1]]$coef)[i],header=TRUE)
}
a<-table.row.end(a)
for (j in 1:nrows) {
a<-table.row.start(a)
mydum <- 'Estimates ('
mydum <- paste(mydum,j)
mydum <- paste(mydum,')')
a<-table.element(a,mydum, header=TRUE)
for (i in 1:ncols) {
a<-table.element(a,round(selection[[1]][j,i],4))
}
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'(p-val)', header=TRUE)
for (i in 1:ncols) {
mydum <- '('
mydum <- paste(mydum,round(selection[[2]][j,i],4),sep='')
mydum <- paste(mydum,')')
a<-table.element(a,mydum)
}
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,'Estimated ARIMA Residuals', 1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Value', 1,TRUE)
a<-table.row.end(a)
for (i in (par4*par5+par3):length(resid)) {
a<-table.row.start(a)
a<-table.element(a,resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')