Home » date » 2010 » Dec » 28 »

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, 28 Dec 2010 11:43:48 +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/28/t1293536647wk96eyg0240lxqq.htm/, Retrieved Tue, 28 Dec 2010 12:44:07 +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/28/t1293536647wk96eyg0240lxqq.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 «
621 587 655 517 646 657 382 345 625 654 606 510 614 647 580 614 636 388 356 639 753 611 639 630 586 695 552 619 681 421 307 754 690 644 643 608 651 691 627 634 731 475 337 803 722 590 724 627 696 825 677 656 785 412 352 839 729 696 641 695 638 762 635 721 854 418 367 824 687 601 676 740 691 683 594 729 731 386 331 706 715 657 653 642 643 718 654 632 731 392 344 792 852 649 629 685 617 715 715 629 916 531 357 917 828 708 858 775 785 1006 789 734 906 532 387 991 841 892 782 813 793 978 775 797 946 594 438 1022 868 795
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1621642.79700694035111.8706090170458587.33238404260321.7970069403515
2587490.88317218819898.734913245717584.381914566085-96.1168278118022
3655727.1511559381171.41739897231516581.43144508956872.1511559381171
4517452.90961064062.56813743939417578.522251920006-64.0903893594002
5646598.849955484034117.536985765522575.613058750444-47.1500445159664
6657929.70035766396-189.037545181598573.337187517638272.70035766396
7382496.823330358436-303.884646643267571.061316284831114.823330358436
83451.15501537981510119.368551168376569.476433451809-343.844984620185
9625593.66865723126888.439792149946567.891550618786-31.3313427687323
10654730.1316846009212.8198572721422565.04845812693876.1316846009196
11606622.50572451787427.2889098470352562.2053656350916.5057245178745
12510445.56021404759212.8770380719056561.562747880502-64.4397859524078
13614655.2092608570411.8706090170458560.92013012591441.2092608570401
14647629.04520637601398.734913245717566.21988037827-17.9547936239873
15580587.0629703970581.41739897231516571.5196306306267.0629703970584
16614648.3006661756282.56813743939417577.13119638497834.3006661756281
17636571.720252095149117.536985765522582.742762139329-64.2797479048513
18388378.653329281567-189.037545181598586.384215900031-9.3466707184333
19356425.858976982535-303.884646643267590.02566966073369.8589769825347
20639566.557932269526119.368551168376592.073516562098-72.442067730474
21753823.43884438659188.439792149946594.12136346346370.438844386591
22611614.26662251091312.8198572721422594.9135202169453.26662251091307
23639655.00541318253827.2889098470352595.70567697042716.0054131825381
24630650.73025247147712.8770380719056596.39270945661820.7302524714768
25586563.04964904014611.8706090170458597.079741942809-22.9503509598544
26695693.65410126879298.734913245717597.610985485491-1.34589873120797
27552504.4403719995121.41739897231516598.142229028173-47.5596280004885
28619636.3391041782082.56813743939417599.09275838239817.3391041782081
29681644.419726497856117.536985765522600.043287736622-36.5802735021442
30421429.068603919671-189.037545181598601.9689412619268.06860391967132
31307313.990051856037-303.884646643267603.894594787236.99005185603687
32754781.891365619332119.368551168376606.74008321229227.8913656193315
33690681.974636212788.439792149946609.585571637354-8.02536378730008
34644662.69469391610212.8198572721422612.48544881175618.6946939161023
35643643.32576416680827.2889098470352615.3853259861570.325764166807744
36608584.78117714007612.8770380719056618.341784788018-23.2188228599238
37651668.83114739307511.8706090170458621.2982435898817.8311473930746
38691659.27057100586498.734913245717623.994515748419-31.7294289941358
39627625.8918131207271.41739897231516626.690787906958-1.10818687927326
40634636.3300637040372.56813743939417629.1017988565692.330063704037
41731712.950204428298117.536985765522631.51280980618-18.0497955717019
42475504.03106635859-189.037545181598635.00647882300829.03106635859
43337339.384498803432-303.884646643267638.5001478398352.38449880343194
44803843.105846844975119.368551168376643.52560198664940.1058468449751
45722707.00915171659288.439792149946648.551056133462-14.9908482834082
46590515.07296766441112.8198572721422652.107175063447-74.9270323355888
47724765.04779615953427.2889098470352655.66329399343141.0477961595335
48627584.23602965920712.8770380719056656.886932268888-42.7639703407932
49696722.0188204386111.8706090170458658.11057054434426.0188204386101
50825891.59666979094898.734913245717659.66841696333566.5966697909479
51677691.3563376453591.41739897231516661.22626338232614.3563376453586
52656646.7818628218872.56813743939417662.649999738719-9.21813717811278
53785788.389278139367117.536985765522664.0737360951113.38927813936664
54412350.169540251452-189.037545181598662.868004930146-61.8304597485479
55352346.222372878088-303.884646643267661.66227376518-5.77762712191247
56839898.912314878401119.368551168376659.71913395322359.9123148784009
57729711.78421370878888.439792149946657.775994141266-17.215786291212
58696720.24194645281712.8198572721422658.93819627504124.2419464528170
59641594.61069174414927.2889098470352660.100398408816-46.3893082558509
60695715.16031875296912.8770380719056661.96264317512620.1603187529686
61638600.30450304151811.8706090170458663.824887941436-37.6954969584820
62762761.91299403369198.734913245717663.352092720592-0.0870059663092206
63635605.7033035279361.41739897231516662.879297499748-29.2966964720636
64721777.8783193338662.56813743939417661.5535432267456.8783193338663
65854930.235225280747117.536985765522660.2277889537376.2352252807473
66418364.900390592062-189.037545181598660.137154589536-53.0996094079383
67367377.838126417926-303.884646643267660.04652022534110.8381264179261
68824870.433277907757119.368551168376658.19817092386746.433277907757
69687629.21038622766288.439792149946656.349821622392-57.7896137723385
70601536.5163158345412.8198572721422652.663826893318-64.4836841654597
71676675.73325798872227.2889098470352648.977832164243-0.266742011277984
72740822.13399891289412.8770380719056644.988963015282.1339989128944
73691729.12929711679711.8706090170458641.00009386615738.1292971167968
74683629.18681212035498.734913245717638.07827463393-53.8131878796463
75594551.4261456259831.41739897231516635.156455401701-42.5738543740166
76729822.3928691547742.56813743939417633.03899340583293.3928691547742
77731713.541482824516117.536985765522630.921531409962-17.4585171754840
78386332.513392501339-189.037545181598628.524152680258-53.4866074986605
79331339.757872692713-303.884646643267626.1267739505558.7578726927128
80706667.253278526468119.368551168376625.378170305155-38.7467214735316
81715716.93064119029888.439792149946624.6295666597561.93064119029782
82657676.61697748230612.8198572721422624.56316524555219.6169774823059
83653654.21432632161727.2889098470352624.4967638313481.21432632161702
84642645.7502408211312.8770380719056625.3727211069653.75024082112952
85643647.88071260037211.8706090170458626.2486783825824.88071260037214
86718707.52028787834798.734913245717629.744798875936-10.4797121216529
87654673.3416816583951.41739897231516633.2409193692919.3416816583949
88632624.8529981839092.56813743939417636.578864376697-7.14700181609123
89731704.546204850374117.536985765522639.916809384104-26.4537951496263
90392331.599265495946-189.037545181598641.438279685652-60.400734504054
91344348.924896656068-303.884646643267642.9597499871994.92489665606843
92792820.192838934772119.368551168376644.43860989685228.192838934772
93852969.6427380435588.439792149946645.917469806505117.642738043549
94649634.47288835034912.8198572721422650.707254377509-14.5271116496513
95629575.21405120445127.2889098470352655.497038948514-53.785948795549
96685695.12279879612612.8770380719056662.00016313196810.1227987961262
97617553.62610366753111.8706090170458668.503287315423-63.3738963324686
98715656.54017819833898.734913245717674.724908555945-58.459821801662
99715747.6360712312181.41739897231516680.94652979646732.6360712312176
100629565.5860481093892.56813743939417689.845814451217-63.4139518906111
1019161015.71791512851117.536985765522698.74509910596699.7179151285113
102531539.297483236311-189.037545181598711.7400619452878.297483236311
103357293.149621858661-303.884646643267724.735024784607-63.8503781413393
104917976.935547320748119.368551168376737.69590151087659.9355473207479
105828816.90342961290988.439792149946750.656778237145-11.0965703870912
106708644.60204608446112.8198572721422758.578096643397-63.3979539155391
107858922.21167510331627.2889098470352766.49941504964964.2116751033161
108775767.54706671710812.8770380719056769.575895210987-7.45293328289233
109785785.4770156106311.8706090170458772.6523753723250.477015610629223
11010061137.7318583905498.734913245717775.533228363738131.731858390545
111789798.1685196725331.41739897231516778.4140813551529.16851967253308
112734684.478437181942.56813743939417780.953425378666-49.5215628180605
113906910.970244832297117.536985765522783.4927694021814.97024483229688
114532468.799890970358-189.037545181598784.23765421124-63.2001090296421
115387292.902107622969-303.884646643267784.982539020298-94.097892377031
1169911076.49727803144119.368551168376786.13417080018485.4972780314403
117841806.27440526998588.439792149946787.285802580069-34.7255947300148
118892980.1937889777212.8198572721422790.98635375013788.193788977721
119782742.0241852327627.2889098470352794.686904920205-39.9758147672403
120813814.93285872716312.8770380719056798.1901032009321.93285872716262
121793772.43608950129611.8706090170458801.693301481659-20.5639104987043
1229781054.8965564328498.734913245717802.36853032144476.8965564328388
123775745.5388418664551.41739897231516803.04375916123-29.4611581335450
124797788.2618810289772.56813743939417803.16998153163-8.73811897102337
125946971.16681033245117.536985765522803.29620390202925.1668103324492
126594573.896123236446-189.037545181598803.141421945151-20.1038767635539
127438376.898006654993-303.884646643267802.986639988274-61.101993345007
12810221121.93158828327119.368551168376802.69986054835799.9315882832665
129868845.14712674161488.439792149946802.41308110844-22.8528732583864
130795775.10389557218912.8198572721422802.076247155669-19.8961044278109
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293536647wk96eyg0240lxqq/1ju6f1293536624.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293536647wk96eyg0240lxqq/1ju6f1293536624.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293536647wk96eyg0240lxqq/2c3ni1293536624.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293536647wk96eyg0240lxqq/2c3ni1293536624.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293536647wk96eyg0240lxqq/3c3ni1293536624.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293536647wk96eyg0240lxqq/3c3ni1293536624.ps (open in new window)


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