Home » date » 2010 » Jan » 16 »

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: Sat, 16 Jan 2010 02:10:15 -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/16/t126363306356qv88hyz32h22v.htm/, Retrieved Sat, 16 Jan 2010 10:11:07 +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/16/t126363306356qv88hyz32h22v.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 «
102,5 77,7 82,8 77,3 103,1 99,7 99,5 107,2 96,7 97,1 105,2 151,2 102,7 75,4 87,2 83,7 105,8 111,5 99,7 111,2 101,5 110,9 116,3 164,9 118,1 83,7 84 107,2 113,7 120,7 111,2 112,4 112,5 130,4 130,7 174,3 132,2 91,8 104,2 104,8 131,4 141,2 132,7 135,7 136,9 151,2 144 201,5 149,6 108,7 122,8 126,7 139,9 162,5 142,7 151,6 148,1 159 157,8 226,7 153,7 122,3 117,6 166 154,5 183,9 164,4 173,3 160,2 166,4 170,3 238,4 166,8 122,5 141,8 140,5 173,8 188,8 168 187,4 177,7 183,8 196,1 264,6 193,7 141,3 170,1 163,7 190,1 230,7 195,9 210,3 204,7 210,3 221,2 288,2 203,2 162,4 149,2 195,3 213,7 227,9 212,1 226,8 212,6 220,9 228,1 311,6
 
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.779753800673534
beta0.0793509153332443
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
382.852.929.9
477.353.264676556897524.0353234431025
5103.150.543515155465452.5564848445346
699.773.313727045184126.3862729548159
799.577.310245694224122.1897543057759
8107.279.407485780731527.7925142192685
996.787.5931381708599.10686182914098
1097.181.772061679900515.3279383200995
11105.281.750296808249223.4497031917508
12151.289.51244006851161.687559931489
13102.7130.907564503555-28.2075645035545
1475.4100.461304136446-25.0613041364463
1587.270.917704660009316.2822953399907
1683.774.61938764600059.08061235399953
17105.873.26738637590732.532613624093
18111.592.215100949831619.2848990501684
1999.7102.026097007533-2.32609700753298
20111.294.84191141303516.3580885869651
21101.5103.238933830329-1.73893383032922
22110.997.417139135832613.4828608641674
23116.3104.29883763804712.0011623619529
24164.9110.76773815571454.1322618442861
25118.1153.43791281633-35.3379128163299
2683.7124.156874437090-40.4568744370903
278488.381070435679-4.38107043567891
28107.280.46443658555126.7355634144489
29113.798.465357248997815.2346427510022
30120.7108.44102230844712.2589776915533
31111.2116.854915393813-5.65491539381316
32112.4110.9504890203831.44951097961687
33112.5110.6754534133421.82454658665755
34130.4110.80574556622019.5942544337803
35130.7126.0044133327974.69558666720341
36174.3129.87632384781944.4236761521807
37132.2167.475041569822-35.2750415698216
3891.8140.745767044656-48.9457670446562
39104.2100.3282132789643.8717867210365
40104.8101.3349114243993.4650885756007
41131.4102.23888465188729.1611153481135
42141.2124.98375245387116.2162475461295
43132.7138.638177372251-5.93817737225129
44135.7134.6501854161431.04981458385743
45136.9136.1760631611230.723936838876767
46151.2137.49262949259813.7073705074020
47144149.781209853091-5.78120985309053
48201.5146.51578800130454.984211998696
49149.6194.034537698370-44.4345376983697
50108.7161.281788974127-52.5817889741272
51122.8118.9227351415963.87726485840433
52126.7120.8277456927095.87225430729127
53139.9124.65169775609715.2483022439030
54162.5136.73013499781825.7698650021823
55142.7158.607289998823-15.9072899988232
56151.6147.0022744965454.59772550345537
57148.1151.670603250397-3.57060325039677
58159149.7487184728499.25128152715087
59157.8158.397162520648-0.597162520647913
60226.7159.32929595146667.3707040485338
61153.7217.428138585300-63.7281385852997
62122.3169.359034232662-47.0590342326617
63117.6131.375988300761-13.7759883007609
64166118.49314598251147.5068540174887
65154.5156.335280411047-1.83528041104654
66183.9155.58914151908828.310858480912
67164.4180.101280095595-15.7012800955952
68173.3169.3232825446953.97671745530485
69160.2174.135334496716-13.9353344967155
70166.4164.1181584966832.28184150331720
71170.3166.8875741857963.41242581420397
72238.4170.74970832992467.6502916700761
73166.8228.88736869856-62.08736869856
74122.5182.019990413152-59.5199904131522
75141.8133.4717846330088.3282153669924
76140.5138.3437766573352.15622334266513
77173.8138.53654898948635.2634510105144
78188.8166.72670496370722.0732950362925
79168185.997553667658-17.9975536676583
80187.4172.90942196256714.4905780374328
81177.7186.050627033477-8.35062703347731
82183.8180.8646274564202.93537254357975
83196.1184.66055270669711.439447293303
84264.6195.79536896024868.804631039752
85193.7255.918135242085-62.2181352420852
86141.3210.025705577425-68.7257055774252
87170.1154.80662668306715.2933733169331
88163.7166.048008785723-2.34800878572329
89190.1163.38817503157326.7118249684268
90230.7185.04062930210345.659370697897
91195.9224.292640390243-28.3926403902434
92210.3204.0455431046596.25445689534143
93204.7211.201640987912-6.50164098791174
94210.3208.0088393743402.29116062566044
95221.2211.8140219174809.3859780825195
96288.2221.73216501456666.467834985434
97203.2280.272745622270-77.0727456222696
98162.4222.118200182675-59.7182001826750
99149.2173.800912971491-24.6009129714909
100195.3151.34430266888843.955697331112
101213.7185.06469244381428.6353075561856
102227.9208.61073617554719.2892638244528
103212.1226.062674126053-13.9626741260532
104226.8216.72235809820110.0776419017989
105212.6226.751115669478-14.1511156694778
106220.9217.0118187916973.88818120830285
107228.1221.5793102313156.5206897686846
108311.6228.60297254444182.9970274555593


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
109300.394722665652237.78616821994363.003277111363
110307.469225183785225.637721172808389.300729194761
111314.543727701917215.063998818754414.023456585081
112321.618230220050205.216731985719438.019728454382
113328.692732738183195.705193781353461.680271695013
114335.767235256316186.317042516501485.217427996131
115342.841737774449176.925053745310508.758421803588
116349.916240292582167.448005311602532.384475273562
117356.990742810715157.831746541346556.149739080084
118364.065245328848148.039074311124580.091416346571
119371.139747846981138.043903702881604.23559199108
120378.214250365114127.827714695670628.600786034557
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/16/t126363306356qv88hyz32h22v/1de361263633012.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t126363306356qv88hyz32h22v/1de361263633012.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/16/t126363306356qv88hyz32h22v/2sim81263633012.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t126363306356qv88hyz32h22v/2sim81263633012.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/16/t126363306356qv88hyz32h22v/3o7tj1263633012.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/16/t126363306356qv88hyz32h22v/3o7tj1263633012.ps (open in new window)


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