Home » date » 2010 » Aug » 03 »

TIJDREEKS A - STAP 32

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Tue, 03 Aug 2010 16:11:26 +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/Aug/03/t1280852115u744kx1qt87wzyk.htm/, Retrieved Tue, 03 Aug 2010 18:15:15 +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/Aug/03/t1280852115u744kx1qt87wzyk.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:
Lisa Bruggeman
 
Dataseries X:
» Textbox « » Textfile « » CSV «
95 94 93 91 111 110 95 85 86 86 87 89 93 96 99 92 109 110 97 88 93 93 89 89 91 97 99 85 101 105 88 80 87 84 87 87 85 96 102 93 111 117 101 88 98 89 93 93 95 105 109 94 113 125 106 95 109 100 94 94 94 103 103 80 106 117 99 95 116 118 100 100 105 121 131 108 136 149 131 137 164 169 154 160 166 186 197 166 191 207 187 191 222 230 210 224 234 251 258 227 254 281 261 264 286 293 276 292 299 319 329 293 318 346 327 329 353 355 332 346
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.222642629632828
beta0.178363459675705
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
393930
49192-1
511190.737646060674620.2623539393254
611095.013843126970314.9861568730297
79598.7104537206517-3.71045372065174
88598.0970547897341-13.0970547897341
98694.8736971146655-8.87369711466548
108692.2382527640152-6.23825276401523
118789.9418414863921-2.94184148639215
128988.26252750563770.737472494362294
139387.43167166341675.56832833658333
149687.8974958803298.10250411967098
159989.24929670792179.75070329207828
169291.35527013157030.644729868429721
1710991.459468754284417.5405312457156
1811096.021950493862813.9780495061372
1997100.346358583759-3.34635858375943
2088100.680726617627-12.6807266176270
219398.4332981446338-5.43329814463382
229397.5836928196699-4.58369281966986
238996.7412214133082-7.74122141330822
248994.8883354967752-5.88833549677517
259193.2141474586223-2.21414745862225
269792.27006361161474.72993638838527
279993.05986082144135.9401391785587
288594.354991469398-9.35499146939802
2910191.8732750459039.12672495409697
3010593.868810768194611.1311892318054
318896.7526597911115-8.75265979111145
328094.8619367967451-14.8619367967451
338791.0208413299216-4.02084132992162
348489.4337629906549-5.43376299065487
358787.3163262124592-0.316326212459174
368786.32568728735390.674312712646142
378585.5823846585122-0.582384658512183
389684.536160364768811.4638396352312
3910286.627183210952315.3728167890477
409390.19898569819382.80101430180625
4111191.083000966843719.9169990331563
4211796.568694201589820.4313057984102
43101102.980247958975-1.98024795897503
4488104.323396213692-16.3233962136915
4598101.824924781487-3.82492478148735
4689101.957253122791-12.9572531227913
479399.5417863759923-6.54178637599232
489398.2948931113027-5.29489311130268
499597.1153443018028-2.11534430180281
5010596.55969550762058.44030449237947
5110998.689359664052410.3106403359476
5294101.644889342503-7.6448893425027
53113100.29916410864712.7008358913533
54125103.98763147008021.0123685299201
55106110.361028988510-4.36102898850956
5695110.912044387976-15.9120443879758
57109108.2594232214420.740576778557809
58100109.343794695509-9.34379469550936
5994107.811900861538-13.8119008615384
6094104.736727448728-10.7367274487280
6194101.919849222321-7.91984922232103
6210399.41562058641043.58437941358956
6310399.61506406684513.38493593315488
648099.9045231654639-19.9045231654639
6510694.218321163932511.7816788360675
6611796.05468439605720.945315603943
6799100.763029729739-1.76302972973896
6895100.345517124125-5.34551712412465
6911698.918112618414617.0818873815854
70118103.16234854763914.8376514523606
71100107.496144460001-7.49614446000074
72100106.559803606599-6.55980360659943
73105105.571433750488-0.571433750487699
74121105.89363792372015.1063620762798
75131110.30628120941120.6937187905894
76108116.784682962256-8.78468296225641
77136116.3510845658119.6489154341899
78149123.02830145220325.9716985477967
79131132.144609561883-1.14460956188259
80137135.17821758331.82178241670010
81164138.94461628109325.0553837189073
82169148.87878717097820.1212128290218
83154158.513440992926-4.51344099292609
84160162.484136054812-2.48413605481167
85166166.807992608255-0.807992608254693
86186171.47294370158514.5270562984147
87197180.12901884063316.8709811593669
88166189.976920332023-23.9769203320228
89191189.7781827116071.22181728839314
90207195.23827826315511.7617217368449
91187203.512079231596-16.5120792315956
92191204.835210510672-13.8352105106725
93222206.20491255170615.7950874482942
94230214.79882565640915.2011743435912
95210223.864166927757-13.8641669277569
96224225.907759960778-1.90775996077838
97234230.5375992352673.46240076473342
98251236.50056168428214.4994383157181
99258245.49663088232912.5033691176709
100227254.544815148427-27.5448151484268
101254253.5827256727160.417274327284417
102281258.86275983794322.1372401620573
103261269.857683111974-8.85768311197404
104264273.600064965789-9.60006496578859
105286276.7959298185539.20407018144738
106293284.5439024498768.45609755012367
107276292.461147196273-16.4611471962726
108292294.177057334920-2.17705733491965
109299298.9867610041640.0132389958356498
110319304.28464374602714.7153562539728
111329313.44021060485015.5597893951496
112293323.401683894197-30.401683894197
113318321.922883224305-3.92288322430511
114346326.18360953447319.8163904655268
115327336.516644983285-9.516644983285
116329339.940977848495-10.9409778484946
117353342.6137129394410.3862870605601
118355350.4472594346314.55274056536859
119332357.162805088589-25.1628050885895
120346356.263155571568-10.2631555715683


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121358.273239854298334.134989736376382.411489972221
122362.568340081813337.613199701773387.523480461853
123366.863440309328340.864931236798392.861949381857
124371.158540536842343.882486442201398.434594631484
125375.453640764357346.665124464909404.242157063805
126379.748740991872349.2176619798410.279820003944
127384.043841219386351.548839263316416.538843175457
128388.338941446901353.669769974652423.00811291915
129392.634041674416355.59266803114429.675415317691
130396.929141901931357.329917604624436.528366199237
131401.224242129445358.893464417798443.555019841092
132405.51934235696360.294464557766450.744220156153
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/03/t1280852115u744kx1qt87wzyk/1f38x1280851881.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/03/t1280852115u744kx1qt87wzyk/1f38x1280851881.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/03/t1280852115u744kx1qt87wzyk/2f38x1280851881.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/03/t1280852115u744kx1qt87wzyk/2f38x1280851881.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/03/t1280852115u744kx1qt87wzyk/3qdpi1280851881.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/03/t1280852115u744kx1qt87wzyk/3qdpi1280851881.ps (open in new window)


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