Home » date » 2009 » Jun » 08 »

Opgave 10 OEFENING 2 - Tabakprijs - Quincy Cabral MAR201a

*Unverified author*
R Software Module: rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Sun, 07 Jun 2009 19:29:27 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/08/t12444251274657v0lwc7tzy3y.htm/, Retrieved Mon, 08 Jun 2009 03:38:47 +0200
 
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/2009/Jun/08/t12444251274657v0lwc7tzy3y.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3.27 3.27 3.27 3.27 3.27 3.28 3.32 3.34 3.34 3.35 3.35 3.35 3.35 3.35 3.4 3.42 3.42 3.42 3.42 3.42 3.42 3.42 3.42 3.42 3.42 3.42 3.43 3.47 3.51 3.52 3.52 3.52 3.52 3.52 3.52 3.52 3.52 3.52 3.58 3.6 3.61 3.61 3.61 3.63 3.68 3.69 3.69 3.69 3.69 3.69 3.69 3.69 3.69 3.78 3.79 3.79 3.8 3.8 3.8 3.8 3.81 3.95 3.99 4 4.06 4.16 4.19 4.2 4.2 4.2 4.2 4.2 4.23 4.38 4.43 4.44 4.44 4.44 4.44 4.44 4.45 4.45 4.45 4.45 4.45 4.45 4.45 4.45 4.46 4.46 4.46 4.48 4.58 4.67 4.68 4.68 4.69 4.69 4.69 4.69 4.69 4.69 4.69 4.73 4.78 4.79 4.79 4.8 4.8 4.81 5.16 5.26 5.29 5.29 5.29 5.3 5.3 5.3 5.3 5.3 5.3 5.3 5.3 5.35 5.44 5.47 5.47 5.48 5.48 5.48 5.48
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha1
beta0.0339940381487946
gamma0


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
33.273.270
43.273.270
53.273.270
63.283.270.00999999999999979
73.323.280339940381490.0396600596185119
83.343.321688145961140.0183118540388567
93.343.34231063982591-0.00231063982591495
103.353.342232091847520.0077679081524753
113.353.35249615441360-0.00249615441359641
123.353.35241130004524-0.00241130004523527
133.353.35232933021951-0.00232933021950954
143.353.35225014687917-0.00225014687916625
153.43.352173655300320.0478263446996841
163.423.403799465886550.0162005341134459
173.423.42435018746124-0.00435018746123728
183.423.42420230702273-0.00420230702272573
193.423.42405945363748-0.00405945363748206
203.423.42392145641567-0.00392145641566621
213.423.42378815027667-0.00378815027667345
223.423.42365937575165-0.00365937575165454
233.423.42353497879275-0.00353497879275233
243.423.42341481058882-0.00341481058881632
253.423.42329872738739-0.00329872738738901
263.423.42318659032274-0.00318659032273949
273.433.423078265249740.00692173475025637
283.473.43331356296490.0366864370351001
293.513.474560683105010.0354393168949851
303.523.515765408595510.00423459140449056
313.523.52590935945726-0.00590935945725857
323.523.52570847646643-0.00570847646643369
333.523.52551442229966-0.00551442229966215
343.523.52532696481764-0.00532696481763884
353.523.52514587977241-0.00514587977241066
363.523.52497095053912-0.00497095053911822
373.523.52480196785686-0.00480196785685605
383.523.52463872957834-0.00463872957834077
393.583.524481040428090.0555189595719074
403.63.586368354057760.0136316459422385
413.613.606831748749950.00316825125004705
423.613.61693945040381-0.00693945040381161
433.613.61670355046205-0.00670355046205273
443.633.616475669711910.0135243302880865
453.683.636935416311660.0430645836883365
463.693.688399355412430.00160064458757292
473.693.6984537677856-0.00845376778559936
483.693.69816639008099-0.00816639008099473
493.693.69788878150504-0.00788878150504368
503.693.69762060996561-0.00762060996561376
513.693.69736155465973-0.00736155465972521
523.693.69711130568979-0.00711130568978824
533.693.69686956369288-0.00686956369288172
543.783.696636039482640.0833639605173593
553.793.78946991713670.00053008286329792
563.793.79948793679378-0.00948793679377902
573.83.799165403508460.000834596491541717
583.83.80919377481343-0.00919377481343053
593.83.80888124128169-0.00888124128169121
603.83.80857933202675-0.00857933202675287
613.813.808287685886540.00171231411345607
623.953.818345894357840.131654105642161
633.993.962821349047490.0271786509525151
6444.0037452611448-0.00374526114479767
654.064.013617944594560.0463820554054362
664.164.075194657955440.0848053420445645
674.194.178077533988120.0119224660118800
684.24.20848282675256-0.00848282675255607
694.24.21819446121632-0.0181944612163196
704.24.21757595800764-0.0175759580076358
714.24.21697848022062-0.0169784802206223
724.24.21640131311629-0.0164013131162939
734.234.215843766252530.0141562337474719
744.384.246324993802580.133675006197416
754.434.40086914706280.0291308529372012
764.444.45185942238885-0.0118594223888522
774.444.46145627273174-0.0214562727317436
784.444.46072688737797-0.0207268873779691
794.444.46002229677774-0.0200222967777366
804.444.45934165805725-0.0193416580572485
814.454.45868415699539-0.00868415699538971
824.454.4683889474312-0.0183889474311973
834.454.46776383285071-0.0177638328507053
844.454.46715996843911-0.0171599684391097
854.454.46657663181736-0.0165766318173581
864.454.46601312516298-0.0160131251629805
874.454.46546877437531-0.0154687743753090
884.454.46494292826908-0.0149429282690798
894.464.46443495779545-0.00443495779544634
904.464.47428419567096-0.0142841956709594
914.464.4737986181784-0.013798618178396
924.484.473329547425640.00667045257436172
934.584.493556303044920.0864436969550786
944.674.596494873376940.0735051266230649
954.684.68899360945549-0.00899360945549166
964.684.69868788035257-0.0186878803525659
974.694.69805260383494-0.00805260383494044
984.694.70777886331298-0.0177788633129792
994.694.70717448795528-0.0171744879552751
1004.694.70659065775654-0.0165906577565371
1014.694.70602667430385-0.0160266743038484
1024.694.70548186292616-0.0154818629261646
1034.694.70495557188724-0.0149555718872385
1044.734.704447171605970.0255528283940336
1054.784.74531581542920.0346841845707972
1064.794.79649487092266-0.00649487092266288
1074.794.80627408403275-0.0162740840327462
1084.84.8057208621993-0.00572086219930057
1094.84.81552638699145-0.0155263869914535
1104.814.81499858239975-0.00499858239975293
1115.164.824828660398960.335171339601035
1125.265.186222487703750.073777512296254
1135.295.288730483271270.00126951672873243
1145.295.31877363927137-0.0287736392713747
1155.295.3177955070803-0.0277955070803042
1165.35.31685062555225-0.0168506255522516
1175.35.3262778047444-0.0262778047443968
1185.35.32538451604745-0.0253845160474491
1195.35.32452159384054-0.0245215938405439
1205.35.32368800584406-0.0236880058440585
1215.35.32288275486973-0.0228827548697268
1225.35.32210487762774-0.0221048776277364
1235.35.32135344357438-0.0213534435743847
1245.355.320627553798910.0293724462010916
1255.445.371626041855590.0683739581444085
1265.475.463950348797140.00604965120286227
1275.475.49415600087091-0.0241560008709136
1285.485.49333484085579-0.0133348408557854
1295.485.50288153576703-0.0228815357670262
1305.485.50210369996726-0.0221036999672588
1315.485.50135230594734-0.0213523059473424


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1325.50062645484445.419584710878745.58166819881007
1335.521252909688815.404678264670875.63782755470675
1345.541879364533215.396686974462615.68707175460381
1355.562505819377625.392046174794835.7329654639604
1365.583132274222025.38940099616425.77686355227984
1375.603758729066425.388069224267245.8194482338656
1385.624385183910835.387652987272275.86111738054938
1395.645011638755235.387897853091095.90212542441937
1405.665638093599635.388630441383255.94264574581601
1415.686264548444045.389726972249725.98280212463835
1425.706891003288445.391095876266076.02268613031081
1435.727517458132855.392667486951286.06236742931441
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t12444251274657v0lwc7tzy3y/1egds1244424562.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t12444251274657v0lwc7tzy3y/1egds1244424562.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t12444251274657v0lwc7tzy3y/29rcm1244424562.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t12444251274657v0lwc7tzy3y/29rcm1244424562.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t12444251274657v0lwc7tzy3y/3icoy1244424562.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/08/t12444251274657v0lwc7tzy3y/3icoy1244424562.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=0, beta=0)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=0)
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