Home » date » 2010 » Nov » 29 »

WS 8

*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:50:47 +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/t1291067413j2h3obikzgebviq.htm/, Retrieved Mon, 29 Nov 2010 22:50:18 +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/t1291067413j2h3obikzgebviq.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 «
37 30 47 35 30 43 82 40 47 19 52 136 80 42 54 66 81 63 137 72 107 58 36 52 79 77 54 84 48 96 83 66 61 53 30 74 69 59 42 65 70 100 63 105 82 81 75 102 121 98 76 77 63 37 35 23 40 29 37 51 20 28 13 22 25 13 16 13 16 17 9 17 25 14 8 7 10 7 10 3
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'George Udny Yule' @ 72.249.76.132


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
13732.481100976716910.823930242139730.6949687811434-4.51889902328311
23027.2985899953377-1.0331025132441033.7345125179064-2.70141000466227
34765.973235602222-8.7472918568913336.774056254669318.973235602222
43529.94096977101430.21106312363380039.8479671053519-5.05903022898575
53020.9087257445871-3.8306037006216742.9218779560346-9.0912742554129
64338.84603635239861.1688093152146945.9851543323867-4.15396364760139
782103.78337872449411.168190566766949.048430708738821.7833787244942
84031.1818742447283-3.1936594055994352.0117851608711-8.81812575527168
94735.89894206558023.1259183214164354.9751396130034-11.1010579344198
1019-7.09430739591033-12.424126159358657.5184335552689-26.0943073959103
115258.9124544564098-14.974181953944260.06172749753446.9124544564098
12136191.18087221714517.705047364427763.114080418427155.1808722171452
138083.009636418540510.823930242139766.16643333931993.00963641854047
144215.4866052460361-1.0331025132441069.546497267208-26.5133947539639
155443.8207306617952-8.7472918568913372.9265611950961-10.1792693382048
166657.28169394307630.21106312363380074.5072429332899-8.7183060569237
178189.742679029138-3.8306037006216776.08792467148378.742679029138
186349.47409802912791.1688093152146975.3570926556574-13.5259019708721
19137188.20554879340211.168190566766974.62626063983151.205548793402
207272.9393615229569-3.1936594055994374.25429788264250.939361522956943
21107136.9917465531303.1259183214164373.882335125453929.9917465531296
225855.0195757740472-12.424126159358673.4045503853114-2.98042422595285
233614.0474163087753-14.974181953944272.926765645169-21.9525836912247
245214.557072562603917.705047364427771.7378800729684-37.4429274373961
257976.627075257092410.823930242139770.548994500768-2.37292474290763
267785.6879770932907-1.0331025132441069.34512541995348.68797709329074
275448.6060355177526-8.7472918568913368.1412563391388-5.39396448224745
2884100.0980280850920.21106312363380067.690908791274516.0980280850917
294832.5900424572114-3.8306037006216767.2405612434103-15.4099575427886
3096123.9198812783441.1688093152146966.911309406441127.9198812783442
318388.249751863761211.168190566766966.58205756947195.24975186376118
326669.7518148486832-3.1936594055994365.44184455691633.75181484868315
336154.57245013422293.1259183214164364.3016315443607-6.42754986577711
345354.9904373554191-12.424126159358663.43368880393951.99043735541912
353012.4084358904260-14.974181953944262.5657460635182-17.5915641095740
367467.560575786728317.705047364427762.7343768488441-6.43942421327175
376964.273062123690410.823930242139762.90300763417-4.72693787630963
385954.4760980645201-1.0331025132441064.557004448724-4.52390193547991
394226.5362905936132-8.7472918568913366.2110012632781-15.4637094063868
406560.72003184796740.21106312363380069.0689050283988-4.27996815203261
417071.9037949071022-3.8306037006216771.92680879351951.90379490710215
42100123.4496013076161.1688093152146975.38158937716923.4496013076163
436335.995439472414611.168190566766978.8363699608185-27.0045605275854
44105131.333607920214-3.1936594055994381.86005148538526.3336079202144
458275.99034866863213.1259183214164384.8837330099515-6.00965133136792
468188.5642966485719-12.424126159358685.85982951078677.56429664857191
477578.1382559423224-14.974181953944286.83592601162193.13825594232236
48102101.87112579640617.705047364427784.4238268391666-0.128874203594279
49121149.16434209114910.823930242139782.011727666711428.1643420911489
5098119.633854322911-1.0331025132441077.399248190332921.6338543229112
517687.960523142937-8.7472918568913372.786768713954311.960523142937
527786.21030696679730.21106312363380067.57862990956899.2103069667973
536367.4601125954382-3.8306037006216762.37049110518344.46011259543825
543716.11052220533341.1688093152146956.7206684794519-20.8894777946666
55357.7609635795126211.168190566766951.0708458537204-27.2390364204874
56233.69281484509678-3.1936594055994345.5008445605026-19.3071851549032
574036.94323841129873.1259183214164339.9308432672849-3.0567615887013
582934.3050316747587-12.424126159358636.11909448459995.30503167475867
593756.6668362520293-14.974181953944232.307345701914919.6668362520293
605154.202942307529317.705047364427730.09201032804313.20294230752926
61201.2993948036890910.823930242139727.8766749541712-18.7006051963109
622830.9885179585308-1.0331025132441026.04458455471332.98851795853084
631310.5347977016360-8.7472918568913324.2124941552553-2.46520229836397
642221.37629810152460.21106312363380022.4126387748416-0.62370189847536
652533.2178203061939-3.8306037006216720.61278339442788.21782030619385
66135.558673270346331.1688093152146919.2725174144390-7.44132672965367
67162.8995579987829111.168190566766917.9322514344501-13.1004420012171
681312.1124425198699-3.1936594055994317.0812168857296-0.887557480130138
691612.64389934157463.1259183214164316.230182337009-3.35610065842542
701730.9585327255352-12.424126159358615.465593433823413.9585327255352
71918.2731774233064-14.974181953944214.70100453063789.27317742330638
72172.5662050227736917.705047364427713.7287476127987-14.4337949772263
732526.419579062900810.823930242139712.75649069495951.41957906290083
741417.3245134745749-1.0331025132441011.70858903866923.32451347457486
75814.0866044745123-8.7472918568913310.6606873823796.08660447451232
7674.205452331066730.2110631236338009.58348454529947-2.79454766893327
771015.3243219924017-3.830603700621678.506281708219925.32432199240175
7875.457199842586581.168809315214697.37399084219873-1.54280015741342
79102.5901094570555311.16819056676696.24169997617753-7.40989054294447
8034.13708965813068-3.193659405599435.056569747468751.13708965813068
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291067413j2h3obikzgebviq/11il81291067442.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291067413j2h3obikzgebviq/11il81291067442.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291067413j2h3obikzgebviq/21il81291067442.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291067413j2h3obikzgebviq/21il81291067442.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Nov/29/t1291067413j2h3obikzgebviq/4urlb1291067442.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/29/t1291067413j2h3obikzgebviq/4urlb1291067442.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