Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_exponentialsmoothing.wasp
Title produced by softwareExponential Smoothing
Date of computationWed, 07 May 2008 11:10:33 -0600
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/May/07/t1210180293v984s2s4imr4aue.htm/, Retrieved Tue, 14 May 2024 06:58:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=11897, Retrieved Tue, 14 May 2024 06:58:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact182
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Exponential Smoothing] [exponential smoot...] [2008-05-07 17:10:33] [fe38921ec83f32fc5847db455ee6e655] [Current]
Feedback Forum

Post a new message
Dataseries X:
56421
53152
53536
52408
41454
38271
35306
26414
31917
38030
27534
18387
50556
43901
48572
43899
37532
40357
35489
29027
34485
42598
30306
26451
47460
50104
61465
53726
39477
43895
31481
29896
33842
39120
33702
25094
51442
45594
52518
48564
41745
49585
32747
33379
35645
37034
35681
20972
58552
54955
65540
51570
51145
46641
35704
33253
35193
41668
34865
21210
56126
49231
59723
48103
47472
50497
40059
34149
36860
46356
36577




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=11897&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=11897&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=11897&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







Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0
beta0.00350348394533219
gamma0.323270481307047

\begin{tabular}{lllllllll}
\hline
Estimated Parameters of Exponential Smoothing \tabularnewline
Parameter & Value \tabularnewline
alpha & 0 \tabularnewline
beta & 0.00350348394533219 \tabularnewline
gamma & 0.323270481307047 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=11897&T=1

