Home » date » 2010 » Jul » 02 »

forcast

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Fri, 02 Jul 2010 15:49:39 +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/Jul/02/t1278085924ww7qcejslkw1ujw.htm/, Retrieved Fri, 02 Jul 2010 17:52:08 +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/2010/Jul/02/t1278085924ww7qcejslkw1ujw.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:
thomas talboom
 
Dataseries X:
» Textbox « » Textfile « » CSV «
68 67 66 64 84 83 68 58 59 59 60 62 58 58 59 62 87 83 68 58 68 63 65 68 62 69 74 72 94 102 92 81 99 95 92 93 85 92 99 107 125 137 125 115 135 128 120 123 119 128 139 155 164 176 162 155 174 171 162 160 156 163 180 195 203 212 203 184 200 198 195 177 176 180 194 204 206 219 213 196 214 209 213 194 197 211 240 251 254 273 271 245 264 264 262 237 237 251 272 282 278 291 293 271 284 290 288 262 263 275 297 301 296 309 310 292 300 314 310 288
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.370054769208693
beta0.326909085417736
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
135858.8875534188034-0.887553418803435
145858.4961736516680-0.496173651668045
155958.81460159053620.185398409463829
166261.24101029105030.758989708949656
178786.1381640772430.861835922756953
188382.09430323031970.905696769680318
196867.71790596772090.282094032279119
205858.8532009899306-0.8532009899306
216860.34015931107197.65984068892813
226364.6123862454992-1.61238624549921
236565.8416574721796-0.841657472179648
246868.170988328808-0.170988328807979
256264.2937082696555-2.29370826965550
266964.15908375898234.84091624101774
277468.05809261639455.94190738360550
287274.8486577497965-2.84865774979653
299499.911741095756-5.91174109575591
3010294.00565641640477.99434358359525
319283.33389570709028.6661042929098
328179.34509407818031.65490592181966
339989.91488977353739.0851102264627
349591.8379207426713.16207925732904
359298.8614814556668-6.86148145566678
3693102.199347618506-9.19934761850621
378595.365398756152-10.3653987561520
389297.4832784492366-5.48327844923662
399997.75142114626461.24857885373540
4010796.195938320812510.8040616791875
41125124.9616438016280.0383561983715737
42137131.3172443224755.68275567752482
43125121.2333508850603.76664911494028
44115111.4422124762163.55778752378355
45135128.0544010057136.94559899428674
46128125.8532853841022.14671461589765
47120126.462753165306-6.46275316530604
48123128.799620719379-5.79962071937931
49119123.224665849066-4.22466584906618
50128132.168749293474-4.16874929347395
51139138.8013932253190.198606774681167
52155144.38712650561810.6128734943816
53164167.787480660072-3.78748066007182
54176177.307350328411-1.30735032841122
55162163.608445481613-1.60844548161310
56155151.2251610409593.77483895904066
57174169.6065685278354.39343147216474
58171162.6839925823968.3160074176036
59162160.1452848553241.85471514467565
60160166.976349408252-6.97634940825168
61156162.814262955529-6.81426295552896
62163171.378190569990-8.3781905699905
63180179.2379843008150.762015699185383
64195191.694463866853.30553613315016
65203202.5371052583700.462894741629583
66212214.924215633429-2.92421563342899
67203199.9737322640403.02626773595952
68184192.793824593662-8.79382459366195
69200205.490437424686-5.49043742468552
70198194.7622227093553.23777729064463
71195183.04062233397611.9593776660238
72177186.036873460918-9.03687346091812
73176178.954110472808-2.95411047280848
74180186.168020924693-6.16802092469288
75194199.077605215509-5.0776052155093
76204208.743017317973-4.74301731797345
77206211.610510424352-5.61051042435156
78219215.675674184563.32432581544012
79213203.6011246737889.39887532621213
80196188.9194942460697.08050575393102
81214209.0778913894424.9221086105577
82209208.4672960094130.532703990587322
83213201.67766644436111.322333555639
84194191.5734876791172.42651232088303
85197194.3131870688302.68681293117049
86211204.0209414005786.97905859942239
87240226.50400647640513.4959935235950
88251249.5218060316911.47819396830926
89254261.165987977382-7.16598797738231
90273277.116797650029-4.11679765002856
91271272.047874277667-1.04787427766666
92245256.708756485545-11.7087564855445
93264270.950236334135-6.9502363341345
94264264.140701155495-0.140701155495435
95262264.77684837389-2.77684837389018
96237243.023779628400-6.02377962839955
97237240.950575137248-3.95057513724763
98251248.2532507246672.74674927533331
99272270.1106797879571.88932021204255
100282276.6939483915645.30605160843623
101278280.203487767387-2.2034877673874
102291296.406053680970-5.40605368097027
103293289.1318582720173.8681417279829
104271265.8294448384155.17055516158536
105284288.290044970731-4.29004497073146
106290286.0516186335823.94838136641818
107288286.3320538611141.66794613888607
108262264.50785130725-2.50785130724972
109263265.796512632208-2.79651263220774
110275278.639588482012-3.63958848201156
111297297.715393283297-0.715393283297374
112301305.293829411977-4.29382941197736
113296299.165650483880-3.16565048388048
114309311.523687410122-2.52368741012225
115310310.036017736218-0.0360177362176728
116292284.5146549606327.48534503936833
117300300.557578556411-0.557578556411499
118314304.0270433457819.97295665421882
119310304.9660874183315.03391258166931
120288282.0298837570165.97011624298364


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121287.572563128397276.846972692500298.298153564294
122302.556262813834290.607408626486314.505117001182
123326.898146665613313.265007532133340.531285799093
124334.650792050579318.913336491661350.388247609496
125333.505392304797315.296677099104351.714107510489
126350.50539330611329.507798036758371.502988575462
127354.890121512827330.826461795886378.953781229768
128337.495890772697310.120599657954364.87118188744
129348.172448144501317.264412626670379.080483662331
130361.019583395977326.376732396389395.662434395565
131356.487964349178317.923277398746395.05265129961
132333.000924792096290.339494427769375.662355156422
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/02/t1278085924ww7qcejslkw1ujw/1fnv01278085775.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/02/t1278085924ww7qcejslkw1ujw/1fnv01278085775.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/02/t1278085924ww7qcejslkw1ujw/2pfcl1278085775.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/02/t1278085924ww7qcejslkw1ujw/2pfcl1278085775.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/02/t1278085924ww7qcejslkw1ujw/3pfcl1278085775.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/02/t1278085924ww7qcejslkw1ujw/3pfcl1278085775.ps (open in new window)


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