Home » date » 2010 » Jul » 28 »

Tijdreeks 1 - Stap 32

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 28 Jul 2010 14:45:56 +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/28/t1280328581gd06i6x7m8lgcyu.htm/, Retrieved Wed, 28 Jul 2010 16:49:45 +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/28/t1280328581gd06i6x7m8lgcyu.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:
Patrick Fieremans
 
Dataseries X:
» Textbox « » Textfile « » CSV «
136 135 134 132 152 151 136 126 127 127 128 130 125 118 111 104 126 131 122 116 115 115 113 122 114 106 93 89 114 122 115 116 120 120 120 121 118 112 99 96 120 135 128 134 134 132 130 125 124 114 101 101 123 143 133 136 137 135 141 136 133 124 110 104 130 160 142 142 137 135 139 135 134 120 103 101 127 159 141 140 135 127 130 128 126 110 101 102 129 169 146 145 138 123 124 137 132 112 105 106 137 175 151 142 140 122 127 135 128 117 107 108 134 171 154 146 148 122 124 135
 
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'Gwilym Jenkins' @ 72.249.127.135


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.206674112244381
beta0.156145216303958
gamma1


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
13125136.497707249167-11.497707249167
14118125.868466827844-7.86846682784406
15111115.829465823458-4.82946582345791
16104106.517461771267-2.51746177126746
17126127.127195352308-1.12719535230811
18131130.3363770692460.663622930753945
19122117.3261376985834.67386230141722
20116108.4338194745947.56618052540635
21115110.3614957766544.63850422334642
22115111.3559418773383.64405812266216
23113113.273838994097-0.273838994097034
24122114.9652564896567.03474351034428
25114104.1127774854359.88722251456544
26106101.8949632190544.10503678094598
279398.2124211486975-5.21242114869752
288992.1233403863731-3.12334038637309
29114111.8307866699072.16921333009276
30122117.5966650050094.40333499499071
31115110.5418781565744.45812184342579
32116105.52823531858110.4717646814189
33120107.02989266023212.9701073397680
34120110.4944931997389.5055068002625
35120112.3089172687277.6910827312734
36121123.663846534212-2.66384653421156
37118114.5959931703023.40400682969825
38112107.7550316866564.24496831334436
399997.65882511407761.34117488592241
409695.87529522178720.124704778212759
41120124.446887300445-4.44688730044543
42135133.2076489799291.79235102007070
43128126.7061949120451.29380508795455
44134127.2222128793296.77778712067129
45134131.3694334121172.63056658788315
46132130.7282574391741.271742560826
47130129.9526631786310.0473368213690435
48125132.14519310741-7.14519310740994
49124127.014338051243-3.01433805124296
50114119.134346479543-5.134346479543
51101103.923333356148-2.92333335614836
5210199.88622195722541.11377804277460
53123125.771961793655-2.77196179365495
54143140.1801027739592.81989722604084
55133132.9493904192990.0506095807014333
56136137.394194343486-1.39419434348619
57137135.9948190573891.00518094261091
58135133.3182188753441.68178112465566
59141131.0763840874449.92361591255647
60136129.2165399147636.78346008523744
61133130.4053245252632.59467547473665
62124121.8061907732392.19380922676073
63110109.4638471252840.536152874716379
64104109.946623474011-5.946623474011
65130133.486170377532-3.4861703775322
66160154.2499542315275.75004576847334
67142145.131414581241-3.13141458124142
68142148.535983295595-6.53598329559478
69137148.363336605893-11.3633366058930
70135143.435306155354-8.43530615535431
71139145.300218303875-6.3002183038752
72135136.499747085003-1.49974708500298
73134131.5127804089532.48721959104736
74120121.599293388196-1.5992933881964
75103106.460309284893-3.4603092848927
76101100.0420962280680.95790377193218
77127124.9061878618062.09381213819428
78159151.9897706621277.01022933787294
79141135.8591155984575.14088440154296
80140137.5052103373232.49478966267679
81135134.9114319980350.0885680019652568
82127134.539329979635-7.53932997963528
83130138.113277855539-8.11327785553866
84128132.699208207592-4.69920820759233
85126130.026352503398-4.02635250339841
86110115.626259796421-5.62625979642135
8710198.4619669704522.53803302954793
8810296.61515522030165.38484477969838
89129122.3208375139756.67916248602478
90169153.42060080737215.579399192628
91146138.0836704157657.9163295842352
92145138.5474224498676.45257755013265
93138135.3126717551082.68732824489229
94123129.816666734662-6.81666673466157
95124133.592182462144-9.5921824621443
96137131.0165047409615.98349525903944
97132131.8490651713880.150934828611526
98112117.160761905490-5.16076190548961
99105106.839523079279-1.83952307927935
100106106.952241870461-0.952241870460966
101137134.0579205170652.94207948293533
102175173.3226573412091.67734265879105
103151148.2918430012982.70815699870235
104142146.257365484352-4.25736548435154
105140137.3107207990502.68927920095015
106122123.797097441325-1.79709744132461
107127126.0164005045880.983599495412335
108135138.187228930160-3.1872289301603
109128132.225310477006-4.22531047700616
110117112.1402934263114.8597065736893
111107106.4340320354510.565967964548932
112108107.8239585374400.176041462560207
113134138.899016279422-4.89901627942174
114171175.614202884575-4.61420288457478
115154149.8240444858014.17595551419856
116146142.3083824973103.69161750268964
117148140.4843956529357.51560434706499
118122124.278204568723-2.27820456872307
119124128.792888611097-4.79288861109745
120135136.432504114121-1.43250411412075


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
121129.920542091987119.61912351386140.221960670115
122117.809395866572107.269169687027128.349622046116
123107.57117446856796.7773312182415118.365017718892
124108.47029897920597.2599351972896119.680662761120
125135.477907013571123.077610847703147.87820317944
126173.907459891797159.306299443702188.508620339891
127155.923697153213141.23034115805170.617053148375
128147.094206191856131.965590877942162.222821505770
129147.414793932782131.332818210342163.496769655222
130121.720603655513106.470496083891136.970711227135
131124.483372343429108.152042446747140.814702240111
132135.774713610729-40.0558894088902311.605316630347
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280328581gd06i6x7m8lgcyu/1g1ls1280328353.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280328581gd06i6x7m8lgcyu/1g1ls1280328353.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/28/t1280328581gd06i6x7m8lgcyu/2rakd1280328353.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280328581gd06i6x7m8lgcyu/2rakd1280328353.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/28/t1280328581gd06i6x7m8lgcyu/3rakd1280328353.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280328581gd06i6x7m8lgcyu/3rakd1280328353.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