Home » date » 2010 » Dec » 21 »

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: Tue, 21 Dec 2010 20:45:40 +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/21/t1292964268obmo3wfx642giiy.htm/, Retrieved Tue, 21 Dec 2010 21:44:28 +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/21/t1292964268obmo3wfx642giiy.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 «
102,8 106,3 103,7 106,9 104,3 105,4 96,2 95,7 95,9 93,6 94,7 94,5 96,6 96,7 98,9 102 105,2 106,4 99,3 96,4 93,1 95,6 93,3 96,7 105,6 105,2 107 104,9 104,5 105,2 99,7 100,2 98,5 98,4 97,1 98,4 100,6 111,3 119 117,8 108,8 109,3 103,5 103,7 110 105,5 110,4 106,7 110,2 105,2 108 108,1 107,2 106 99,4 100,2 100,3 100,8 99,5 100,2 103 111 120,5 109,5 106,6 105,5 103,9 104,9 104,8 99,6 97 95,4 99,3 103,9 107,4 107,4 111 113,2 108,5 113,3 113,8 105,3 107,5 109,4 118,9 119 115 124,1 120,5 117,7 117,1 118,1 119,6 118,8 124,9 124 124,9 121,7 121,6 125,1 127,9 129 130,1 130,3 127,9 124,1 125,7 129,2 129,2 132,6 131,5 131 125,8 127,2 127,3 127,5 122 118,4 118,3 115,5
 
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.77855541108374
beta0
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1396.697.7089398501379-1.10893985013787
1496.796.7897038891088-0.089703889108776
1598.999.008428293043-0.108428293043062
16102102.059395097890-0.0593950978896061
17105.2105.186786643980.0132133560200600
18106.4106.3609462740920.0390537259078485
1999.394.76163456390494.53836543609511
2096.498.4338157545798-2.03381575457982
2193.197.6440661311446-4.54406613114462
2295.692.22777313204273.37222686795727
2393.396.1313235211291-2.83132352112911
2496.793.65289125540943.04710874459056
25105.697.73983456090947.86016543909055
26105.2104.0419962141021.15800378589783
27107107.422705544400-0.422705544400458
28104.9110.500499711075-5.60049971107517
29104.5109.459383802520-4.95938380251964
30105.2106.772248171377-1.57224817137711
3199.794.96409025074964.7359097492504
32100.297.33598270401072.86401729598933
3398.599.772324387962-1.27232438796197
3498.498.6266956788422-0.226695678842148
3597.198.3365377411824-1.23653774118236
3698.498.428954656649-0.0289546566489065
37100.6101.131533757941-0.531533757941119
38111.399.4742105930411.8257894069599
39119110.8805008934438.1194991065566
40117.8119.621984034453-1.82198403445284
41108.8122.058320044582-13.2583200445820
42109.3113.788979031937-4.48897903193748
43103.5100.6209295717582.87907042824216
44103.7101.0631267610922.63687323890774
45110102.3831000445957.61689995540515
46105.5108.397295902632-2.89729590263192
47110.4105.7748474739234.62515252607683
48106.7110.865527500676-4.16552750067643
49110.2110.480711300359-0.280711300359158
50105.2111.655364126819-6.4553641268194
51108107.8572689480420.142731051957824
52108.1108.162258536412-0.0622585364121022
53107.2109.078464936905-1.87846493690466
54106111.536263536928-5.53626353692796
5599.499.3234221210870.076577878912957
56100.297.59263292674542.60736707325459
57100.399.88917561253520.410824387464814
58100.898.15207132148232.64792867851769
5999.5101.415569659227-1.91556965922692
60100.299.4854831229930.714516877007043
61103103.528165322715-0.528165322714656
62111103.0781085708337.92189142916675
63120.5112.0379899232238.4620100767766
64109.5118.789206739553-9.28920673955265
65106.6112.131688191518-5.53168819151797
66105.5110.903813653349-5.40381365334935
67103.999.99324707259363.90675292740639
68104.9101.7477174395403.15228256045957
69104.8103.9730118665930.826988133407127
7099.6102.975518176800-3.3755181768005
7197100.531705543012-3.53170554301244
7295.497.9224402468721-2.52244024687209
7399.399.0334111994120.266588800588096
74103.9100.9110358618222.98896413817772
75107.4105.8495573877991.55044261220125
76107.4103.5906971637853.80930283621491
77111107.8777490643133.12225093568661
78113.2113.475033976598-0.275033976597953
79108.5108.2504114059290.249588594070985
80113.3106.9097332385396.39026676146052
81113.8111.0903211236542.70967887634609
82105.3110.400689552354-5.10068955235367
83107.5106.5659085498350.934091450164686
84109.4107.6829761155071.71702388449324
85118.9113.2392308798725.66076912012845
86119120.321643898434-1.32164389843385
87115121.920810426206-6.9208104262064
88124.1113.28916021140710.8108397885933
89120.5123.013621652757-2.51362165275742
90117.7123.689352238269-5.98935223826882
91117.1113.8799804636883.22001953631215
92118.1116.1315348776191.96846512238109
93119.6115.9808455418843.61915445811552
94118.8114.0268060561714.77319394382938
95124.9119.3882239945735.51177600542707
96124124.322050280934-0.322050280933666
97124.9129.793813980514-4.8938139805139
98121.7127.177267622756-5.4772676227563
99121.6124.273599698928-2.6735996989277
100125.1122.7420245490082.35797545099160
101127.9122.9194734852394.98052651476061
102129128.7028152300090.297184769990992
103130.1125.5138488349004.58615116510025
104130.3128.491099824251.80890017574998
105127.9128.429155155938-0.529155155938128
106124.1123.1474341184080.952565881591767
107125.7125.731156537994-0.0311565379938656
108129.2125.0532938877544.14670611224612
109129.2133.120574075532-3.92057407553236
110132.6131.1327657098151.46723429018539
111131.5134.417858232361-2.9178582323612
112131133.946299047731-2.94629904773143
113125.8130.482888123026-4.68288812302639
114127.2127.698289009671-0.498289009671254
115127.3124.8444067231152.45559327688485
116127.5125.5747178738331.92528212616745
117122125.134490760238-3.13449076023811
118118.4118.3361360798270.0638639201727642
119118.3119.935325135947-1.635325135947
120115.5118.896673067673-3.39667306767285


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121118.980330752302110.84551129802127.115150206585
122121.056842234052110.713119969415131.400564498688
123122.116415073612109.897024073180134.335806074043
124123.771709292713110.116558223922137.426860361504
125122.275186176138107.071037540023137.479334812253
126124.012708175293107.720046410486140.305369940100
127122.238295909037104.89806015235139.578531665724
128120.986176406582102.883255152599139.089097660565
129118.06976319321199.3601554020778136.779370984345
130114.53761182921194.6229844919517134.452239166471
131115.66877299779394.7971668929008136.540379102686
132115.5NANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292964268obmo3wfx642giiy/1w0hx1292964335.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292964268obmo3wfx642giiy/1w0hx1292964335.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292964268obmo3wfx642giiy/27azi1292964335.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292964268obmo3wfx642giiy/27azi1292964335.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292964268obmo3wfx642giiy/37azi1292964335.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292964268obmo3wfx642giiy/37azi1292964335.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