Home » date » 2009 » Dec » 16 »

*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, 16 Dec 2009 07:34:30 -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/16/t1260974307f16yj6o2db7u4gf.htm/, Retrieved Wed, 16 Dec 2009 15:38:32 +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/16/t1260974307f16yj6o2db7u4gf.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 «
19915 19843 19761 20858 21968 23061 22661 22269 21857 21568 21274 20987 19683 19381 19071 20772 22485 24181 23479 22782 22067 21489 20903 20330 19736 19483 19242 20334 21423 22523 21986 21462 20908 20575 20237 19904 19610 19251 18941 20450 21946 23409 22741 22069 21539 21189 20960 20704 19697 19598 19456 20316 21083 22158 21469 20892 20578 20233 19947 20049
 
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
Seasonal601061
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
11991519851.1782905453-1350.6835312085321329.5052406632-63.821709454718
21984319909.2089924288-1547.3107427572521324.101750328566.2089924287975
31976119947.2396719623-1743.9379319559921318.6982599937186.239671962321
42085820879.0193344964-476.14822008337621313.128885587021.0193344964027
52196821853.5989770331774.84151178659221307.5595111803-114.401022966871
62306122748.48441496812073.6414566602021299.8741283717-312.515585031892
72266122541.97002137751487.8412330594121292.1887455631-119.029978622504
82226922324.7290942980932.34640323502421280.92450246755.7290942979562
92185722000.0882223745444.25151825451321269.6602593709143.088222374543
102156821774.695551571392.929755741639821268.3746926871206.695551571276
112127421506.9028814215-225.99200742475121267.0891260032232.902881421523
122098721130.1308588745-461.77960139311221305.6487425187143.130858874458
131968319372.4751721745-1350.6835312085321344.2083590341-310.524827825549
141938118922.9554074431-1547.3107427572521386.3553353141-458.044592556886
151907118457.4356203618-1743.9379319559921428.5023115942-613.56437963821
162077220576.1574147591-476.14822008337621443.9908053243-195.842585240895
172248522735.6791891591774.84151178659221459.4792990543250.679189159062
182418124831.58616255912073.6414566602021456.7723807807650.586162559062
192347924016.09330443351487.8412330594121454.0654625071537.093304433474
202278223193.5492132717932.34640323502421438.1043834932411.549213271734
212206722267.6051772661444.25151825451321422.1433044794200.605177266116
222148921524.522380677492.929755741639821360.547863580935.5223806774302
232090320733.0395847423-225.99200742475121298.9524226825-169.960415257741
242033019931.4863353627-461.77960139311221190.2932660304-398.513664637296
251973619741.0494218302-1350.6835312085321081.63410937835.04942183020466
261948319536.8730662748-1547.3107427572520976.437676482553.873066274773
271924219356.6966883693-1743.9379319559920871.2412435866114.696688369349
282033420347.6434730834-476.14822008337620796.50474713.6434730833862
292142321349.3902378001774.84151178659220721.7682504133-73.6097621999324
302252322294.90807238652073.6414566602020677.4504709533-228.091927613517
312198621851.02607544731487.8412330594120633.1326914933-134.973924552691
322146221377.5621046826932.34640323502420614.0914920824-84.4378953174237
332090820776.6981890740444.25151825451320595.0502926715-131.301810926027
342057520444.458363592492.929755741639820612.6118806660-130.541636407601
352023720069.8185387643-225.99200742475120630.1734686604-167.181461235661
361990419585.9170786418-461.77960139311220683.8625227513-318.082921358218
371961019833.1319543663-1350.6835312085320737.5515768422223.131954366283
381925119246.7315492454-1547.3107427572520802.5791935118-4.26845075457095
391894118758.3311217746-1743.9379319559920867.6068101814-182.668878225420
402045020448.9629807298-476.14822008337620927.1852393536-1.03701927024304
412194622130.3948196876774.84151178659220986.7636685258184.394819687583
422340923712.40813663022073.6414566602021031.9504067096303.408136630227
432274122917.02162204731487.8412330594121077.1371448933176.021622047283
442206922105.3738703115932.34640323502421100.279726453536.3738703115087
452153921510.3261737319444.25151825451321123.4223080136-28.6738262681429
462118921180.666200645692.929755741639821104.4040436128-8.33379935443372
472096021060.6062282128-225.99200742475121085.3857792120100.606228212790
482070420858.5350716637-461.77960139311221011.2445297294154.535071663671
491969719807.5802509616-1350.6835312085320937.1032802469110.580250961615
501959819905.1373423545-1547.3107427572520838.1734004027307.137342354516
511945619916.6944113974-1743.9379319559920739.2435205586460.694411397428
522031620459.3774863604-476.14822008337620648.7707337229143.377486360430
532108320832.8605413261774.84151178659220558.2979468873-250.139458673926
542215821766.68741040072073.6414566602020475.6711329391-391.3125895993
552146921057.11444794971487.8412330594120393.0443189909-411.885552050266
562089220543.8874444445932.34640323502420307.7661523205-348.11255555549
572057820489.2604960954444.25151825451320222.4879856501-88.7395039045841
582023320234.035084407292.929755741639820139.03515985111.03508440724909
591994720064.4096733726-225.99200742475120055.5823340522117.409673372596
602004920583.4133858951-461.77960139311219976.366215498534.413385895114
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/16/t1260974307f16yj6o2db7u4gf/1sath1260974068.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t1260974307f16yj6o2db7u4gf/1sath1260974068.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/16/t1260974307f16yj6o2db7u4gf/2w4q81260974068.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t1260974307f16yj6o2db7u4gf/2w4q81260974068.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/16/t1260974307f16yj6o2db7u4gf/3qric1260974068.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t1260974307f16yj6o2db7u4gf/3qric1260974068.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/16/t1260974307f16yj6o2db7u4gf/44qg71260974068.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/16/t1260974307f16yj6o2db7u4gf/44qg71260974068.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