Home » date » 2010 » Jan » 26 »

Opgave 10 opdracht 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, 26 Jan 2010 04:36:02 -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/26/t1264505795u886cc1dx8w4g1w.htm/, Retrieved Tue, 26 Jan 2010 12:36:40 +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/26/t1264505795u886cc1dx8w4g1w.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 «
24.3 29.4 31.8 36.7 37.1 37.7 39.4 43.3 39.6 34.3 32 29.6 22.3 28.9 31.7 34.2 38.6 37.2 38.8 43.4 38.8 36.3 33 29.2 22.64 28.44 30.14 34.39 36.82 36.74 38.9 42.8 39.09 37.49 33.17 30.98 21.2 27.8 29 35.4 37.5 34.7 38.4 39.9 35.9 34.7 30.4 29 21.5 28 29.3 34.3 36.6 36.2 37.5 41.6 39.4 37.3 32.7 30.7 22.9 29.1 29.5 37.1 37.7 38.4 39.4 40.6 39.7 36.6 32.8 31.6 24.1 30.3 31.8 38.7 37.8 38.4 40.7 43.8 41.5 39.3 35.9 33.4
 
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
alpha1
beta0.124974553803989
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
331.834.5-2.7
436.736.56256870472920.137431295270773
537.141.4797441195344-4.3797441195344
637.741.33238755242-3.63238755241994
739.441.4784315388131-2.0784315388131
843.342.91868048463780.381319515362208
939.646.8663357209269-7.26633572092693
1034.342.2582286564141-7.95822865641411
113235.9636525810086-3.96365258100864
1229.633.1682968682631-3.56829686826305
1322.330.3223505593117-8.02235055931171
1428.922.01976087770266.88023912229745
1531.729.47961569207642.22038430792358
1634.232.55710723023251.64289276976746
1738.635.26242702108203.33757297891796
1837.240.0795387149106-2.87953871491056
1938.838.31966964885330.480330351146698
2043.439.97969872016643.42030127983363
2138.845.0071493464888-6.20714934648879
2236.339.6314136265166-3.33141362651664
233336.7150716950062-3.71507169500619
2429.232.9507822675730-3.75078226757296
2522.6428.6820299272671-6.04202992726712
2628.4421.36692993303667.07307006696344
2730.1428.05088370867972.08911629132033
2834.3930.01197008503214.37802991496793
2936.8234.80911242019572.01088757980430
3036.7437.4904221982317-0.750422198231725
3138.937.31663851884311.58336148115689
3242.839.67451841346113.12548158653888
3339.0943.9651240801614-4.87512408016138
3437.4939.6458576235041-2.15585762350415
3533.1737.7764302789418-4.60643027894179
3630.9832.8807437102019-1.90074371020185
3721.230.4531991131236-9.25319911312364
3827.819.51678468270158.28321531729845
392927.15197582104331.84802417895671
4035.428.58293181822746.81706818177262
4137.535.83489187249581.66510812750422
4234.738.142988017766-3.44298801776602
4338.434.91270212649323.48729787350676
4439.939.04852562221630.85147437778366
4535.940.6549382526554-4.75493825265538
4634.736.0606919661643-1.36069196616425
4730.434.6906400948282-4.29064009482821
482929.8544192634435-0.854419263443546
4921.528.3476385972332-6.84763859723316
502819.99185801893308.00814198106703
5129.327.49267198981581.80732801018419
5234.329.01854200146605.28145799853396
5336.634.67858985826731.92141014173268
5436.237.2187172334048-1.01871723340482
5537.536.69140350170760.808596498292374
5641.638.09245748828923.50754251171082
5739.442.6308110486388-3.23081104863876
5837.340.0270418794101-2.72704187941014
5932.737.5862310373261-4.88623103732606
6030.732.3755764936530-1.67557649365304
6122.930.1661720689943-7.2661720689943
6229.121.45808545680877.64191454319127
6329.528.61313031705230.88686968294773
6437.129.12396645996097.97603354003905
6537.737.720767692753-0.0207676927529761
6638.438.31817225961760.0818277403823586
6739.439.02839864496070.371601355039289
6840.640.07483935849970.5251606415003
6939.741.3404710753466-1.64047107534662
7036.640.2354539346768-3.63545393467682
7132.836.6811147013156-3.88111470131564
7231.632.3960741232566-0.79607412325661
7324.131.0965851149077-6.99658511490772
7430.322.72219001202057.5778099879795
7531.829.86922343407961.93077656592036
7638.731.61052137390077.08947862609926
7737.839.3965258019004-1.59652580190041
7838.438.29700070217130.102999297828653
7940.738.90987299345961.79012700654039
8043.841.43359331735452.36640668264553
8141.544.8293339366369-3.32933393663686
8239.342.1132519134412-2.8132519134412
8335.939.5616670108207-3.66166701082066
8433.435.7040518099646-2.30405180996457


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
8532.91610396307324.567989222429541.2642187037164
8632.432207926145919.866790045335244.9976258069567
8731.948311889218915.615122422361348.2815013560765
8831.464415852291911.501499421657951.4273322829259
8930.98051981536497.4156827257743254.5453569049554
9030.49662377843783.3065413979339857.6867061589417
9130.0127277415108-0.85298282193364460.8784383049553
9229.5288317045838-5.0782922876390264.1359556968066
9329.0449356676568-9.378499432679867.4683707679933
9428.5610396307297-13.759062543619170.8811418050785
9528.0771435938027-18.223202389749574.3774895773549
9627.5932475568757-22.772716080571577.9592111943229
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/26/t1264505795u886cc1dx8w4g1w/1fqnz1264505760.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/26/t1264505795u886cc1dx8w4g1w/1fqnz1264505760.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/26/t1264505795u886cc1dx8w4g1w/2j77u1264505760.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/26/t1264505795u886cc1dx8w4g1w/2j77u1264505760.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/26/t1264505795u886cc1dx8w4g1w/3ktsp1264505760.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/26/t1264505795u886cc1dx8w4g1w/3ktsp1264505760.ps (open in new window)


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