Home » date » 2009 » Dec » 04 »

Ad hoc forecasting

*The author of this computation has been verified*
R Software Module: /rwasp_decomposeloess.wasp (opens new window with default values)
Title produced by software: Decomposition by Loess
Date of computation: Fri, 04 Dec 2009 09:14:42 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943327ct5ai9sv3strzat.htm/, Retrieved Fri, 04 Dec 2009 17:15:33 +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/2009/Dec/04/t1259943327ct5ai9sv3strzat.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:
Techniek 2: Seizoenale decompositie met de Loess techniek
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
462 455 461 461 463 462 456 455 456 472 472 471 465 459 465 468 467 463 460 462 461 476 476 471 453 443 442 444 438 427 424 416 406 431 434 418 412 404 409 412 406 398 397 385 390 413 413 401 397 397 409 419 424 428 430 424 433 456 459 446 441
 
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


Seasonal Decomposition by Loess - Parameters
ComponentWindowDegreeJump
Seasonal611062
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1462465.119535673915-2.84771620094581461.7281805270313.11953567391498
2455455.50241226746-7.33624724325024461.8338349757910.502412267459704
3461461.400372312312-1.33986173686214461.939489424550.400372312311902
4461457.4025484987112.51908870978463462.078362791504-3.59745150128873
5463462.2047275467491.57803629479271462.217236158458-0.795272453250732
6462463.765846889886-2.14860256031235462.3827556704271.76584688988561
7456453.526961505097-4.07523668749243462.548275182395-2.47303849490294
8455456.134942213054-8.8890104071117462.7540681940581.13494221305353
9456456.942925907069-7.90278711278955462.9598612057210.942925907068513
10472468.15844124906312.5147555768886463.326803174049-3.84155875093739
11472466.57395783524813.7322970223757463.693745142377-5.42604216475235
12471473.7496391818544.19528406141069464.0550767567362.74963918185381
13465468.431307829851-2.84771620094581464.4164083710943.43130782985139
14459460.491530285341-7.33624724325024464.8447169579091.49153028534124
15465466.066836192139-1.33986173686214465.2730255447241.06683619213862
16468467.9088619223882.51908870978463465.572049367827-0.0911380776120154
17467466.5508905142761.57803629479271465.871073190931-0.449109485723966
18463462.510300264967-2.14860256031235465.638302295346-0.489699735033412
19460458.669705287732-4.07523668749243465.40553139976-1.33029471226774
20462468.611896383448-8.8890104071117464.2771140236646.61189638344774
21461466.754090465222-7.90278711278955463.1486966475685.7540904652218
22476478.37754259985512.5147555768886461.1077018232562.37754259985536
23476479.2009959786813.7322970223757459.0667069989443.20099597867994
24471481.7311807259174.19528406141069456.07353521267210.7311807259168
25453455.767352774545-2.84771620094581453.0803634264012.7673527745452
26443444.092132355823-7.33624724325024449.2441148874271.09213235582337
27442439.931995388409-1.33986173686214445.407866348453-2.06800461159099
28444444.2014024496352.51908870978463441.2795088405810.201402449634827
29438437.2708123724991.57803629479271437.151151332708-0.729187627500664
30427422.832601529747-2.14860256031235433.316001030565-4.16739847025269
31424422.59438595907-4.07523668749243429.480850728422-1.40561404092966
32416414.609457183064-8.8890104071117426.279553224047-1.39054281693558
33406396.824531393117-7.90278711278955423.078255719672-9.17546860688287
34431429.05005317289912.5147555768886420.435191250213-1.94994682710114
35434436.47557619687213.7322970223757417.7921267807532.4755761968716
36418416.3265741872414.19528406141069415.478141751348-1.67342581275864
37412413.683559479003-2.84771620094581413.1641567219431.68355947900255
38404404.240695200922-7.33624724325024411.0955520423290.240695200921721
39409410.312914374148-1.33986173686214409.0269473627141.31291437414836
40412414.2325213105262.51908870978463407.248389979692.23252131052556
41406404.9521311085411.57803629479271405.469832596666-1.04786889145856
42398394.125615458115-2.14860256031235404.022987102198-3.87438454188549
43397395.499095079763-4.07523668749243402.57614160773-1.50090492023742
44385376.960996158121-8.8890104071117401.928014248991-8.03900384187915
45390386.622900222538-7.90278711278955401.279886890252-3.37709977746226
46413411.53276323192912.5147555768886401.952481191182-1.46723676807079
47413409.64262748551213.7322970223757402.625075492113-3.35737251448825
48401392.9934564514834.19528406141069404.811259487106-8.0065435485169
49397389.850272718846-2.84771620094581406.9974434821-7.14972728115418
50397391.055419104716-7.33624724325024410.280828138534-5.94458089528405
51409405.775648941894-1.33986173686214413.564212794969-3.22435105810649
52419418.0553881275852.51908870978463417.425523162631-0.944611872415464
53424425.1351301749141.57803629479271421.2868335302931.13513017491425
54428433.163749025242-2.14860256031235424.9848535350715.16374902524154
55430435.392363147644-4.07523668749243428.6828735398495.39236314764389
56424424.500036076354-8.8890104071117432.3889743307580.500036076353979
57433437.807711991123-7.90278711278955436.0950751216674.80771199112257
58456459.70365900158812.5147555768886439.7815854215233.70365900158828
59459460.79960725624513.7322970223757443.4680957213791.79960725624494
60446440.7324360604534.19528406141069447.072279878136-5.26756393954668
61441434.171252166053-2.84771620094581450.676464034893-6.82874783394692
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943327ct5ai9sv3strzat/1vqr11259943280.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943327ct5ai9sv3strzat/1vqr11259943280.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943327ct5ai9sv3strzat/213qf1259943280.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943327ct5ai9sv3strzat/213qf1259943280.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943327ct5ai9sv3strzat/38kj11259943280.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943327ct5ai9sv3strzat/38kj11259943280.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943327ct5ai9sv3strzat/44zo01259943280.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943327ct5ai9sv3strzat/44zo01259943280.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
Parameters (R input):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
R code (references can be found in the software module):
par1 <- as.numeric(par1) #seasonal period
if (par2 != 'periodic') par2 <- as.numeric(par2) #s.window
par3 <- as.numeric(par3) #s.degree
if (par4 == '') par4 <- NULL else par4 <- as.numeric(par4)#t.window
par5 <- as.numeric(par5)#t.degree
if (par6 != '') par6 <- as.numeric(par6)#l.window
par7 <- as.numeric(par7)#l.degree
if (par8 == 'FALSE') par8 <- FALSE else par9 <- TRUE #robust
nx <- length(x)
x <- ts(x,frequency=par1)
if (par6 != '') {
m <- stl(x,s.window=par2, s.degree=par3, t.window=par4, t.degre=par5, l.window=par6, l.degree=par7, robust=par8)
} else {
m <- stl(x,s.window=par2, s.degree=par3, t.window=par4, t.degre=par5, l.degree=par7, robust=par8)
}
m$time.series
m$win
m$deg
m$jump
m$inner
m$outer
bitmap(file='test1.png')
plot(m,main=main)
dev.off()
mylagmax <- nx/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(as.numeric(m$time.series[,'trend']),na.action=na.pass,lag.max = mylagmax,main='Trend')
acf(as.numeric(m$time.series[,'seasonal']),na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(as.numeric(m$time.series[,'remainder']),na.action=na.pass,lag.max = mylagmax,main='Remainder')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'trend']),'trend']),main='Trend')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'seasonal']),'seasonal']),main='Seasonal')
spectrum(as.numeric(m$time.series[!is.na(m$time.series[,'remainder']),'remainder']),main='Remainder')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'trend']),'trend']),main='Trend')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'seasonal']),'seasonal']),main='Seasonal')
cpgram(as.numeric(m$time.series[!is.na(m$time.series[,'remainder']),'remainder']),main='Remainder')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Seasonal Decomposition by Loess - Parameters',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Component',header=TRUE)
a<-table.element(a,'Window',header=TRUE)
a<-table.element(a,'Degree',header=TRUE)
a<-table.element(a,'Jump',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,m$win['s'])
a<-table.element(a,m$deg['s'])
a<-table.element(a,m$jump['s'])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,m$win['t'])
a<-table.element(a,m$deg['t'])
a<-table.element(a,m$jump['t'])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Low-pass',header=TRUE)
a<-table.element(a,m$win['l'])
a<-table.element(a,m$deg['l'])
a<-table.element(a,m$jump['l'])
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,'Seasonal Decomposition by Loess - Time Series Components',6,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,'Seasonal',header=TRUE)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,'Remainder',header=TRUE)
a<-table.row.end(a)
for (i in 1:nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]+m$time.series[i,'remainder'])
a<-table.element(a,m$time.series[i,'seasonal'])
a<-table.element(a,m$time.series[i,'trend'])
a<-table.element(a,m$time.series[i,'remainder'])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.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