Home » date » 2009 » Dec » 09 »

*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, 09 Dec 2009 09:12:31 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/09/t1260375197zjjo36di74mxc9k.htm/, Retrieved Wed, 09 Dec 2009 17:13:22 +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/2009/Dec/09/t1260375197zjjo36di74mxc9k.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
153.4 145 137.7 148.3 152.2 169.4 168.6 161.1 174.1 179 190.6 190 181.6 174.8 180.5 196.8 193.8 197 216.3 221.4 217.9 229.7 227.4 204.2 196.6 198.8 207.5 190.7 201.6 210.5 223.5 223.8 231.2 244 234.7 250.2 265.7 287.6 283.3 295.4 312.3 333.8 347.7 383.2 407.1 413.6 362.7 321.9 239.4 191 159.7 163.4 157.6 166.2 176.7 198.3 226.2 216.2 235.9 226.9
 
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'Gwilym Jenkins' @ 72.249.127.135


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1153.4155.548329402848-13.0543605572819164.3060311544342.14832940284754
2145146.936965508469-21.5224563469274164.5854908384581.93696550846897
3137.7138.325606463122-27.790556985604164.8649505224820.625606463121585
4148.3155.479078402935-24.3585721701985165.4794937672647.17907840293464
5152.2159.832540762309-21.5265777743547166.0940370120457.63254076230919
6169.4181.774763528673-10.1322363399386167.15747281126612.3747635286729
7168.6168.4169799037240.562111485790318168.220908610486-0.183020096276124
8161.1140.20491266821912.3832245286684169.611862803112-20.8950873317806
9174.1150.25285322253426.9443297817278171.002816995739-23.8471467774663
10179151.20938776394433.2346056599951173.556006576061-27.7906122360559
11190.6177.00594694262228.0848569009950176.109196156383-13.5940530573782
12190182.24589043256317.1756873877285180.578422179708-7.75410956743684
13181.6191.206712354248-13.0543605572819185.0476482030339.6067123542484
14174.8181.255086310147-21.5224563469274189.867370036786.45508631014746
15180.5194.103465115078-27.790556985604194.68709187052613.6034651150777
16196.8219.716908453086-24.3585721701985198.24166371711322.9169084530860
17193.8207.330342210656-21.5265777743547201.79623556369913.5303422106559
18197200.816244624436-10.1322363399386203.3159917155033.81624462443602
19216.3227.2021406469030.562111485790318204.83574786730610.9021406469035
20221.4224.84663128154812.3832245286684205.5701441897843.44663128154772
21217.9202.55112970601126.9443297817278206.304540512261-15.3488702939893
22229.7219.1031032963833.2346056599951207.062291043625-10.5968967036199
23227.4218.89510152401728.0848569009950207.820041574988-8.50489847598314
24204.2182.27145949073217.1756873877285208.952853121539-21.9285405092678
25196.6196.168695889191-13.0543605572819210.085664668090-0.431304110808554
26198.8207.727670463196-21.5224563469274211.3947858837318.9276704631959
27207.5230.086649886232-27.790556985604212.70390709937222.5866498862315
28190.7191.680642836993-24.3585721701985214.0779293332050.980642836993127
29201.6209.274626207316-21.5265777743547215.4519515670387.6746262073163
30210.5213.106068086547-10.1322363399386218.0261682533912.60606808654737
31223.5225.8375035744660.562111485790318220.6003849397442.33750357446567
32223.8209.24644172732512.3832245286684225.970333744007-14.5535582726755
33231.2204.11538767000226.9443297817278231.340282548270-27.0846123299979
34244214.95363246112733.2346056599951239.811761878878-29.0463675388733
35234.7193.03190188951928.0848569009950248.283241209486-41.6680981104814
36250.2223.70228050829817.1756873877285259.522032103973-26.4977194917015
37265.7273.693537558822-13.0543605572819270.7608229984607.99353755882225
38287.6312.393633807136-21.5224563469274284.32882253979224.7936338071357
39283.3296.493734904480-27.790556985604297.89682208112413.1937349044803
40295.4304.664209817754-24.3585721701985310.4943623524449.2642098177543
41312.3323.03467515059-21.5265777743547323.09190262376510.7346751505899
42333.8349.319430071098-10.1322363399386328.4128062688415.5194300710984
43347.7361.1041786002940.562111485790318333.73370991391613.4041786002942
44383.2425.15125460667012.3832245286684328.86552086466241.9512546066696
45407.1463.25833840286426.9443297817278323.99733181540856.158338402864
46413.6482.02338687435733.2346056599951311.94200746564868.4233868743565
47362.7397.42845998311728.0848569009950299.88668311588934.7284599831165
48321.9342.69962442980917.1756873877285283.92468818246320.7996244298089
49239.4223.891667308245-13.0543605572819267.962693249037-15.5083326917546
50191152.316490143536-21.5224563469274251.205966203391-38.6835098564640
51159.7112.741317827858-27.790556985604234.449239157746-46.9586821721421
52163.4125.589786639445-24.3585721701985225.568785530754-37.8102133605554
53157.6120.038245870593-21.5265777743547216.688331903762-37.5617541294072
54166.2133.590879041810-10.1322363399386208.941357298128-32.6091209581895
55176.7151.6435058217150.562111485790318201.194382692494-25.0564941782847
56198.3189.79635206880212.3832245286684194.420423402529-8.50364793119789
57226.2237.80920610570826.9443297817278187.64646411256511.6092061057076
58216.2217.07916860251933.2346056599951182.0862257374860.879168602519144
59235.9267.18915573659828.0848569009950176.52598736240731.2891557365981
60226.9264.73337904616517.1756873877285171.89093356610737.833379046165
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260375197zjjo36di74mxc9k/1jcv51260375149.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260375197zjjo36di74mxc9k/1jcv51260375149.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260375197zjjo36di74mxc9k/251gg1260375149.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260375197zjjo36di74mxc9k/251gg1260375149.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260375197zjjo36di74mxc9k/3kg9j1260375149.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260375197zjjo36di74mxc9k/3kg9j1260375149.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260375197zjjo36di74mxc9k/40c5k1260375149.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260375197zjjo36di74mxc9k/40c5k1260375149.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