Home » date » 2010 » 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: Thu, 16 Dec 2010 11:50:06 +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/16/t1292500089ew5abpiqz8gs888.htm/, Retrieved Thu, 16 Dec 2010 12:48:09 +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/16/t1292500089ew5abpiqz8gs888.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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
118561717.04617808520-167.9329217312432162.88674364604-138.953821914795
218341862.49484899914-340.3224360875782145.8275870884428.4948489991398
320952019.7018412949841.52972817418362128.76843053084-75.2981587050208
421642273.81230133391-59.36084003855842113.54853870464109.812301333915
523682768.58944401808-130.9180908965292098.32864687845400.589444018078
620722028.2456188650828.59869481184742087.15568632307-43.7543811349212
725212672.34595227068293.6713219616272075.98272576770151.345952270676
818231548.3617396131230.19311419199382067.44514619488-274.638260386878
919471705.93337153961129.1590618383142058.90756662207-241.066628460385
1022262193.88895345562202.1331091829782055.9779373614-32.1110465443764
1117541513.06696348920-58.11527158992282053.04830810073-240.933036510804
1217861469.4683680680931.36458010525272071.16705182666-316.53163193191
1320722222.64712617865-167.9329217312432089.28579555259150.647126178655
1418461909.33516127068-340.3224360875782122.987274816963.3351612706765
1521372075.7815177446041.52972817418362156.68875408121-61.2184822553968
1624662796.48800268567-59.36084003855842194.87283735288330.488002685674
1721542205.86117027197-130.9180908965292233.0569206245651.8611702719741
1822892285.0060042995228.59869481184742264.39530088864-3.99399570048308
1926282666.59499688566293.6713219616272295.7336811527238.5949968856571
2020741807.4188971560930.19311419199382310.38798865191-266.581102843907
2127983141.79864201058129.1590618383142325.04229615111343.798642010575
2221941860.33969433202202.1331091829782325.52719648501-333.660305667983
2324422616.10317477102-58.11527158992282326.0120968189174.103174771022
2425652773.0627789728931.36458010525272325.57264092186208.062778972886
2520631968.79973670642-167.9329217312432325.13318502482-94.2002632935796
2620692155.69740957742-340.3224360875782322.6250265101586.6974095774235
2725392716.3534038303341.52972817418362320.11686799548177.353403830331
2818981541.58710901897-59.36084003855842313.77373101959-356.412890981029
2921392101.48749685284-130.9180908965292307.43059404369-37.5125031471621
3024082483.3030581480828.59869481184742304.0982470400775.3030581480784
3127252855.56277800192293.6713219616272300.76590003646130.562778001916
3222012064.1138609616230.19311419199382307.69302484638-136.886139038375
3323112178.22078850538129.1590618383142314.62014965631-132.779211494620
3425482565.77005108346202.1331091829782328.0968397335617.7700510834638
3522762268.54174177911-58.11527158992282341.57352981081-7.45825822088773
3623512315.6788463686631.36458010525272354.95657352609-35.3211536313433
3722802359.59330448987-167.9329217312432368.3396172413779.5933044898725
3820572070.07024346866-340.3224360875782384.2521926189213.0702434686564
3924792516.3055038293541.52972817418362400.1647679964737.3055038293451
4023792388.47512987157-59.36084003855842428.885710166999.47512987157006
4122952263.31143855902-130.9180908965292457.60665233751-31.6885614409762
4224562379.5022434592728.59869481184742503.89906172888-76.4977565407303
4325462248.13720691811293.6713219616272550.19147112026-297.862793081887
4428443063.2392569089430.19311419199382594.56762889906219.239256908944
4522601751.89715148382129.1590618383142638.94378667786-508.102848516177
4629813092.90376149681202.1331091829782666.96312932021111.903761496813
4726782719.13279962737-58.11527158992282694.9824719625541.1327996273685
4834404138.6466350594331.36458010525272709.98878483531698.646635059434
4928423126.93782402317-167.9329217312432724.99509770807284.93782402317
5024502508.91632230913-340.3224360875782731.4061137784558.91632230913
5126692558.6531419769941.52972817418362737.81712984882-110.346858023006
5225702479.91937771896-59.36084003855842719.44146231960-90.0806222810384
5325402509.85229610616-130.9180908965292701.06579479037-30.1477038938424
5423181950.4984565904128.59869481184742656.90284859774-367.501543409587
5529302953.58877563327293.6713219616272612.7399024051123.5887756332659
5629473288.3217151170830.19311419199382575.48517069093341.321715117078
5727992930.61049918494129.1590618383142538.23043897675131.610499184938
5826952676.73160502789202.1331091829782511.13528578914-18.2683949721140
5924982570.0751389884-58.11527158992282484.0401326015272.075138988399
6022602030.1164887359031.36458010525272458.51893115884-229.883511264097
6121602054.93519201508-167.9329217312432432.99772971617-105.064807984922
6220582047.23172509918-340.3224360875782409.0907109884-10.7682749008250
6325332639.2865795651841.52972817418362385.18369226064106.286579565177
6421501985.15973668612-59.36084003855842374.20110335244-164.840263313883
6521722111.69957645228-130.9180908965292363.21851444424-60.3004235477151
6621551920.4000059070828.59869481184742361.00129928107-234.599994092921
6730163379.54459392047293.6713219616272358.7840841179363.544593920471
6823332285.2191510822630.19311419199382350.58773472575-47.7808489177419
6923552238.44955282809129.1590618383142342.39138533359-116.550447171907
7028253120.56174302162202.1331091829782327.3051477954295.561743021623
7122142173.89636133272-58.11527158992282312.21891025721-40.1036386672827
7223602398.6055790597131.36458010525272290.0298408350438.605579059712
7322992498.09215031838-167.9329217312432267.84077141287199.092150318378
7417461593.46222273484-340.3224360875782238.86021335274-152.537777265159
7520691886.5906165332141.52972817418362209.87965529261-182.409383466791
7622672414.6986940088-59.36084003855842178.66214602976147.6986940088
7718781739.47345412962-130.9180908965292147.44463676691-138.526545870380
7822662385.8705311385528.59869481184742117.53077404961119.870531138546
7922822182.71176670607293.6713219616272087.61691133230-99.2882332939319
8020852075.2040115388830.19311419199382064.60287426913-9.79598846111958
8122772383.25210095574129.1590618383142041.58883720595106.25210095574
8222512270.20167464266202.1331091829782029.6652161743619.2016746426641
8318281696.37367644715-58.11527158992282017.74159514277-131.626323552847
8419541863.8731466928331.36458010525272012.76227320192-90.1268533071714
8518511862.14997047018-167.9329217312432007.7829512610711.1499704701760
8615701475.19802919509-340.3224360875782005.12440689249-94.8019708049126
8718521660.0044093019041.52972817418362002.46586252391-191.995590698097
8821872433.9731058805-59.36084003855841999.38773415806246.973105880498
8918551844.60848510432-130.9180908965291996.30960579221-10.3915148956778
9022182415.5090604072628.59869481184741991.89224478089197.509060407260
9122532224.85379426880293.6713219616271987.47488376958-28.1462057312042
9220282042.8706175054330.19311419199381982.9362683025814.8706175054276
9321692230.44328532611129.1590618383141978.3976528355861.443285326106
9419971819.55524192800202.1331091829781972.31164888902-177.444758071995
9520342159.88962664747-58.11527158992281966.22564494245125.889626647468
9617911586.0304959656331.36458010525271964.60492392911-204.969504034365
9716271458.94871881547-167.9329217312431962.98420291577-168.051281184527
9816311625.16144107206-340.3224360875781977.16099501552-5.83855892794077
9923192605.1324847105541.52972817418361991.33778711527286.13248471055
10017071458.74110643959-59.36084003855842014.61973359897-248.258893560414
10117471587.01641081385-130.9180908965292037.90168008268-159.983589186149
10223972714.679673120228.59869481184742050.72163206795317.679673120201
10320591760.78709398515293.6713219616272063.54158405323-298.212906014852
10422512396.382584247730.19311419199382075.42430156031145.382584247701
10525582899.5339190943129.1590618383142087.30701906739341.533919094301
10624062510.41409072215202.1331091829782099.45280009487104.414090722152
10720492044.51669046757-58.11527158992282111.59858112235-4.48330953243158
10820741994.39515724631.36458010525272122.24026264875-79.6048427540015
10917341503.0509775561-167.9329217312432132.88194417514-230.9490224439
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292500089ew5abpiqz8gs888/1b1v81292500198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292500089ew5abpiqz8gs888/1b1v81292500198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292500089ew5abpiqz8gs888/2b1v81292500198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292500089ew5abpiqz8gs888/2b1v81292500198.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292500089ew5abpiqz8gs888/3msut1292500198.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292500089ew5abpiqz8gs888/3msut1292500198.ps (open in new window)


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