Home » date » 2010 » Nov » 29 »

*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: Mon, 29 Nov 2010 21:02:57 +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/Nov/29/t1291064455rmlwo27gysutu2s.htm/, Retrieved Mon, 29 Nov 2010 22:00:55 +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/2010/Nov/29/t1291064455rmlwo27gysutu2s.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
9700 9081 9084 9743 8587 9731 9563 9998 9437 10038 9918 9252 9737 9035 9133 9487 8700 9627 8947 9283 8829 9947 9628 9318 9605 8640 9214 9567 8547 9185 9470 9123 9278 10170 9434 9655 9429 8739 9552 9687 9019 9672 9206 9069 9788 10312 10105 9863 9656 9295 9946 9701 9049 10190 9706 9765 9893 9994 10433 10073 10112 9266 9820 10097 9115 10411 9678 10408 10153 10368 10581 10597 10680 9738 9556
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Seasonal Decomposition by Loess - Parameters
ComponentWindowDegreeJump
Seasonal601
Trend2513
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
197009648.7896381318194.1139550113929557.09640685681-51.2103618682013
290819128.72732119467-515.8665658336279549.1392446389547.727321194674
390848782.89947601815-156.0815584392409541.1820824211-301.100523981853
497439754.19380355555198.5812762412139533.2249202032411.1938035555504
585878381.29527316322-730.2012920131889522.90601884996-205.704726836775
697319788.37379592734161.0390865759739512.587117496757.3737959273367
795639719.9268542358-96.19507037921319502.26821614342156.926854235797
8999810479.674482808225.17303780217689491.15247938966481.674482808166
994379522.88844393629-128.9251865721869480.036742635985.8884439362882
10100389946.22706751443660.851926603439468.92100588214-91.7729324855682
11991810041.5720265670337.0513066986119457.37666673434123.572026567046
1292529004.3263579620453.84131445140899445.83232758655-247.673642037957
1397379855.1468593109184.5651522503569434.28798843875118.146859310891
1490359182.68699638795-522.3161868593959409.62919047145147.686996387951
1591339013.69196969873-132.6623622028689384.97039250414-119.308030301268
1694879417.23114424422196.4572612189509360.31159453683-69.7688557557776
1787008773.44551109998-715.1651862366959341.7196751367173.4455110999843
1896279775.28947089163155.5827733717779323.12775573659148.289470891634
1989478692.5327085842-103.0685449206679304.53583633647-254.467291415805
2092839288.19955951163-17.02633574521979294.82677623365.19955951162592
2188298482.71656021038-109.8342763410959285.11771613072-346.283439789622
2299479959.85589490995658.7354490622159275.4086560278412.8558949099461
2396289645.24477148803337.2658541726179273.4893743393517.2447714880309
2493189289.3446392636275.08526808551579271.57009265086-28.6553607363767
2596059766.741169359173.6080196786179269.65081096237161.741169359009
2686408533.67379026937-530.1385656596679276.4647753903-106.326209730631
2792149229.957513254-85.23625307221769283.2787398182215.9575132539958
2895679655.53852845529188.3687672985689290.0927042461488.5385284552867
2985478455.63042265412-662.9433061890749301.31288353496-91.3695773458821
3091858908.21134938882149.2555877874119312.53306282377-276.788650611179
3194709748.91154150943-132.6647836220099323.75324211258278.911541509429
3291239049.88758924884-141.0688080234719337.18121877463-73.1124107511587
3392789286.55752347025-81.16671890692429350.609195436688.55752347024645
341017010319.3613742596656.6014536416429364.03717209873149.36137425963
3594349157.31642162733330.4777313272889380.20584704538-276.683578372673
3696559775.99018453992137.6352934680369396.37452199204120.99018453992
3794299311.88765757461133.5691454866899412.5431969387-117.112342425389
3887398617.06531936522-572.2304708830539433.16515151784-121.934680634784
3995529622.5419177450327.67097615799449453.7871060969770.5419177450312
4096879755.04749859592144.5434407279689474.409060676168.0474985959227
4190199206.04126557087-667.1977753985049499.15650982764187.041265570868
4296729635.40435348419184.6916875366479523.90395897917-36.5956465158124
4392069018.98264715072-155.6340552814159548.6514081307-187.017352849278
4490698741.35032221922-178.9677978993369575.61747568012-327.649677780782
4597889961.1421362750712.2743204953929602.58354322954173.142136275066
461031210460.6143696453533.8360195757279629.54961077897148.614369645307
471010510186.4552548612369.4211559550939654.1235891836881.45525486123
4898639830.6595688932216.6428635184079678.69756758839-32.3404311067970
4996569430.56145642105178.1669975858459703.2715459931-225.438543578946
5092959433.84963411472-568.0661895221379724.21655540741138.849634114722
51994610228.0724458634-81.23401068511239745.16156482173282.072445863383
5297019513.695388544122.1980372199629766.10657423604-187.304611456004
5390499022.04344860256-706.393158487219782.34970988465-26.9565513974376
541019010348.1679258633233.2392286034689798.59284553325158.167925863278
5597069796.58797108659-199.4239522684479814.8359811818690.5879710865884
5697659797.06809364971-96.69046916693449829.6223755172332.0680936497101
5798939901.1779639030340.41326624437649844.40876985268.17796390303192
5899949677.27770924774451.5271265643019859.19516418796-316.722290752257
591043310585.6257951497403.0816676740499877.29253717628152.625795149674
60100739995.94473453016254.6653553052389895.3899101646-77.0552654698386
611011210115.3544680698195.1582487772909913.487283152923.35446806978871
6292669155.73384380986-561.7623527587319938.02850894887-110.266156190142
6398209807.02848542068-129.5982201655029962.56973474483-12.9715145793234
641009710099.1661988534107.7228406057879987.110960540782.16619885343425
6591158939.84779151277-719.53700210680310009.6892105940-175.152208487227
661041110536.5515934051253.18094594764710032.2674606473125.551593405069
6796789515.83287395914-214.67858465967810054.8457107005-162.167126040857
681040810812.2787028050-72.197580956919510075.9188781519404.278702805046
691015310158.051218515150.95673588167910096.99204560325.05121851510739
701036810201.7664337577416.16835318775210118.0652130546-166.233566242305
711058110602.3081474939420.27056433187710139.421288174221.3081474939099
721059710768.9578386878264.26479801834510160.7773632939171.957838687784
731068010975.6243404436202.24222114282810182.1334384135295.624340443641
7497389831.51885538244-558.7723025873710203.253447204993.5188553824446
7595569037.47953667355-149.85299266987310224.3734559963-518.520463326451
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291064455rmlwo27gysutu2s/1mike1291064573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291064455rmlwo27gysutu2s/1mike1291064573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291064455rmlwo27gysutu2s/2xajh1291064573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291064455rmlwo27gysutu2s/2xajh1291064573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291064455rmlwo27gysutu2s/3xajh1291064573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291064455rmlwo27gysutu2s/3xajh1291064573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291064455rmlwo27gysutu2s/4qjik1291064573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291064455rmlwo27gysutu2s/4qjik1291064573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291064455rmlwo27gysutu2s/7pbfz1291064573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291064455rmlwo27gysutu2s/7pbfz1291064573.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = 6 ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
Parameters (R input):
par1 = 12 ; par2 = 6 ; 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')
bitmap(file="test5.png")
myresid <- m$time.series[!is.na(m$time.series[,"remainder"]),"remainder"]
hist(as.numeric(myresid), main="Residual Histogram", xlab="Residual Value")
dev.off()
 





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