Home » date » 2010 » Jan » 17 »

Opdracht 10 b

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sat, 16 Jan 2010 16:22:37 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/17/t1263684218ba3wy94ozpew4dz.htm/, Retrieved Sun, 17 Jan 2010 00:23:43 +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/Jan/17/t1263684218ba3wy94ozpew4dz.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:
KDGP2W62
 
Dataseries X:
» Textbox « » Textfile « » CSV «
84.9 81.9 95.9 81 89.2 102.5 89.8 88.8 83.2 90.2 100.4 187.1 87.6 85.4 86.1 86.7 89.1 103.7 86.9 85.2 80.8 91.2 102.8 182.5 80.9 83.1 88.3 86.6 93 105.3 93.8 86.4 87 96.7 100.5 196.7 86.8 88.2 93.8 85 90.4 115.9 94.9 87.7 91.7 95.9 106.8 204.5 90.2 90.5 93.2 97.8 99.4 120 108.2 98.5 104.3 102.9 111.1 188.1 93.8 94.5 112.4 102.5 115.8 136.5 122.1 110.6 116.4 112.6 121.5 199.3 102.1 100.6 119 106.8 121.3 145.5 129.7 117.7 121.3 124.3 135.2 210.1 106.8 110.5 111.5 122.1 126.3 143.2 137.3 121.5 121.9 123.9 131.6 220.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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.0536868572060943
beta0.0982858832672798
gamma0.910497809224067


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1387.687.47244697004080.127553029959202
1485.485.4652147636646-0.0652147636646419
1586.186.3288295614751-0.228829561475138
1686.786.914198608956-0.214198608956039
1789.189.120207340686-0.0202073406860137
18103.7103.751481005857-0.0514810058570134
1986.989.3286739359633-2.42867393596329
2085.287.9022547215732-2.70225472157323
2180.882.3631625078487-1.5631625078487
2291.289.26169356400181.93830643599817
23102.899.1397255843363.66027441566408
24182.5184.890092969064-2.39009296906366
2580.986.6044003132953-5.70440031329531
2683.184.1028982193727-1.00289821937268
2788.384.7109345002493.58906549975099
2886.685.4725083006011.12749169939896
299387.85873629321875.14126370678134
30105.3102.5828637094582.71713629054153
3193.886.42575365901257.37424634098748
3286.485.35508984104941.0449101589506
338781.07755976643415.92244023356587
3496.791.58429678606735.1157032139327
35100.5103.381845750047-2.88184575004691
36196.7184.38406061385912.3159393861415
3786.882.8616000280943.93839997190599
3888.285.16391602261023.03608397738985
3993.890.28861769121113.51138230878888
408589.1070000115617-4.10700001156169
4190.495.0274568479773-4.62745684797727
42115.9107.6099461110738.29005388892676
4394.995.5695471684893-0.669547168489245
4487.788.5650001443302-0.865000144330168
4591.788.48037920087953.21962079912046
4695.998.4804238591472-2.58042385914717
47106.8103.1413750011513.65862499884895
48204.5200.1812696512424.31873034875846
4990.288.41197432134721.78802567865283
5090.589.90447172613150.595528273868482
5193.295.469114356397-2.26911435639711
5297.887.261250470640310.5387495293597
5399.493.7695053634645.63049463653603
54120119.0551608579170.94483914208287
55108.298.33394361563519.86605638436485
5698.591.59296333249956.90703666750055
57104.395.81397159186198.48602840813813
58102.9101.5979923852771.30200761472348
59111.1112.718341323270-1.61834132327026
60188.1216.162802775936-28.0628027759363
6193.894.7348742910747-0.934874291074749
6294.595.2053216060283-0.705321606028292
63112.498.518784407651213.8812155923488
64102.5102.556522899516-0.0565228995160396
65115.8104.50793914713211.2920608528676
66136.5127.5921382898708.90786171012984
67122.1114.2791536419277.82084635807337
68110.6104.3750226585686.22497734143208
69116.4110.4372129058935.96278709410657
70112.6110.0060254988682.59397450113164
71121.5119.4788678414942.02113215850621
72199.3206.569975262126-7.2699752621262
73102.1101.8963504886850.203649511315049
74100.6102.917299765070-2.31729976507039
75119120.258732181516-1.25873218151563
76106.8110.923395793423-4.12339579342331
77121.3123.456787301719-2.15678730171933
78145.5145.3222845633830.177715436617405
79129.7129.5612817976950.138718202305370
80117.7117.0500446797310.649955320269257
81121.3122.869961720829-1.56996172082857
82124.3118.8225352079395.47746479206111
83135.2128.4042054512016.7957945487993
84210.1212.482950264386-2.38295026438641
85106.8108.388470443026-1.58847044302576
86110.5107.0251548452713.47484515472908
87111.5126.743431486855-15.2434314868553
88122.1113.4337247519078.66627524809331
89126.3129.244089618442-2.94408961844211
90143.2154.561506283968-11.3615062839677
91137.3137.1595777124520.140422287548063
92121.5124.331045370537-2.83104537053738
93121.9128.184714245078-6.2847142450776
94123.9129.950505473243-6.05050547324274
95131.6140.341352628503-8.74135262850268
96220.9218.2302912367172.66970876328344


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
97110.937461598575100.093192696182121.781730500967
98113.948107193902103.080285419281124.815928968524
99117.172597960547106.275431725216128.069764195877
100125.422001563343114.481454771639136.362548355047
101130.740301880711119.750622152608141.729981608815
102149.318877821006138.227934500818160.409821141194
103142.047444371941130.927641558720153.167247185163
104125.987281168629114.878706054167137.095856283091
105126.925928324180115.756420840829138.095435807532
106129.220367716602117.974692796636140.466042636567
107137.861879301625126.483067256692149.240691346559
108229.713370985837185.529030909053273.897711062621
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/17/t1263684218ba3wy94ozpew4dz/1nhdf1263684155.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/17/t1263684218ba3wy94ozpew4dz/1nhdf1263684155.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/17/t1263684218ba3wy94ozpew4dz/27t8h1263684155.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/17/t1263684218ba3wy94ozpew4dz/27t8h1263684155.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/17/t1263684218ba3wy94ozpew4dz/3423l1263684155.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/17/t1263684218ba3wy94ozpew4dz/3423l1263684155.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