Home » date » 2010 » Jan » 25 »

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Mon, 25 Jan 2010 13:15:08 -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/25/t12644505589jw94c49ex8047m.htm/, Retrieved Mon, 25 Jan 2010 21:16:04 +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/25/t12644505589jw94c49ex8047m.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 «
5789 6333 6901 5813 6504 5619 5867 6084 5258 5601 5081 4678 5463 5546 6810 6407 5985 5119 5904 5034 4922 6083 4365 4464 4557 5885 5286 6017 5376 5935 6276 5510 5998 5193 4602 5326 5307 5014 6153 6441 5584 6427 6062 5589 6216 5809 4989 6706 7174 6122 8075 6292 6337 8576 6077 5931 6288 7167 6054 6468 6403 6927 7914 7728 8701 8522 6481 7502 7778 7424 6941 8574 9171 7718 9083 7164 8213 8124 7075 7026 7390 7778 6203 6905 7087 6495 7664 6516 6322 7828 6708 6717 5707 8063 6315 5893 6914 7319 6615 7341 6210 7408 6168 5878 6834 6211 5982 6973
 
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.227226293087861
beta0.00400719516398090
gamma0.468268628242811


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
1354635564.62030934466-101.620309344661
1455465645.370230533-99.3702305330025
1568106947.82867380658-137.828673806577
1664076473.49533036791-66.4953303679094
1759856018.63991562603-33.6399156260304
1851195155.82803312001-36.8280331200131
1959045607.62182296341296.378177036587
2050345908.09839262955-874.098392629551
2149224944.12993792744-22.1299379274387
2260835218.77152118562864.228478814378
2343654889.35761956567-524.357619565667
2444644405.3657905315258.6342094684833
2545575120.96749380307-563.967493803075
2658855084.51720181596800.48279818404
2752866500.28623857647-1214.28623857647
2860175842.51903868147174.480961318528
2953765488.01101343521-112.011013435206
3059354680.04532826851254.9546717315
3162765525.22771223572750.772287764278
3255105497.8596827090212.1403172909777
3359985036.32253345798961.677466542022
3451935886.82285300407-693.82285300407
3546024696.88212709086-94.8821270908611
3653264519.87855823765806.121441762346
3753075206.21138924348100.78861075652
3850145862.86548180036-848.86548180036
3961536167.51037641228-14.5103764122814
4064416297.004497691143.995502309000
4155845803.71369864202-219.71369864202
4264275424.45265462471002.54734537530
4360626040.7731626340721.2268373659344
4455895575.8774611615713.1225388384264
4562165443.4791066912772.520893308798
4658095646.23803220823162.761967791771
4749894839.22847908395149.771520916050
4867065043.289379918821662.71062008118
4971745694.408430606071479.59156939393
5061226358.08576395324-236.085763953241
5180757254.01794292782820.98205707218
5262927681.66551547145-1389.66551547145
5363376614.10719025756-277.107190257564
5485766672.86387477271903.1361252273
5560777154.25202246334-1077.25202246334
5659316376.98248550287-445.982485502868
5762886428.93049316508-140.930493165078
5871676191.21066920885975.789330791152
5960545469.68382585193584.316174148069
6064686377.1189383678490.8810616321607
6164036589.49810437552-186.498104375516
6269276254.52454015845672.475459841549
6379147774.53806132073139.461938679266
6477287221.93899691618506.061003083815
6587016966.450530146641734.54946985336
6685228359.83831051347162.161689486527
6764817276.77058106426-795.770581064257
6875026766.5726491668735.427350833205
6977787238.94888090384539.051119096164
7074247585.31733620368-161.317336203680
7169416337.61620357216603.383796427842
7285747143.827379204311430.17262079569
7391717581.827942222581589.17205777742
7477187968.311187041-250.311187041008
7590839318.25292636613-235.252926366129
7671648737.87363004178-1573.87363004178
7782138431.35671139932-218.356711399318
7881248836.0324898033-712.032489803305
7970757163.79785863682-88.7978586368235
8070267375.32200042453-349.322000424528
8173907531.14629362274-141.146293622739
8277787469.69768740157308.302312598425
8362036595.34870468105-392.348704681050
8469057424.91832742048-519.918327420483
8570877435.72618656723-348.726186567232
8664956797.93282439275-302.932824392748
8776647937.71647368105-273.716473681052
8865166981.53634082563-465.536340825629
8963227347.30617119082-1025.30617119082
9078287340.32445446061487.675545539393
9167086309.53217276756398.467827232438
9267176519.05061806593197.949381934065
9357076845.19391198431-1138.19391198431
9480636699.156042761661363.84395723834
9563155907.39682102024407.60317897976
9658936818.06315412562-925.063154125619
9769146781.4279857217132.572014278303
9873196298.260547445641020.73945255436
9966157732.32433212231-1117.32433212231
10073416548.57837227765792.421627722353
10162106987.14737327979-777.147373279788
10274087590.3860097346-182.386009734596
10361686385.39907855026-217.399078550256
10458786379.84234581784-501.842345817840
10568346057.93455901892776.065440981076
10662117241.26909505805-1030.26909505805
10759825651.11627772225330.883722277754
10869736027.16018506365945.839814936346


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1096795.910815267215948.801380450657643.02025008377
1106593.113223027135687.948987247897498.27745880638
1116988.195488464076011.102227878227965.28874904992
1126744.929640290365724.195339301527765.6639412792
1136439.513853707965383.413626369487495.61408104644
1147420.669422082646239.223848969218602.11499519606
1156253.97608712945121.718854009417386.23332024938
1166192.255639192125015.956533941467368.55474444279
1176444.651767320625193.643921009217695.65961363203
1186782.108266145385445.20475346348119.01177882736
1195899.227134356044626.970348887777171.4839198243
1206416.531319447435316.101837863787516.96080103108
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/25/t12644505589jw94c49ex8047m/18p2b1264450506.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t12644505589jw94c49ex8047m/18p2b1264450506.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/25/t12644505589jw94c49ex8047m/2nee71264450506.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t12644505589jw94c49ex8047m/2nee71264450506.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/25/t12644505589jw94c49ex8047m/3jqyl1264450506.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/25/t12644505589jw94c49ex8047m/3jqyl1264450506.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