[TABLE]
[ROW][C]Estimated Parameters of Exponential Smoothing[/C][/ROW]
[ROW][C]Parameter[/C][C]Value[/C][/ROW]
[ROW][C]alpha[/C][C]0[/C][/ROW]
[ROW][C]beta[/C][C]0.00350348394533219[/C][/ROW]
[ROW][C]gamma[/C][C]0.323270481307047[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=11897&T=1

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

As an alternative you can also use a QR Code:  

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

Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0
beta0.00350348394533219
gamma0.323270481307047







Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
135055650171.6294214468384.3705785532
144390143650.1812576848250.818742315227
154857248256.4676951532315.532304846805
164389943485.1985085089413.801491491133
173753237061.6413558757470.358644124302
184035739576.6526546217780.347345378323
193548934786.650148218702.34985178199
202902728496.6182790210530.38172097904
213448533333.49352091551151.50647908451
224259840405.21918331292192.78081668707
233030628538.33375047591767.66624952406
242645124889.10343694381561.89656305622
254746053355.5401722728-5895.5401722728
265010446378.15408605733725.84591394269
276146551270.739014916110194.2609850839
285372646232.69550715967493.3044928404
293947739432.526356469444.4736435305895
304389542191.93692479861703.06307520135
313148137080.816722788-5599.81672278798
322989630352.2776035735-456.277603573522
333384235676.2518023742-1834.25180237415
343912043506.0448835144-4386.04488351444
353370230795.16579367262906.83420632741
362509426857.2219833691-1763.22198336914
375144254400.0506041289-2958.05060412890
384559450298.2412433926-4704.24124339261
395251857665.7021707106-5147.70217071064
404856451405.7332016236-2841.73320162356
414174541666.544289395378.4557106047141
424958545136.34231048534448.65768951467
433274737236.7638680837-4489.76386808373
443337931880.79447864311498.2055213569
453564537021.0515737432-1376.05157374321
463703444402.1753879587-7368.17538795872
473568133471.68598421052209.31401578949
482097227719.3739188528-6747.37391885277
495855256342.30285006042209.69714993962
505495551411.02430932013543.97569067989
516554059011.61820692356528.38179307654
525157053188.602251375-1618.602251375
535114543912.89871638377232.10128361627
544664149044.5896431648-2403.58964316481
553570437674.9200302113-1970.92003021127
563325334066.5997294566-813.599729456648
573519338490.6902626285-3297.6902626285
584166844210.1382392391-2542.1382392391
593486535959.7782250809-1094.77822508091

\begin{tabular}{lllllllll}
\hline
Interpolation Forecasts of Exponential Smoothing \tabularnewline
t & Observed & Fitted & Residuals \tabularnewline
13 & 50556 & 50171.6294214468 & 384.3705785532 \tabularnewline
14 & 43901 & 43650.1812576848 & 250.818742315227 \tabularnewline
15 & 48572 & 48256.4676951532 & 315.532304846805 \tabularnewline
16 & 43899 & 43485.1985085089 & 413.801491491133 \tabularnewline
17 & 37532 & 37061.6413558757 & 470.358644124302 \tabularnewline
18 & 40357 & 39576.6526546217 & 780.347345378323 \tabularnewline
19 & 35489 & 34786.650148218 & 702.34985178199 \tabularnewline
20 & 29027 & 28496.6182790210 & 530.38172097904 \tabularnewline
21 & 34485 & 33333.4935209155 & 1151.50647908451 \tabularnewline
22 & 42598 & 40405.2191833129 & 2192.78081668707 \tabularnewline
23 & 30306 & 28538.3337504759 & 1767.66624952406 \tabularnewline
24 & 26451 & 24889.1034369438 & 1561.89656305622 \tabularnewline
25 & 47460 & 53355.5401722728 & -5895.5401722728 \tabularnewline
26 & 50104 & 46378.1540860573 & 3725.84591394269 \tabularnewline
27 & 61465 & 51270.7390149161 & 10194.2609850839 \tabularnewline
28 & 53726 & 46232.6955071596 & 7493.3044928404 \tabularnewline
29 & 39477 & 39432.5263564694 & 44.4736435305895 \tabularnewline
30 & 43895 & 42191.9369247986 & 1703.06307520135 \tabularnewline
31 & 31481 & 37080.816722788 & -5599.81672278798 \tabularnewline
32 & 29896 & 30352.2776035735 & -456.277603573522 \tabularnewline
33 & 33842 & 35676.2518023742 & -1834.25180237415 \tabularnewline
34 & 39120 & 43506.0448835144 & -4386.04488351444 \tabularnewline
35 & 33702 & 30795.1657936726 & 2906.83420632741 \tabularnewline
36 & 25094 & 26857.2219833691 & -1763.22198336914 \tabularnewline
37 & 51442 & 54400.0506041289 & -2958.05060412890 \tabularnewline
38 & 45594 & 50298.2412433926 & -4704.24124339261 \tabularnewline
39 & 52518 & 57665.7021707106 & -5147.70217071064 \tabularnewline
40 & 48564 & 51405.7332016236 & -2841.73320162356 \tabularnewline
41 & 41745 & 41666.5442893953 & 78.4557106047141 \tabularnewline
42 & 49585 & 45136.3423104853 & 4448.65768951467 \tabularnewline
43 & 32747 & 37236.7638680837 & -4489.76386808373 \tabularnewline
44 & 33379 & 31880.7944786431 & 1498.2055213569 \tabularnewline
45 & 35645 & 37021.0515737432 & -1376.05157374321 \tabularnewline
46 & 37034 & 44402.1753879587 & -7368.17538795872 \tabularnewline
47 & 35681 & 33471.6859842105 & 2209.31401578949 \tabularnewline
48 & 20972 & 27719.3739188528 & -6747.37391885277 \tabularnewline
49 & 58552 & 56342.3028500604 & 2209.69714993962 \tabularnewline
50 & 54955 & 51411.0243093201 & 3543.97569067989 \tabularnewline
51 & 65540 & 59011.6182069235 & 6528.38179307654 \tabularnewline
52 & 51570 & 53188.602251375 & -1618.602251375 \tabularnewline
53 & 51145 & 43912.8987163837 & 7232.10128361627 \tabularnewline
54 & 46641 & 49044.5896431648 & -2403.58964316481 \tabularnewline
55 & 35704 & 37674.9200302113 & -1970.92003021127 \tabularnewline
56 & 33253 & 34066.5997294566 & -813.599729456648 \tabularnewline
57 & 35193 & 38490.6902626285 & -3297.6902626285 \tabularnewline
58 & 41668 & 44210.1382392391 & -2542.1382392391 \tabularnewline
59 & 34865 & 35959.7782250809 & -1094.77822508091 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=11897&T=2

[TABLE]
[ROW][C]Interpolation Forecasts of Exponential Smoothing[/C][/ROW]
[ROW][C]t[/C][C]Observed[/C][C]Fitted[/C][C]Residuals[/C][/ROW]
[ROW][C]13[/C][C]50556[/C][C]50171.6294214468[/C][C]384.3705785532[/C][/ROW]
[ROW][C]14[/C][C]43901[/C][C]43650.1812576848[/C][C]250.818742315227[/C][/ROW]
[ROW][C]15[/C][C]48572[/C][C]48256.4676951532[/C][C]315.532304846805[/C][/ROW]
[ROW][C]16[/C][C]43899[/C][C]43485.1985085089[/C][C]413.801491491133[/C][/ROW]
[ROW][C]17[/C][C]37532[/C][C]37061.6413558757[/C][C]470.358644124302[/C][/ROW]
[ROW][C]18[/C][C]40357[/C][C]39576.6526546217[/C][C]780.347345378323[/C][/ROW]
[ROW][C]19[/C][C]35489[/C][C]34786.650148218[/C][C]702.34985178199[/C][/ROW]
[ROW][C]20[/C][C]29027[/C][C]28496.6182790210[/C][C]530.38172097904[/C][/ROW]
[ROW][C]21[/C][C]34485[/C][C]33333.4935209155[/C][C]1151.50647908451[/C][/ROW]
[ROW][C]22[/C][C]42598[/C][C]40405.2191833129[/C][C]2192.78081668707[/C][/ROW]
[ROW][C]23[/C][C]30306[/C][C]28538.3337504759[/C][C]1767.66624952406[/C][/ROW]
[ROW][C]24[/C][C]26451[/C][C]24889.1034369438[/C][C]1561.89656305622[/C][/ROW]
[ROW][C]25[/C][C]47460[/C][C]53355.5401722728[/C][C]-5895.5401722728[/C][/ROW]
[ROW][C]26[/C][C]50104[/C][C]46378.1540860573[/C][C]3725.84591394269[/C][/ROW]
[ROW][C]27[/C][C]61465[/C][C]51270.7390149161[/C][C]10194.2609850839[/C][/ROW]
[ROW][C]28[/C][C]53726[/C][C]46232.6955071596[/C][C]7493.3044928404[/C][/ROW]
[ROW][C]29[/C][C]39477[/C][C]39432.5263564694[/C][C]44.4736435305895[/C][/ROW]
[ROW][C]30[/C][C]43895[/C][C]42191.9369247986[/C][C]1703.06307520135[/C][/ROW]
[ROW][C]31[/C][C]31481[/C][C]37080.816722788[/C][C]-5599.81672278798[/C][/ROW]
[ROW][C]32[/C][C]29896[/C][C]30352.2776035735[/C][C]-456.277603573522[/C][/ROW]
[ROW][C]33[/C][C]33842[/C][C]35676.2518023742[/C][C]-1834.25180237415[/C][/ROW]
[ROW][C]34[/C][C]39120[/C][C]43506.0448835144[/C][C]-4386.04488351444[/C][/ROW]
[ROW][C]35[/C][C]33702[/C][C]30795.1657936726[/C][C]2906.83420632741[/C][/ROW]
[ROW][C]36[/C][C]25094[/C][C]26857.2219833691[/C][C]-1763.22198336914[/C][/ROW]
[ROW][C]37[/C][C]51442[/C][C]54400.0506041289[/C][C]-2958.05060412890[/C][/ROW]
[ROW][C]38[/C][C]45594[/C][C]50298.2412433926[/C][C]-4704.24124339261[/C][/ROW]
[ROW][C]39[/C][C]52518[/C][C]57665.7021707106[/C][C]-5147.70217071064[/C][/ROW]
[ROW][C]40[/C][C]48564[/C][C]51405.7332016236[/C][C]-2841.73320162356[/C][/ROW]
[ROW][C]41[/C][C]41745[/C][C]41666.5442893953[/C][C]78.4557106047141[/C][/ROW]
[ROW][C]42[/C][C]49585[/C][C]45136.3423104853[/C][C]4448.65768951467[/C][/ROW]
[ROW][C]43[/C][C]32747[/C][C]37236.7638680837[/C][C]-4489.76386808373[/C][/ROW]
[ROW][C]44[/C][C]33379[/C][C]31880.7944786431[/C][C]1498.2055213569[/C][/ROW]
[ROW][C]45[/C][C]35645[/C][C]37021.0515737432[/C][C]-1376.05157374321[/C][/ROW]
[ROW][C]46[/C][C]37034[/C][C]44402.1753879587[/C][C]-7368.17538795872[/C][/ROW]
[ROW][C]47[/C][C]35681[/C][C]33471.6859842105[/C][C]2209.31401578949[/C][/ROW]
[ROW][C]48[/C][C]20972[/C][C]27719.3739188528[/C][C]-6747.37391885277[/C][/ROW]
[ROW][C]49[/C][C]58552[/C][C]56342.3028500604[/C][C]2209.69714993962[/C][/ROW]
[ROW][C]50[/C][C]54955[/C][C]51411.0243093201[/C][C]3543.97569067989[/C][/ROW]
[ROW][C]51[/C][C]65540[/C][C]59011.6182069235[/C][C]6528.38179307654[/C][/ROW]
[ROW][C]52[/C][C]51570[/C][C]53188.602251375[/C][C]-1618.602251375[/C][/ROW]
[ROW][C]53[/C][C]51145[/C][C]43912.8987163837[/C][C]7232.10128361627[/C][/ROW]
[ROW][C]54[/C][C]46641[/C][C]49044.5896431648[/C][C]-2403.58964316481[/C][/ROW]
[ROW][C]55[/C][C]35704[/C][C]37674.9200302113[/C][C]-1970.92003021127[/C][/ROW]
[ROW][C]56[/C][C]33253[/C][C]34066.5997294566[/C][C]-813.599729456648[/C][/ROW]
[ROW][C]57[/C][C]35193[/C][C]38490.6902626285[/C][C]-3297.6902626285[/C][/ROW]
[ROW][C]58[/C][C]41668[/C][C]44210.1382392391[/C][C]-2542.1382392391[/C][/ROW]
[ROW][C]59[/C][C]34865[/C][C]35959.7782250809[/C][C]-1094.77822508091[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=11897&T=2

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

As an alternative you can also use a QR Code:  

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

Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
135055650171.6294214468384.3705785532
144390143650.1812576848250.818742315227
154857248256.4676951532315.532304846805
164389943485.1985085089413.801491491133
173753237061.6413558757470.358644124302
184035739576.6526546217780.347345378323
193548934786.650148218702.34985178199
202902728496.6182790210530.38172097904
213448533333.49352091551151.50647908451
224259840405.21918331292192.78081668707
233030628538.33375047591767.66624952406
242645124889.10343694381561.89656305622
254746053355.5401722728-5895.5401722728
265010446378.15408605733725.84591394269
276146551270.739014916110194.2609850839
285372646232.69550715967493.3044928404
293947739432.526356469444.4736435305895
304389542191.93692479861703.06307520135
313148137080.816722788-5599.81672278798
322989630352.2776035735-456.277603573522
333384235676.2518023742-1834.25180237415
343912043506.0448835144-4386.04488351444
353370230795.16579367262906.83420632741
362509426857.2219833691-1763.22198336914
375144254400.0506041289-2958.05060412890
384559450298.2412433926-4704.24124339261
395251857665.7021707106-5147.70217071064
404856451405.7332016236-2841.73320162356
414174541666.544289395378.4557106047141
424958545136.34231048534448.65768951467
433274737236.7638680837-4489.76386808373
443337931880.79447864311498.2055213569
453564537021.0515737432-1376.05157374321
463703444402.1753879587-7368.17538795872
473568133471.68598421052209.31401578949
482097227719.3739188528-6747.37391885277
495855256342.30285006042209.69714993962
505495551411.02430932013543.97569067989
516554059011.61820692356528.38179307654
525157053188.602251375-1618.602251375
535114543912.89871638377232.10128361627
544664149044.5896431648-2403.58964316481
553570437674.9200302113-1970.92003021127
563325334066.5997294566-813.599729456648
573519338490.6902626285-3297.6902626285
584166844210.1382392391-2542.1382392391
593486535959.7782250809-1094.77822508091







Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
6026857.601364613024478.276212589229236.9265166367
6159991.883756080757612.558604056962371.2089081044
6255248.898910310552869.573758286857628.2240623343
6364239.714766807961860.389614784166619.0399188316
6455340.297078171152960.971926147457719.6222301948
6548590.061313550746210.736161526950969.3864655744
6650698.573644738348319.248492714653077.8987967620
6738895.388642709536516.063490685841274.7137947333
6835491.930231102233112.605079078537871.2553831259
6939286.096186992536906.771034968841665.4213390163
7045537.510018140343158.184866116547916.835170164
7137362.296716848837352.300148186737372.2932855109

\begin{tabular}{lllllllll}
\hline
Extrapolation Forecasts of Exponential Smoothing \tabularnewline
t & Forecast & 95% Lower Bound & 95% Upper Bound \tabularnewline
60 & 26857.6013646130 & 24478.2762125892 & 29236.9265166367 \tabularnewline
61 & 59991.8837560807 & 57612.5586040569 & 62371.2089081044 \tabularnewline
62 & 55248.8989103105 & 52869.5737582868 & 57628.2240623343 \tabularnewline
63 & 64239.7147668079 & 61860.3896147841 & 66619.0399188316 \tabularnewline
64 & 55340.2970781711 & 52960.9719261474 & 57719.6222301948 \tabularnewline
65 & 48590.0613135507 & 46210.7361615269 & 50969.3864655744 \tabularnewline
66 & 50698.5736447383 & 48319.2484927146 & 53077.8987967620 \tabularnewline
67 & 38895.3886427095 & 36516.0634906858 & 41274.7137947333 \tabularnewline
68 & 35491.9302311022 & 33112.6050790785 & 37871.2553831259 \tabularnewline
69 & 39286.0961869925 & 36906.7710349688 & 41665.4213390163 \tabularnewline
70 & 45537.5100181403 & 43158.1848661165 & 47916.835170164 \tabularnewline
71 & 37362.2967168488 & 37352.3001481867 & 37372.2932855109 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=11897&T=3

[TABLE]
[ROW][C]Extrapolation Forecasts of Exponential Smoothing[/C][/ROW]
[ROW][C]t[/C][C]Forecast[/C][C]95% Lower Bound[/C][C]95% Upper Bound[/C][/ROW]
[ROW][C]60[/C][C]26857.6013646130[/C][C]24478.2762125892[/C][C]29236.9265166367[/C][/ROW]
[ROW][C]61[/C][C]59991.8837560807[/C][C]57612.5586040569[/C][C]62371.2089081044[/C][/ROW]
[ROW][C]62[/C][C]55248.8989103105[/C][C]52869.5737582868[/C][C]57628.2240623343[/C][/ROW]
[ROW][C]63[/C][C]64239.7147668079[/C][C]61860.3896147841[/C][C]66619.0399188316[/C][/ROW]
[ROW][C]64[/C][C]55340.2970781711[/C][C]52960.9719261474[/C][C]57719.6222301948[/C][/ROW]
[ROW][C]65[/C][C]48590.0613135507[/C][C]46210.7361615269[/C][C]50969.3864655744[/C][/ROW]
[ROW][C]66[/C][C]50698.5736447383[/C][C]48319.2484927146[/C][C]53077.8987967620[/C][/ROW]
[ROW][C]67[/C][C]38895.3886427095[/C][C]36516.0634906858[/C][C]41274.7137947333[/C][/ROW]
[ROW][C]68[/C][C]35491.9302311022[/C][C]33112.6050790785[/C][C]37871.2553831259[/C][/ROW]
[ROW][C]69[/C][C]39286.0961869925[/C][C]36906.7710349688[/C][C]41665.4213390163[/C][/ROW]
[ROW][C]70[/C][C]45537.5100181403[/C][C]43158.1848661165[/C][C]47916.835170164[/C][/ROW]
[ROW][C]71[/C][C]37362.2967168488[/C][C]37352.3001481867[/C][C]37372.2932855109[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=11897&T=3

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

As an alternative you can also use a QR Code:  

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

Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
6026857.601364613024478.276212589229236.9265166367
6159991.883756080757612.558604056962371.2089081044
6255248.898910310552869.573758286857628.2240623343
6364239.714766807961860.389614784166619.0399188316
6455340.297078171152960.971926147457719.6222301948
6548590.061313550746210.736161526950969.3864655744
6650698.573644738348319.248492714653077.8987967620
6738895.388642709536516.063490685841274.7137947333
6835491.930231102233112.605079078537871.2553831259
6939286.096186992536906.771034968841665.4213390163
7045537.510018140343158.184866116547916.835170164
7137362.296716848837352.300148186737372.2932855109



Parameters (Session):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = multiplicative ;
R code (references can be found in the software module):
par1 <- as.numeric(par1)
if (par2 == 'Single') K <- 1
if (par2 == 'Double') K <- 2
if (par2 == 'Triple') K <- par1
nx <- length(x)
nxmK <- nx - K
x <- ts(x, frequency = par1)
if (par2 == 'Single') fit <- HoltWinters(x, gamma=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
if (par2 == 'Triple') fit <- HoltWinters(x, seasonal=par3)
fit
myresid <- x - fit$fitted[,'xhat']
bitmap(file='test1.png')
op <- par(mfrow=c(2,1))
plot(fit,ylab='Observed (black) / Fitted (red)',main='Interpolation Fit of Exponential Smoothing')
plot(myresid,ylab='Residuals',main='Interpolation Prediction Errors')
par(op)
dev.off()
bitmap(file='test2.png')
p <- predict(fit, par1, prediction.interval=TRUE)
np <- length(p[,1])
plot(fit,p,ylab='Observed (black) / Fitted (red)',main='Extrapolation Fit of Exponential Smoothing')
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(myresid),lag.max = nx/2,main='Residual ACF')
spectrum(myresid,main='Residals Periodogram')
cpgram(myresid,main='Residal Cumulative Periodogram')
qqnorm(myresid,main='Residual Normal QQ Plot')
qqline(myresid)
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Estimated Parameters of Exponential Smoothing',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'Value',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'alpha',header=TRUE)
a<-table.element(a,fit$alpha)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'beta',header=TRUE)
a<-table.element(a,fit$beta)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'gamma',header=TRUE)
a<-table.element(a,fit$gamma)
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,'Interpolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observed',header=TRUE)
a<-table.element(a,'Fitted',header=TRUE)
a<-table.element(a,'Residuals',header=TRUE)
a<-table.row.end(a)
for (i in 1:nxmK) {
a<-table.row.start(a)
a<-table.element(a,i+K,header=TRUE)
a<-table.element(a,x[i+K])
a<-table.element(a,fit$fitted[i,'xhat'])
a<-table.element(a,myresid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Extrapolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Forecast',header=TRUE)
a<-table.element(a,'95% Lower Bound',header=TRUE)
a<-table.element(a,'95% Upper Bound',header=TRUE)
a<-table.row.end(a)
for (i in 1:np) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,p[i,'fit'])
a<-table.element(a,p[i,'lwr'])
a<-table.element(a,p[i,'upr'])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')