Home » date » 2010 » Dec » 24 »

10.2

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 24 Dec 2010 14:48:17 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/24/t1293201976z95ip0evnpqoeub.htm/, Retrieved Fri, 24 Dec 2010 15:46:20 +0100
 
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/2010/Dec/24/t1293201976z95ip0evnpqoeub.htm/},
    year = {2010},
}
@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 = {2010},
    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:
KDGP2W102
 
Dataseries X:
» Textbox « » Textfile « » CSV «
89,3 88,1 93,6 79,7 83,8 62,3 62,3 77,6 80,3 97 94 75,1 74 77,6 75,1 85 75,4 63,2 64,7 77 82,6 97,6 99 75,3 71,6 76,8 83,9 79,7 77,5 73,1 65,6 85,2 98,3 98 100,6 84,1 76,7 82,4 95,5 79,9 82,4 83,6 73,1 91,1 118,6 102,9 111,8 93,9 91,6 92 91,1 97,5 94,7 96,7 78,7 103,5 113,8 106,1 120,3 114,2 106,3 98,8 113,1 97,7 116,3 107,2 94,5 123,5 126,6 126,5 141,4 124,3 124,9 108,9 126,7 107,7 121,8 118,3 122,8 149,5 147 139,3 162,1 142,2 141,4 124,7 114 126,6 121,9 125,1 122,1 135,9 148,4 137,5 145,3 139,9 128,2 115,4 124,7 111,5 121,1 122,5 127,4 143,7 157,8 148,8 162,9 153,9
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.238478317886849
beta0.0332524755449531
gamma0.786856072763765


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
137476.1609807081855-2.16098070818548
1477.679.0715192698551-1.47151926985515
1575.175.9320633301454-0.83206333014536
168585.3702471707489-0.370247170748897
1775.475.23307329610180.16692670389817
1863.262.76022916436110.439770835638889
1964.759.97476031084744.72523968915258
207776.98579297009790.0142070299020816
2182.680.7378543979841.862145602016
2297.698.590085292572-0.99008529257209
239995.30367840972523.69632159027485
2475.377.0443186004388-1.7443186004388
2571.673.9638293823682-2.36382938236817
2676.877.2147861428936-0.414786142893647
2783.974.76787067272769.13212932727244
2879.787.221791561436-7.52179156143598
2977.575.72720890281271.77279109718732
3073.163.74196436029229.35803563970784
3165.665.7266265579438-0.126626557943766
3285.279.23922221514455.96077778485555
3398.385.92369427748112.376305722519
3498106.148503406018-8.1485034060185
35100.6104.187778000516-3.58777800051568
3684.179.95689054162344.14310945837656
3776.777.8784201026497-1.17842010264968
3882.483.1904662296599-0.79046622965987
3995.586.7059362045378.79406379546302
4079.989.2371047653084-9.33710476530837
4182.482.75425249186-0.354252491859938
4283.674.20398210181189.3960178981882
4373.170.24371800914952.85628199085046
4491.189.63392251460011.46607748539991
45118.699.621460299068818.9785397009312
46102.9109.646879399444-6.74687939944442
47111.8111.208178865820.59182113417981
4893.990.90988019622.99011980379998
4991.684.94149524179876.65850475820132
509293.3551953110195-1.3551953110195
5191.1103.838593280986-12.7385932809861
5297.589.5781067608847.92189323911596
5394.792.97711547476971.7228845252303
5496.790.48186491501296.21813508498714
5578.780.792937942156-2.09293794215606
56103.5100.2311197653433.26888023465663
57113.8123.074772075817-9.27477207581728
58106.1110.425674864106-4.32567486410616
59120.3117.3730904914362.92690950856441
60114.298.000214290289616.1997857097104
61106.397.01086233026889.28913766973125
6298.8101.5715103602-2.77151036020022
63113.1105.1446768429997.95532315700119
6497.7108.537492182488-10.8374921824884
65116.3103.64864997266612.6513500273344
66107.2106.5608620082070.639137991792992
6794.588.8210262727865.67897372721407
68123.5116.8074937923956.69250620760509
69126.6135.306892493306-8.70689249330616
70126.5124.8498355115151.65016448848509
71141.4140.047663116411.35233688358954
72124.3126.053479973353-1.75347997335339
73124.9115.5082937007469.39170629925364
74108.9112.372600800479-3.47260080047873
75126.7123.5623413128673.13765868713308
76107.7113.357500396483-5.65750039648297
77121.8125.153856399775-3.35385639977471
78118.3116.4111844331911.88881556680887
79122.8100.58971601746822.2102839825317
80149.5136.79593620963512.7040637903651
81147148.689573475122-1.68957347512176
82139.3145.99850723732-6.69850723732011
83162.1161.3256660588210.774333941179265
84142.2143.165877883393-0.965877883392778
85141.4139.022799150572.37720084943001
86124.7124.864928135823-0.164928135823189
87114143.170115879426-29.1701158794258
88126.6118.5902869216948.00971307830588
89121.9136.628867189686-14.7288671896856
90125.1127.843674456522-2.7436744565224
91122.1121.9854615868750.114538413125246
92135.9147.364252207196-11.4642522071958
93148.4144.422428660093.97757133991038
94137.5139.721582528843-2.22158252884333
95145.3160.004715605443-14.7047156054434
96139.9137.3271838953292.57281610467101
97128.2135.68006196386-7.48006196386035
98115.4118.06081079513-2.66081079512979
99124.7117.0758883384177.62411166158346
100111.5123.266342255578-11.7663422555776
101121.1122.295704578738-1.1957045787378
102122.5123.608740001927-1.10874000192676
103127.4119.666950357057.73304964294964
104143.7139.4866185165954.21338148340496
105157.8149.5751330255948.22486697440613
106148.8141.8381629152636.96183708473666
107162.9157.1431538921835.75684610781713
108153.9149.1515050631444.74849493685602


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
109141.406617179124129.050372233495153.762862124753
110127.400448551296114.621471934327140.179425168265
111133.89525133318120.496490331273147.294012335088
112125.967364911902112.207592956421139.727136867383
113135.248587930581120.678153390128149.819022471035
114137.307558410042122.113058613373152.502058206711
115139.273724885247123.437805739424155.109644031071
116156.957822687201139.630152314849174.285493059552
117169.65855869907150.976538992097188.340578406043
118158.359978394713139.825673108269176.894283681157
119172.225506261968152.108321390685192.342691133252
120161.598571755364134.580639386293188.616504124436
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293201976z95ip0evnpqoeub/13y9m1293202093.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293201976z95ip0evnpqoeub/13y9m1293202093.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293201976z95ip0evnpqoeub/23y9m1293202093.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293201976z95ip0evnpqoeub/23y9m1293202093.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/24/t1293201976z95ip0evnpqoeub/3w7971293202093.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/24/t1293201976z95ip0evnpqoeub/3w7971293202093.ps (open in new window)


 
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=F, beta=F)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=F)
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