Home » date » 2009 » Dec » 02 »

*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: Wed, 02 Dec 2009 13:05:41 -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/02/t1259784713k60rgmtuo4z4eok.htm/, Retrieved Wed, 02 Dec 2009 21:12:03 +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/02/t1259784713k60rgmtuo4z4eok.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 «
17409 11514 31514 27071 29462 26105 22397 23843 21705 18089 20764 25316 17704 15548 28029 29383 36438 32034 22679 24319 18004 17537 20366 22782 19169 13807 29743 25591 29096 26482 22405 27044 17970 18730 19684 19785 18479 10698 31956 29506 34506 27165 26736 23691 18157 17328 18205 20995 17382 9367
 
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


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
11740917764.4173661092-4707.4348209323721761.0174548231355.417366109228
21151411628.3093567630-10537.749773921921937.4404171590114.309356762973
33151433712.21368823367201.9229322716522113.86337949482198.21368823357
42707127066.68628121144773.5034193875422301.810299401-4.31371878856226
52946227178.65907182419255.5837088686822489.7572193073-2283.34092817594
62610524671.57335778094866.2652876420522672.1613545771-1433.42664221911
72239721425.7404129721513.69409718109322854.5654898469-971.259587027947
82384322957.85199119311708.8008835955823019.3471252113-885.148008806853
92170524257.2168978312-4031.3456584068523184.12876057572552.21689783116
101808917829.9839574776-5065.0697448318523413.0857873542-259.016042522384
112076421113.0019790462-3227.0447931789423642.0428141328349.001979046163
122531627485.9173318209-751.12684298098723897.20951116012169.91733182093
131770415963.0586127450-4707.4348209323724152.3762081873-1740.94138725496
141554817441.0925349075-10537.749773921924192.65723901441893.09253490750
152802924623.13879788687201.9229322716524232.9382698415-3405.86120211318
162938329870.88102698264773.5034193875424121.6155536298487.881026982614
173643839610.12345371329255.5837088686824010.29283741823172.12345371316
183203435276.47100345674866.2652876420523925.26370890133242.47100345669
192267921004.0713224346513.69409718109323840.2345803843-1674.92867756544
202431923180.07460290601708.8008835955823749.1245134984-1138.92539709403
211800416381.3312117943-4031.3456584068523658.0144466125-1622.66878820570
221753716716.6597571913-5065.0697448318523422.4099876405-820.340242808674
232036620772.2392645104-3227.0447931789423186.8055286685406.239264510437
242278223375.128202433-751.12684298098722939.9986405480593.12820243301
251916920352.2430685049-4707.4348209323722693.19175242741183.24306850493
261380715506.7898267953-10537.749773921922644.95994712661699.78982679530
272974329687.34892590257201.9229322716522596.7281418258-55.6510740974845
282559123828.53733303444773.5034193875422579.9592475781-1762.46266696560
292909626373.22593780109255.5837088686822563.1903533303-2722.77406219895
302648225615.05410990424866.2652876420522482.6806024537-866.945890095794
312240521894.1350512417513.69409718109322402.1708515772-510.864948758302
322704429965.54434600411708.8008835955822413.65477040032921.54434600409
331797017546.2069691834-4031.3456584068522425.1386892234-423.7930308166
341873019909.0417235657-5065.0697448318522616.02802126611179.04172356571
351968419788.1274398701-3227.0447931789422806.9173533088104.127439870110
361978517321.7333892468-751.12684298098722999.3934537342-2463.26661075323
371847918473.5652667728-4707.4348209323723191.8695541596-5.43473322721911
38106988690.88455793846-10537.749773921923242.8652159835-2007.11544206154
393195633416.2161899217201.9229322716523293.86087780741460.216189921
402950630962.39823905914773.5034193875423276.09834155331456.39823905914
413450636498.08048583209255.5837088686823258.33580529931992.08048583204
422716526382.29776181874866.2652876420523081.4369505392-782.7022381813
432673630053.7678070397513.69409718109322904.53809577923317.76780703969
442369122972.89107824631708.8008835955822700.3080381581-718.10892175372
451815717849.2676778698-4031.3456584068522496.0779805371-307.732322130210
461732817459.1094622887-5065.0697448318522261.9602825432131.109462288670
471820517609.2022086296-3227.0447931789422027.8425845493-595.797791370354
482099520975.4551421688-751.12684298098721765.6717008122-19.5448578312498
491738217967.9340038572-4707.4348209323721503.5008170752585.934003857197
5093678048.2368671522-10537.749773921921223.5129067697-1318.76313284781
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784713k60rgmtuo4z4eok/1nidb1259784338.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784713k60rgmtuo4z4eok/1nidb1259784338.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784713k60rgmtuo4z4eok/24u0l1259784338.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784713k60rgmtuo4z4eok/24u0l1259784338.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784713k60rgmtuo4z4eok/3c2hu1259784338.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784713k60rgmtuo4z4eok/3c2hu1259784338.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784713k60rgmtuo4z4eok/4jlj31259784338.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784713k60rgmtuo4z4eok/4jlj31259784338.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = 0 ; par3 = 1 ; par4 = 1 ;
 
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