Home » date » 2010 » Dec » 14 »

Paper - LOESS

*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: Tue, 14 Dec 2010 09:48:57 +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/14/t1292320019vksh908iaxb1ib9.htm/, Retrieved Tue, 14 Dec 2010 10:47:04 +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/14/t1292320019vksh908iaxb1ib9.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 «
235.1 280.7 264.6 240.7 201.4 240.8 241.1 223.8 206.1 174.7 203.3 220.5 299.5 347.4 338.3 327.7 351.6 396.6 438.8 395.6 363.5 378.8 357 369 464.8 479.1 431.3 366.5 326.3 355.1 331.6 261.3 249 205.5 235.6 240.9 264.9 253.8 232.3 193.8 177 213.2 207.2 180.6 188.6 175.4 199 179.6 225.8 234 200.2 183.6 178.2 203.2 208.5 191.8 172.8 148 159.4 154.5 213.2 196.4 182.8 176.4 153.6 173.2 171 151.2 161.9 157.2 201.7 236.4 356.1 398.3 403.7 384.6 365.8 368.1 367.9 347 343.3 292.9 311.5 300.9 366.9 356.9 329.7 316.2 269 289.3 266.2 253.6 233.8 228.4 253.6 260.1 306.6 309.2 309.5 271 279.9 317.9 298.4 246.7 227.3 209.1
 
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'George Udny Yule' @ 72.249.76.132


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1235.1221.97543723171839.6937187003568208.530844067926-13.1245627682823
2280.7296.4200094537752.637641710942212.34234883528815.72000945377
3264.6279.27568790273533.7704584946149216.15385360265114.6756879027346
4240.7253.7687904805977.31523739464612220.31597212475713.0687904805971
5201.4189.217452014034-10.8955426608971224.478090646863-12.1825479859660
6240.8235.80058604901316.7684648387020229.030949112285-4.99941395098699
7241.1235.43926593946513.1769264828283233.583807577707-5.66073406053522
8223.8227.394824517345-18.1797061906026238.3848816732573.59482451734513
9206.1199.239265488785-30.2252212575932243.185955768808-6.86073451121479
10174.7149.161340403322-50.1298762227587250.368535819437-25.5386595966784
11203.3178.245340355168-29.1964562252343257.551115870066-25.0546596448319
12220.5195.306459211026-24.7356479452433270.429188734217-25.1935407889741
13299.5275.99901970127539.6937187003568283.307261598369-23.5009802987255
14347.4343.25843617999452.637641710942298.903922109064-4.14156382000607
15338.3328.32895888562633.7704584946149314.500582619759-9.97104111437426
16327.7317.8458645528847.31523739464612330.23889805247-9.85413544711628
17351.6368.118329175716-10.8955426608971345.97721348518116.5183291757162
18396.6416.80617776061816.7684648387020359.6253574006820.2061777606179
19438.8491.14957220099213.1769264828283373.27350131617952.3495722009924
20395.6426.426025785933-18.1797061906026382.95368040466930.8260257859332
21363.5364.591361764434-30.2252212575932392.6338594931601.09136176443371
22378.8412.122862330418-50.1298762227587395.6070138923433.3228623304184
23357344.616287933713-29.1964562252343398.580168291521-12.3837120662867
24369368.504093966340-24.7356479452433394.231553978903-0.495906033659537
25464.8500.02334163335939.6937187003568389.88293966628535.2233416333585
26479.1525.26055324806652.637641710942380.30180504099246.160553248066
27431.3458.10887108968633.7704584946149370.72067041569926.8088710896859
28366.5367.2482390057357.31523739464612358.4365235996190.748239005735002
29326.3317.343165877359-10.8955426608971346.152376783539-8.95683412264145
30355.1361.64949668419116.7684648387020331.7820384771076.54949668419141
31331.6332.61137334649713.1769264828283317.4117001706751.01137334649707
32261.3239.193090053197-18.1797061906026301.586616137405-22.1069099468028
33249242.463689153457-30.2252212575932285.761532104136-6.53631084654296
34205.5189.918601185967-50.1298762227587271.211275036791-15.5813988140325
35235.6243.735438255788-29.1964562252343256.6610179694468.13543825578807
36240.9261.480007172285-24.7356479452433245.05564077295820.5800071722853
37264.9256.65601772317339.6937187003568233.450263576470-8.24398227682659
38253.8229.42557199780752.637641710942225.536786291252-24.3744280021935
39232.3213.20623249935233.7704584946149217.623309006033-19.0937675006481
40193.8167.0596754204797.31523739464612213.225087184875-26.7403245795213
41177156.06867729718-10.8955426608971208.826865363717-20.9313227028200
42213.2203.21898233780516.7684648387020206.412552823493-9.98101766219534
43207.2197.22483323390213.1769264828283203.998240283269-9.97516676609783
44180.6176.803874112352-18.1797061906026202.57583207825-3.79612588764758
45188.6206.271797384362-30.2252212575932201.15342387323117.6717973843625
46175.4200.965746288116-50.1298762227587199.96412993464325.5657462881157
47199228.421620229179-29.1964562252343198.77483599605529.4216202291791
48179.6186.330050853176-24.7356479452433197.6055970920676.7300508531759
49225.8215.46992311156439.6937187003568196.436358188080-10.3300768884364
50234220.18013984931252.637641710942195.182218439746-13.8198601506880
51200.2172.70146281397333.7704584946149193.928078691412-27.4985371860273
52183.6167.3979326026197.31523739464612192.486830002735-16.2020673973811
53178.2176.249961346839-10.8955426608971191.045581314058-1.95003865316056
54203.2199.75686367218316.7684648387020189.874671489115-3.44313632781683
55208.5215.11931185300013.1769264828283188.7037616641726.61931185299969
56191.8214.489590427305-18.1797061906026187.29011576329722.6895904273053
57172.8189.948751395171-30.2252212575932185.87646986242217.1487513951708
58148162.488714462602-50.1298762227587183.64116176015714.4887144626015
59159.4166.590602567342-29.1964562252343181.4058536578927.19060256734244
60154.5155.511978555823-24.7356479452433178.223669389421.01197855582325
61213.2211.66479617869539.6937187003568175.041485120948-1.53520382130506
62196.4167.65724558902452.637641710942172.505112700034-28.7427544109763
63182.8161.86080122626533.7704584946149169.968740279120-20.9391987737353
64176.4174.5354328083497.31523739464612170.949329797005-1.86456719165113
65153.6146.165623346007-10.8955426608971171.929919314890-7.43437665399253
66173.2150.26705446862216.7684648387020179.364480692676-22.9329455313782
67171142.02403144670913.1769264828283186.799042070463-28.975968553291
68151.2119.318177523871-18.1797061906026201.261528666732-31.8818224761295
69161.9138.301205994592-30.2252212575932215.724015263001-23.5987940054081
70157.2130.280252526085-50.1298762227587234.249623696674-26.9197474739151
71201.7179.821224094888-29.1964562252343252.775232130346-21.8787759051119
72236.4226.058017994607-24.7356479452433271.477629950636-10.3419820053926
73356.1382.32625352871839.6937187003568290.18002777092626.2262535287176
74398.3437.38036457123752.637641710942306.58199371782139.0803645712368
75403.7450.64558184066833.7704584946149322.98395966471746.9455818406683
76384.6427.6843094734927.31523739464612334.20045313186243.0843094734923
77365.8397.078596061891-10.8955426608971345.41694659900731.2785960618906
78368.1370.02189528485816.7684648387020349.409639876441.92189528485778
79367.9369.22074036329813.1769264828283353.4023331538741.32074036329772
80347361.544842081117-18.1797061906026350.63486410948614.5448420811166
81343.3368.957826192495-30.2252212575932347.86739506509825.6578261924952
82292.9294.283036640768-50.1298762227587341.6468395819911.38303664076756
83311.5316.77017212635-29.1964562252343335.4262840988845.27017212635008
84300.9298.837930809539-24.7356479452433327.697717135704-2.06206919046082
85366.9374.13713112711939.6937187003568319.9691501725247.23713112711926
86356.9349.33061094284352.637641710942311.831747346215-7.56938905715703
87329.7321.93519698547933.7704584946149303.694344519906-7.76480301452091
88316.2328.0522367354237.31523739464612297.03252586993011.8522367354235
89269258.524835440942-10.8955426608971290.370707219955-10.4751645590576
90289.3275.98567651429916.7684648387020285.845858646999-13.3143234857011
91266.2237.90206344312813.1769264828283281.321010074043-28.2979365568718
92253.6247.192468986929-18.1797061906026278.187237203673-6.40753101307081
93233.8222.77175692429-30.2252212575932275.053464333303-11.0282430757100
94228.4233.04126227799-50.1298762227587273.8886139447694.64126227799011
95253.6263.672692669000-29.1964562252343272.72376355623410.0726926690003
96260.1271.31237640877-24.7356479452433273.62327153647311.2123764087699
97306.6298.98350178293039.6937187003568274.522779516713-7.61649821706965
98309.2291.24817583304152.637641710942274.514182456017-17.9518241669588
99309.5310.72395611006433.7704584946149274.5055853953211.22395611006431
100271260.7241691838617.31523739464612273.960593421493-10.2758308161386
101279.9297.279941213233-10.8955426608971273.41560144766417.3799412132328
102317.9346.12012016956416.7684648387020272.91141499173428.2201201695644
103298.4311.21584498136913.1769264828283272.40722853580312.8158449813689
104246.7239.716300903419-18.1797061906026271.863405287183-6.9836990965809
105227.3213.505639219029-30.2252212575932271.319582038564-13.7943607809710
106209.1197.690713791673-50.1298762227587270.639162431086-11.4092862083274
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292320019vksh908iaxb1ib9/1l3581292320133.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292320019vksh908iaxb1ib9/1l3581292320133.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292320019vksh908iaxb1ib9/2l3581292320133.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292320019vksh908iaxb1ib9/2l3581292320133.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292320019vksh908iaxb1ib9/3vumb1292320133.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292320019vksh908iaxb1ib9/3vumb1292320133.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292320019vksh908iaxb1ib9/46m3e1292320133.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292320019vksh908iaxb1ib9/46m3e1292320133.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