Home » date » 2010 » Dec » 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: Wed, 29 Dec 2010 14:40:33 +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/29/t129363349583w5s64fh4i5lb7.htm/, Retrieved Wed, 29 Dec 2010 15:38:16 +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/29/t129363349583w5s64fh4i5lb7.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 «
1856 1834 2095 2164 2368 2072 2521 1823 1947 2226 1754 1786 2072 1846 2137 2466 2154 2289 2628 2074 2798 2194 2442 2565 2063 2069 2539 1898 2139 2408 2725 2201 2311 2548 2276 2351 2280 2057 2479 2379 2295 2456 2546 2844 2260 2981 2678 3440 2842 2450 2669 2570 2540 2318 2930 2947 2799 2695 2498 2260 2160 2058 2533 2150 2172 2155 3016 2333 2355 2825 2214 2360 2299 1746 2069 2267 1878 2266 2282 2085 2277 2251 1828 1954 1851 1570 1852 2187 1855 2218 2253 2028 2169 1997 2034 1791 1627 1631 2319 1707 1747 2397 2059 2251 2558 2406 2049 2074 1734
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
118561717.0461780852-167.9329217312442162.88674364604-138.953821914796
218341862.49484899914-340.3224360875782145.8275870884428.4948489991393
320952019.7018412949841.52972817418342128.76843053084-75.2981587050203
421642273.81230133391-59.36084003855852113.54853870464109.812301333914
523682768.58944401808-130.9180908965292098.32864687845400.589444018078
620722028.2456188650828.59869481184742087.15568632307-43.7543811349224
725212672.34595227068293.6713219616272075.9827257677151.345952270675
818231548.3617396131230.19311419199412067.44514619488-274.638260386879
919471705.93337153961129.1590618383142058.90756662207-241.066628460386
1022262193.88895345562202.1331091829782055.9779373614-32.1110465443771
1117541513.0669634892-58.11527158992282053.04830810073-240.933036510804
1217861469.4683680680931.36458010525252071.16705182666-316.531631931911
1320722222.64712617865-167.9329217312442089.28579555259150.647126178654
1418461909.33516127068-340.3224360875782122.987274816963.3351612706765
1521372075.781517744641.52972817418342156.68875408121-61.2184822553963
1624662796.48800268567-59.36084003855852194.87283735288330.488002685674
1721542205.86117027197-130.9180908965292233.0569206245651.8611702719741
1822892285.0060042995228.59869481184742264.39530088864-3.99399570048354
1926282666.59499688566293.6713219616272295.7336811527238.5949968856567
2020741807.4188971560930.19311419199412310.38798865191-266.581102843908
2127983141.79864201057129.1590618383142325.04229615111343.798642010574
2221941860.33969433202202.1331091829782325.52719648501-333.660305667984
2324422616.10317477102-58.11527158992282326.0120968189174.103174771022
2425652773.0627789728931.36458010525252325.57264092186208.062778972885
2520631968.79973670642-167.9329217312442325.13318502482-94.20026329358
2620692155.69740957742-340.3224360875782322.6250265101586.6974095774231
2725392716.3534038303341.52972817418342320.11686799549177.353403830331
2818981541.58710901897-59.36084003855852313.77373101959-356.41289098103
2921392101.48749685284-130.9180908965292307.43059404369-37.5125031471621
3024082483.3030581480828.59869481184742304.0982470400775.3030581480775
3127252855.56277800192293.6713219616272300.76590003646130.562778001915
3222012064.1138609616230.19311419199412307.69302484638-136.886139038376
3323112178.22078850538129.1590618383142314.62014965631-132.779211494621
3425482565.77005108346202.1331091829782328.0968397335617.7700510834634
3522762268.54174177911-58.11527158992282341.57352981081-7.45825822088818
3623512315.6788463686631.36458010525252354.95657352609-35.3211536313438
3722802359.59330448987-167.9329217312442368.3396172413779.593304489872
3820572070.07024346866-340.3224360875782384.2521926189213.0702434686559
3924792516.3055038293541.52972817418342400.1647679964737.3055038293451
4023792388.47512987157-59.36084003855852428.885710166999.47512987157006
4122952263.31143855902-130.9180908965292457.60665233751-31.6885614409757
4224562379.5022434592728.59869481184742503.89906172888-76.4977565407303
4325462248.13720691811293.6713219616272550.19147112026-297.862793081887
4428443063.2392569089430.19311419199412594.56762889906219.239256908944
4522601751.89715148382129.1590618383142638.94378667786-508.102848516178
4629813092.90376149681202.1331091829782666.96312932021111.903761496813
4726782719.13279962737-58.11527158992282694.9824719625541.1327996273685
4834404138.6466350594331.36458010525252709.98878483531698.646635059433
4928423126.93782402317-167.9329217312442724.99509770807284.937824023169
5024502508.91632230913-340.3224360875782731.4061137784558.9163223091291
5126692558.6531419769941.52972817418342737.81712984882-110.346858023006
5225702479.91937771896-59.36084003855852719.4414623196-90.0806222810397
5325402509.85229610616-130.9180908965292701.06579479037-30.1477038938428
5423181950.4984565904128.59869481184742656.90284859774-367.501543409588
5529302953.58877563326293.6713219616272612.7399024051123.588775633265
5629473288.3217151170830.19311419199412575.48517069093341.321715117077
5727992930.61049918494129.1590618383142538.23043897675131.610499184937
5826952676.73160502789202.1331091829782511.13528578914-18.2683949721149
5924982570.0751389884-58.11527158992282484.0401326015372.0751389883976
6022602030.116488735931.36458010525252458.51893115885-229.883511264099
6121602054.93519201508-167.9329217312442432.99772971617-105.064807984923
6220582047.23172509917-340.3224360875782409.0907109884-10.7682749008263
6325332639.2865795651841.52972817418342385.18369226064106.286579565176
6421501985.15973668612-59.36084003855852374.20110335244-164.840263313884
6521722111.69957645228-130.9180908965292363.21851444425-60.3004235477156
6621551920.4000059070828.59869481184742361.00129928107-234.599994092921
6730163379.54459392047293.6713219616272358.7840841179363.544593920471
6823332285.2191510822630.19311419199412350.58773472575-47.7808489177423
6923552238.44955282809129.1590618383142342.39138533359-116.550447171908
7028253120.56174302162202.1331091829782327.3051477954295.561743021622
7122142173.89636133272-58.11527158992282312.21891025721-40.1036386672836
7223602398.6055790597131.36458010525252290.0298408350438.6055790597111
7322992498.09215031838-167.9329217312442267.84077141287199.092150318377
7417461593.46222273484-340.3224360875782238.86021335274-152.53777726516
7520691886.5906165332141.52972817418342209.87965529261-182.409383466792
7622672414.6986940088-59.36084003855852178.66214602976147.698694008799
7718781739.47345412962-130.9180908965292147.44463676691-138.526545870381
7822662385.8705311385428.59869481184742117.53077404961119.870531138544
7922822182.71176670607293.6713219616272087.61691133231-99.2882332939328
8020852075.2040115388830.19311419199412064.60287426913-9.79598846112049
8122772383.25210095574129.1590618383142041.58883720595106.252100955739
8222512270.20167464266202.1331091829782029.6652161743619.2016746426634
8318281696.37367644715-58.11527158992282017.74159514277-131.626323552847
8419541863.8731466928331.36458010525252012.76227320192-90.1268533071716
8518511862.14997047018-167.9329217312442007.7829512610711.149970470176
8615701475.19802919509-340.3224360875782005.12440689249-94.8019708049128
8718521660.004409301941.52972817418342002.46586252391-191.995590698097
8821872433.9731058805-59.36084003855851999.38773415806246.973105880498
8918551844.60848510432-130.9180908965291996.30960579221-10.391514895678
9022182415.5090604072628.59869481184741991.89224478089197.50906040726
9122532224.8537942688293.6713219616271987.47488376958-28.1462057312049
9220282042.8706175054330.19311419199411982.9362683025814.8706175054267
9321692230.4432853261129.1590618383141978.3976528355861.4432853261046
9419971819.555241928202.1331091829781972.31164888902-177.444758071996
9520342159.88962664747-58.11527158992281966.22564494246125.889626647467
9617911586.0304959656331.36458010525251964.60492392911-204.969504034366
9716271458.94871881547-167.9329217312441962.98420291577-168.051281184527
9816311625.16144107206-340.3224360875781977.16099501552-5.83855892794077
9923192605.1324847105541.52972817418341991.33778711527286.132484710551
10017071458.74110643959-59.36084003855852014.61973359897-248.258893560414
10117471587.01641081385-130.9180908965292037.90168008268-159.983589186149
10223972714.679673120228.59869481184742050.72163206795317.679673120201
10320591760.78709398515293.6713219616272063.54158405322-298.212906014851
10422512396.382584247730.19311419199412075.4243015603145.382584247704
10525582899.53391909431129.1590618383142087.30701906738341.533919094305
10624062510.41409072215202.1331091829782099.45280009487104.414090722154
10720492044.51669046757-58.11527158992282111.59858112235-4.48330953243203
10820741994.39515724631.36458010525252122.24026264875-79.6048427540036
10917341503.0509775561-167.9329217312442132.88194417515-230.949022443903
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t129363349583w5s64fh4i5lb7/11fcb1293633628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t129363349583w5s64fh4i5lb7/11fcb1293633628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t129363349583w5s64fh4i5lb7/21fcb1293633628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t129363349583w5s64fh4i5lb7/21fcb1293633628.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t129363349583w5s64fh4i5lb7/3u7bw1293633628.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t129363349583w5s64fh4i5lb7/3u7bw1293633628.ps (open in new window)


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