Home » date » 2009 » Aug » 16 »

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 16 Aug 2009 11:12:06 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Aug/16/t1250442741phg6kdiys3lwn0a.htm/, Retrieved Sun, 16 Aug 2009 19:12:25 +0200
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Aug/16/t1250442741phg6kdiys3lwn0a.htm/},
    year = {2009},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
105,46 104,66 103,52 103,71 103,78 103,67 103,66 102,76 102 101,5 101,5 99,22 98,97 98,9 99,78 104,4 106,21 105,46 108,33 111,72 111,88 112,86 113,09 116,9 114,62 118,86 124,71 122,53 127,89 136,16 134,12 130,26 135,35 131,43 129,61 123,96 121,1 125,38 123,1 129,92 136,68 131,17 124,82 122,47 126,15 118,74 116,8 116,64 116,53 117,68 119,46 126,19 124,39 121,9 122,53 122,93 124,66 124,41 120,93 120,18 123,44 126,1 125,82 122,18 117,27 117,86 119,09 123,08 125,42 121,81 121,66 121,27 120,92 122,16 124,17 127,26 134,16 134,09 135,57 136,13 136,23 140,6 136,5 130,59 129,5 135,25 138,06 146,28 145,04 147,96 156,71 160,97 168,17 163,91 153,05 151,76
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'George Udny Yule' @ 72.249.76.132


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.917280045034661
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1398.9798.89477029914530.0752297008546776
1498.998.6911546249110.208845375089126
1599.7899.34301860902220.436981390977792
16104.4103.8441472080620.555852791938108
17106.21105.5730641711280.636935828872225
18105.46104.5530236526310.906976347369152
19108.33107.9056859131020.424314086898022
20111.72108.2706117135523.44938828644841
21111.88111.4357943786650.444205621335371
22112.86111.8356329533851.02436704661459
23113.09113.0105586930800.0794413069196622
24116.9110.9928895743805.90711042561983
25114.62116.263714711462-1.64371471146183
26118.86114.4943983118414.36560168815905
27124.71118.9780433149635.73195668503654
28122.53128.345980127129-5.81598012712888
29127.89124.2368490884033.65315091159671
30136.16126.00586021635110.1541397836490
31134.12137.800835169646-3.68083516964612
32130.26134.650423476733-4.39042347673256
33135.35130.3757146799314.97428532006907
34131.43134.978895891689-3.54889589168852
35129.61131.880694582748-2.27069458274826
36123.96128.189357236388-4.22935723638771
37121.1123.53759894468-2.43759894468016
38125.38121.5371587618103.84284123819043
39123.1125.654310859651-2.5543108596509
40129.92126.4661749922113.45382500778871
41136.68131.6433373181905.0366626818103
42131.17135.219177691751-4.04917769175128
43124.82132.841304446486-8.02130444648648
44122.47125.650769787035-3.18076978703509
45126.15123.2603004711302.88969952886958
46118.74125.24629556846-6.50629556845993
47116.8119.541063305537-2.74106330553747
48116.64115.2562456294531.38375437054744
49116.53115.9014967705380.628503229462126
50117.68117.2330486571350.446951342865049
51119.46117.7060465854201.75395341458039
52126.19122.9667882938483.22321170615166
53124.39128.063345901228-3.67334590122805
54121.9122.898088902965-0.998088902964625
55122.53122.990344373014-0.460344373014479
56122.93123.135736319301-0.205736319300740
57124.66123.9763547850890.683645214910825
58124.41123.1615439906561.24845600934395
59120.93124.881050447477-3.95105044747712
60120.18119.8275404437480.352459556251546
61123.44119.4643310907543.97566890924568
62126.1123.8511532989592.24884670104143
63125.82126.085109035051-0.265109035050898
64122.18129.615342028465-7.4353420284653
65117.27124.364538051453-7.0945380514529
66117.86116.2823869019761.57761309802395
67119.09118.7817646227890.308235377211105
68123.08119.6532206037123.42677939628817
69125.42123.8994428491421.52055715085825
70121.81123.899035796484-2.08903579648397
71121.66122.127024679402-0.467024679402158
72121.27120.6253281428170.644671857183454
73120.92120.8298710168910.0901289831094374
74122.16121.5097223313690.650277668631219
75124.17122.0693882881462.10061171185360
76127.26127.1765283645150.0834716354854521
77134.16128.8507734134095.30922658659139
78134.09132.8637080022541.22629199774627
79135.57134.9358230204830.634176979517349
80136.13136.364224549863-0.234224549863200
81136.23137.094598312399-0.864598312399465
82140.6134.6077503829435.99224961705735
83136.5140.382713800490-3.88271380049025
84130.59135.83983328053-5.24983328053005
85129.5130.591592454855-1.09159245485546
86135.25130.2338097495395.01619025046091
87138.06134.9182117627353.14178823726508
88146.28140.8135445529465.46645544705441
89145.04147.857767449152-2.81776744915183
90147.96144.0782324175783.88176758242173
91156.71148.5371824720658.17281752793545
92160.97156.8087944077964.16120559220406
93168.17161.5188640397466.65113596025392
94163.91166.493247334306-2.58324733430612
95153.05163.585221992929-10.5352219929285
96151.76152.827040396794-1.06704039679400


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
97151.759561509718144.301130001953159.217993017484
98152.908310290873142.787346026331163.029274555415
99152.836410635105140.620043141770165.052778128441
100156.042140136451142.040520522266170.043759750636
101157.386821989106141.803142420133172.970501558079
102156.746154046288139.726847773807173.765460318770
103157.999391616204139.656477368882176.342305863526
104158.442400763188138.865163466452178.019638059924
105159.541446470035138.803222407671180.279670532399
106157.651007701183135.813433331558179.488582070808
107156.454756605306133.570583658988179.338929551625
108156.143531468531132.258576192771180.028486744292
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442741phg6kdiys3lwn0a/112c51250442719.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442741phg6kdiys3lwn0a/112c51250442719.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442741phg6kdiys3lwn0a/2nx431250442719.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442741phg6kdiys3lwn0a/2nx431250442719.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442741phg6kdiys3lwn0a/30xy01250442719.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/16/t1250442741phg6kdiys3lwn0a/30xy01250442719.ps (open in new window)


 
Parameters (Session):
par2 = grey ; par3 = FALSE ; par4 = Unknown ;
 
Parameters (R input):
par1 = 12 ; par2 = Triple ; par3 = additive ; par4 = Unknown ;
 
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')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by