Home » date » 2010 » Dec » 26 »

*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: Sun, 26 Dec 2010 21:23:25 +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/Dec/26/t1293398560kenvk4npgy0iw81.htm/, Retrieved Sun, 26 Dec 2010 22:22:45 +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/Dec/26/t1293398560kenvk4npgy0iw81.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 «
24 29 29 25 16 18 13 22 15 20 19 18 13 17 17 13 14 13 17 17 15 9 10 9 14 18 18 12 16 12 19 13 12 13 11 10 16 12 6 8 6 8 8 9 13 8 11 8 10 15 12 13 12 15 13 13 16 14 12 15 14 19 16 16 11 13 12 11 6 9 6 15 17 13 12 13 10 14 13 10 11 12 7 11 9 13 12 5 13 11 8 8 8 8 0 3 0 -1 -1 -4 1 -1 0 -1 6 0 -3 -3 4 1 0 -4 -2 3 2 5 6 6 3 4 7 5 6 1 3 6 0 3 4 7 6
 
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
Seasonal13110132
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
12422.05234708399290.84036930093092525.1072836150762-1.94765291600712
22931.57019398001382.2055590204704724.22424699951572.57019398001385
32933.54258815194721.1162014640976023.34121038395524.54258815194724
42528.8694788550773-1.3816510541628122.51217219908553.86947885507729
51611.3781893906424-1.0613234048582621.6831340142159-4.62181060935761
61814.97479344900820.1505911196963820.8746154312954-3.02520655099176
7136.29866849866082-0.36476534703571720.0660968483749-6.70133150133918
82224.56124708958880.22810045121817819.2106524591932.56124708958881
91511.09654800140720.54824392858172618.3552080700111-3.90345199859284
102022.20031001093090.15986764966849817.63982233940062.20031001093086
111922.9404354860675-1.8648720948576316.92443660879023.94043548606748
121819.9393771220751-0.57632055984218516.63694343776711.93937712207510
13138.810180432325060.84036930093092516.349450266744-4.18981956767494
141715.72420728319052.2055590204704716.0702336963390-1.27579271680950
151717.09278140996831.1162014640976015.79101712593410.0927814099683495
161312.053103935675-1.3816510541628115.3285471184878-0.94689606432499
171414.1952462938167-1.0613234048582614.86607711104150.195246293816716
181311.40723647855570.1505911196963814.4421724017480-1.59276352144435
191720.3464976545813-0.36476534703571714.01826769245443.34649765458133
201719.8870715612620.22810045121817813.88482798751982.88707156126201
211515.70036778883300.54824392858172613.75138828258520.700367788833045
2294.10248670226140.15986764966849813.7376456480701-4.8975132977386
23108.14096908130265-1.8648720948576313.7239030135550-1.85903091869735
2494.82116216267775-0.57632055984218513.7551583971644-4.17883783732225
251413.37321691829520.84036930093092513.7864137807739-0.626783081704817
261819.96273160933432.2055590204704713.83170937019521.96273160933428
271821.00679357628581.1162014640976013.87700495961663.00679357628580
281211.4109712676107-1.3816510541628113.9706797865521-0.58902873238933
291618.9969687913706-1.0613234048582614.06435461348772.99696879137059
30129.824784365639460.1505911196963814.0246245146642-2.17521563436054
311924.3798709311951-0.36476534703571713.98489441584075.37987093119506
321312.17062058873490.22810045121817813.6012789600469-0.829379411265082
331210.23409256716510.54824392858172613.2176635042531-1.76590743283487
341313.24050244238050.15986764966849812.5996299079510.240502442380496
351111.8832757832088-1.8648720948576311.98159631164890.88327578320877
36109.22084157086565-0.57632055984218511.3554789889765-0.77915842913435
371620.43026903276490.84036930093092510.72936166630424.43026903276486
381211.50512932983942.2055590204704710.2893116496901-0.494870670160557
3961.034536902826441.116201464097609.84926163307596-4.96546309717356
4087.76466067885004-1.381651054162819.61699037531277-0.235339321149963
4163.67660428730868-1.061323404858269.38471911754958-2.32339571269132
4286.564309304962040.150591119696389.28509957534158-1.43569069503796
4387.17928531390214-0.3647653470357179.18548003313358-0.820714686097864
4498.428484465989660.2281004512181789.34341508279216-0.571515534010338
451315.95040593896750.5482439285817269.501350132450742.95040593896753
4685.917739234025810.1598676496684989.9223931163057-2.08226076597419
471113.5214359946970-1.8648720948576310.34343610016072.52143599469698
4885.77372283002227-0.57632055984218510.8025977298199-2.22627716997773
49107.89787133958990.84036930093092511.2617593594792-2.10212866041010
501516.13062875690682.2055590204704711.66381222262271.13062875690683
511210.81793345013621.1162014640976012.0658650857662-1.18206654986383
521314.9463797994544-1.3816510541628112.43527125470841.94637979945444
531212.2566459812078-1.0613234048582612.80467742365050.256645981207766
541516.68478886830090.1505911196963813.16462001200271.68478886830092
551312.8402027466808-0.36476534703571713.5245626003549-0.159797253319194
561311.94660253482750.22810045121817813.8252970139544-1.05339746517255
571617.32572464386440.54824392858172614.12603142755381.32572464386445
581413.55538291845230.15986764966849814.2847494318792-0.444617081547706
591211.4214046586530-1.8648720948576314.4434674362046-0.578595341346954
601516.1627168699102-0.57632055984218514.41360368993201.16271686991023
611412.77589075540980.84036930093092514.3837399436593-1.22410924459025
621921.70552310241312.2055590204704714.08891787711642.70552310241309
631617.08970272532891.1162014640976013.79409581057351.08970272532885
641620.0547177613867-1.3816510541628113.32693329277614.05471776138667
651110.2015526298795-1.0613234048582612.8597707749787-0.798447370120465
661313.33635893110800.1505911196963812.51304994919570.336358931107956
671212.1984362236231-0.36476534703571712.16632912341260.198436223623110
68119.849445009908270.22810045121817811.9224545388736-1.15055499009173
696-0.2268238829162290.54824392858172611.6785799543345-6.22682388291623
7096.29164399888430.15986764966849811.5484883514472-2.7083560011157
7162.44647534629774-1.8648720948576311.4183967485599-3.55352465370226
721519.0699828717998-0.57632055984218511.50633768804244.06998287179977
731721.56535207154410.84036930093092511.59427862752494.56535207154414
741312.00939136080272.2055590204704711.7850496187269-0.990608639197323
751210.90797792597361.1162014640976011.9758206099288-1.09202207402636
761315.3440391989245-1.3816510541628112.03761185523842.34403919892445
77108.96192030431031-1.0613234048582612.0994031005479-1.03807969568969
781415.95637733450530.1505911196963811.89303154579831.95637733450528
791314.678105355987-0.36476534703571711.68665999104871.67810535598699
80108.358321946945860.22810045121817811.4135776018360-1.64167805305414
811110.31126085879510.54824392858172611.1404952126232-0.688739141204918
821212.91808711613130.15986764966849810.92204523420020.918087116131304
8375.16127683908043-1.8648720948576310.7035952557772-1.83872316091957
841112.0673947883771-0.57632055984218510.50892577146511.06739478837708
8596.845374411916060.84036930093092510.3142562871530-2.15462558808394
861313.69243857045282.2055590204704710.10200240907680.692438570452763
871212.99405000490191.116201464097609.889748531000510.994050004901887
8851.84731807802191-1.381651054162819.5343329761409-3.15268192197809
891317.8824059835770-1.061323404858269.178917421281284.88240598357698
901113.31156909147440.150591119696388.537839788829172.31156909147445
9188.46800319065864-0.3647653470357177.896762156377070.468003190658642
9288.839389230748230.2281004512181786.932510318033590.839389230748233
9389.483497591728170.5482439285817265.96825847969011.48349759172817
94810.94410341904560.1598676496684984.896028931285882.94410341904562
950-1.95892728802402-1.864872094857633.82379938288166-1.95892728802402
9633.70806663296536-0.5763205598421852.868253926876830.708066632965358
970-2.753077771802920.8403693009309251.912708470872-2.75307777180292
98-1-5.483637892991962.205559020470471.27807887252149-4.48363789299196
99-1-3.759650738268581.116201464097600.64344927417098-2.75965073826858
100-4-6.91300488780998-1.381651054162810.294655941972783-2.91300488780998
10113.11546079508367-1.06132340485826-0.05413739022541532.11546079508367
102-1-2.041604893413020.15059111969638-0.108986226283359-1.04160489341302
10300.52860040937702-0.364765347035717-0.1638350623413030.52860040937702
104-1-2.140559325685150.228100451218178-0.0875411255330258-1.14055932568515
105611.46300326014300.548243928581726-0.01124718872474815.46300326014302
1060-0.1623017959752970.1598676496684980.00243414630679873-0.162301795975297
107-3-4.15124338648071-1.864872094857630.0161154813383456-1.15124338648071
108-3-5.475965492561-0.5763205598421850.052286052403185-2.475965492561
10947.071174075601050.8403693009309250.08845662346802443.07117407560105
1101-0.5274246798459442.205559020470470.321865659375471-1.52742467984594
1110-1.671476159380521.116201464097600.555274695282918-1.67147615938052
112-4-7.58852350756102-1.381651054162810.970174561723824-3.58852350756102
113-2-4.32375102330647-1.061323404858261.38507442816473-2.32375102330647
11433.939286383235960.150591119696381.910122497067660.93928638323596
11521.92959478106513-0.3647653470357172.43517056597059-0.0704052189348734
11656.855465271199710.2281004512181782.916434277582111.85546527119971
11768.054058082224640.5482439285817263.397697989193632.05405808222464
11868.064743340354140.1598676496684983.775389009977362.06474334035414
11933.71179206409654-1.864872094857634.153080030761090.71179206409654
12044.32081791813428-0.5763205598421854.255502641707910.320817918134277
12178.801705446414350.8403693009309254.357925252654721.80170544641435
12253.516755011469042.205559020470474.27768596806049-1.48324498853096
12366.686351852436151.116201464097604.197446683466250.686351852436152
1241-0.87316402548323-1.381651054162814.25481507964604-1.87316402548323
12532.74913992903243-1.061323404858264.31218347582582-0.250860070967565
12667.461845872889860.150591119696384.387563007413761.46184587288986
1270-4.09817719196599-0.3647653470357174.4629425390017-4.09817719196599
12831.227332612078640.2281004512181784.54456693670318-1.77266738792136
12942.825564737013620.5482439285817264.62619133440466-1.17443526298638
13079.106085412815950.1598676496684984.734046937515552.10608541281595
13169.02296955423119-1.864872094857634.841902540626453.02296955423119
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293398560kenvk4npgy0iw81/1jdj71293398601.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293398560kenvk4npgy0iw81/1jdj71293398601.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293398560kenvk4npgy0iw81/2u4is1293398601.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293398560kenvk4npgy0iw81/2u4is1293398601.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293398560kenvk4npgy0iw81/3u4is1293398601.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293398560kenvk4npgy0iw81/3u4is1293398601.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t1293398560kenvk4npgy0iw81/45dzv1293398601.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t1293398560kenvk4npgy0iw81/45dzv1293398601.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