Home » date » 2010 » May » 31 »

opgave 10, oef. 2

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 31 May 2010 19:28:56 +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/May/31/t1275334295ev3chbedt8d00q7.htm/, Retrieved Mon, 31 May 2010 21:31:39 +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/2010/May/31/t1275334295ev3chbedt8d00q7.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
164 96 73 49 39 59 169 169 210 278 298 245 200 188 90 79 78 91 167 169 289 247 275 203 223 104 107 85 75 99 135 211 335 488 326 346 261 224 141 148 145 223 272 445 560 612 467 404 518 404 300 210 196 186 247 343 464 680 711 610 513 292 273 322 189 257 324 404 677 858 895 664 628 308 324 248 272
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.999933893038648
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
296164-68
37396.004495273372-23.0044952733719
44973.00152075728-24.0015207572799
53949.0015866676051-10.0015866676051
65939.000661174503319.9993388254967
716958.9986779044812110.001322095519
8169168.9927281468520.00727185314843837
9210168.9999995192841.0000004807201
10278209.99728961455368.0027103854472
11298277.99550454745320.0044954525473
12245297.998677563592-52.9986775635923
13200245.003503581529-45.0035035815294
14188200.002975044872-12.002975044872
1590188.000793480207-98.0007934802074
167990.006478534667-11.0064785346671
177879.0007276048511-1.00072760485111
189178.000066155061112.9999338449389
1916790.999140613875776.0008593861243
20169166.9949758141262.00502418587416
21289168.999867453944120.000132546056
22247288.992067155876-41.9920671558755
23275247.00277596796127.9972240320394
24203274.998149188593-71.9981491885929
25223203.00475957886619.9952404211342
26104222.998678175414-118.998678175414
27107104.0078666410192.99213335898092
2885106.999802199156-21.9998021991557
297585.0014543400737-10.0014543400737
309975.000661165755523.9993388342445
3113598.998413476635236.0015865233648
32211134.99762004451176.0023799554889
33335210.994975713606124.005024286394
34488334.991802404652153.008197595348
35326487.989885092995-161.989885092995
36346326.01070865907319.9892913409267
37261345.99867856869-84.9986785686899
38224261.005619004359-37.0056190043591
39141224.002446329025-83.0024463290253
40148141.0054870395126.9945129604884
41145147.999537614002-2.99953761400207
42223145.00019829031777.9998017096829
43272222.99484367012349.0051563298771
44445271.996760418024173.003239581976
45560444.988563281527115.011436718473
46612559.99239694339852.0076030566021
47467611.996561935395-144.996561935395
48404467.009585282116-63.009585282116
49518404.004165372219113.995834627781
50404517.992464081766-113.992464081766
51300404.007535695417-104.007535695417
52210300.006875622143-90.0068756221425
53196210.005950081048-14.0059500810482
54186196.000925890801-10.0009258908007
55247186.00066113082160.9993388691786
56343246.99596751906396.0040324809371
57464342.993653465135121.006346534865
58680463.992000638126216.007999361874
59711679.98572036753531.0142796324654
60610710.997949740215-100.997949740215
61513610.00667666756-97.0066766675601
62292513.006412816625-221.006412816625
63273292.014610062391-19.0146100623905
64322273.00125699809348.9987430019075
65189321.99676084199-132.99676084199
66257189.00879201172967.9912079882711
67324256.99550530784167.0044946921587
68404323.99557053645980.004429463541
69677403.994711150273273.005288849727
70858676.981952449921181.018047550079
71895857.98803344692737.0119665530734
72664894.997553251358-230.997553251358
73628664.015270546325-36.0152705463252
74308628.002380860098-320.002380860098
75324308.02115438502415.9788456149760
76248323.998943687070-75.9989436870705
77272248.00502405923323.9949759407669


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
78271.99841376505376.271369101634467.725458428472
79271.998413765053-4.79227827417157548.789105804277
80271.998413765053-66.9958315938169610.992659123923
81271.998413765053-119.436267341906663.433094872011
82271.998413765053-165.637417446450709.634244976556
83271.998413765053-207.406563208549751.403390738655
84271.998413765053-245.817328689671789.814156219777
85271.998413765053-281.569246345989825.566073876094
86271.998413765053-315.148216564791859.145044094897
87271.998413765053-346.908022374181890.904849904286
88271.998413765053-377.115742513674921.11257004378
89271.998413765053-405.978871303054949.97569883316
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/31/t1275334295ev3chbedt8d00q7/1lxbn1275334134.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275334295ev3chbedt8d00q7/1lxbn1275334134.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275334295ev3chbedt8d00q7/2wps81275334134.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275334295ev3chbedt8d00q7/2wps81275334134.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/31/t1275334295ev3chbedt8d00q7/3wps81275334134.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/31/t1275334295ev3chbedt8d00q7/3wps81275334134.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; par3 = multiplicative ;
 
Parameters (R input):
par1 = 12 ; par2 = Single ; 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