Home » date » 2009 » Dec » 03 »

*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, 03 Dec 2009 10:47:18 -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/03/t1259862470cu7dubuj7eal3k4.htm/, Retrieved Thu, 03 Dec 2009 18:47:56 +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/03/t1259862470cu7dubuj7eal3k4.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 «
115.47 103.34 102.60 100.69 105.67 123.61 113.08 106.46 123.38 109.87 95.74 123.06 123.39 120.28 115.33 110.4 114.49 132.03 123.16 118.82 128.32 112.24 104.53 132.57 122.52 131.8 124.55 120.96 122.6 145.52 118.57 134.25 136.7 121.37 111.63 134.42 137.65 137.86 119.77 130.69 128.28 147.45 128.42 136.9 143.95 135.64 122.48 136.83 153.04 142.71 123.46 144.37 146.15 147.61 158.51 147.4 165.05 154.64 126.2 157.36 154.15 123.21 113.07 110.45 113.57 122.44 114.93 111.85 126.04 121.34
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1115.47115.8652047763298.77837645620511106.2964187674660.395204776328768
2103.3498.93800649061690.695655618115951107.046337891267-4.40199350938315
3102.6107.024159366695-9.62041638176302107.7962570150684.42415936669472
4100.6999.5119544325065-6.69645338462163108.564498952115-1.17804556749346
5105.67106.709755554822-4.7024964439838109.3327408891621.03975555482194
6123.61127.1161434821419.96121327017837110.1426432476803.50614348214113
7113.08115.564206387636-0.356751993834973110.9525456061992.48420638763585
8106.46101.397150898454-0.275219629083338111.798068730630-5.06284910154628
9123.38122.85177469165611.2646334532842112.643591855060-0.528225308344275
10109.87106.0352893184520.219200839935199113.485509841613-3.83471068154770
1195.7494.1065937823406-16.9540216105055114.327427828165-1.63340621765943
12123.06123.1883577961867.68628442490115115.2453577789130.128357796185682
13123.39121.8383358141348.77837645620511116.163287729661-1.55166418586649
14120.28122.8855248015680.695655618115951116.9788195803172.60552480156753
15115.33122.486064950791-9.62041638176302117.7943514309727.15606495079136
16110.4109.143428308907-6.69645338462163118.353025075715-1.256571691093
17114.49114.770797723526-4.7024964439838118.9116987204580.280797723526177
18132.03134.8427581029549.96121327017837119.2560286268682.81275810295401
19123.16127.076393460557-0.356751993834973119.6003585332783.91639346055734
20118.82117.810505555572-0.275219629083338120.104714073511-1.00949444442813
21128.32124.76629693297111.2646334532842120.609069613745-3.55370306702947
22112.24102.9093403365160.219200839935199121.351458823549-9.33065966348427
23104.53103.920173577153-16.9540216105055122.093848033353-0.609826422847334
24132.57134.5056570462087.68628442490115122.9480585288911.93565704620785
25122.52112.4593545193668.77837645620511123.802269024429-10.0606454806342
26131.8138.2486259519440.695655618115951124.6557184299406.4486259519444
27124.55133.211248546313-9.62041638176302125.5091678354508.66124854631278
28120.96122.392468372239-6.69645338462163126.2239850123821.43246837223940
29122.6122.963694254670-4.7024964439838126.9388021893140.363694254669554
30145.52153.7224743091789.96121327017837127.3563124206438.20247430917834
31118.57109.722929341863-0.356751993834973127.773822651972-8.84707065813735
32134.25140.700486794112-0.275219629083338128.0747328349726.45048679411181
33136.7133.75972352874511.2646334532842128.375643017971-2.94027647125489
34121.37113.7706035965850.219200839935199128.75019556348-7.59939640341516
35111.63111.089273501516-16.9540216105055129.124748108989-0.540726498483764
36134.42131.4605154496347.68628442490115129.693200125465-2.95948455036601
37137.65136.2599714018558.77837645620511130.261652141940-1.39002859814551
38137.86144.0644789925120.695655618115951130.9598653893726.20447899251224
39119.77117.502337744960-9.62041638176302131.658078636803-2.26766225504022
40130.69135.670606075667-6.69645338462163132.4058473089554.98060607566663
41128.28128.108880462877-4.7024964439838133.153615981107-0.171119537122991
42147.45151.1293259935229.96121327017837133.8094607362993.67932599352216
43128.42122.731446502343-0.356751993834973134.465305491492-5.68855349765718
44136.9139.020072639487-0.275219629083338135.0551469895962.12007263948735
45143.95140.99037805901611.2646334532842135.644988487700-2.95962194098402
46135.64134.5683314456390.219200839935199136.492467714426-1.07166855436088
47122.48124.574074669354-16.9540216105055137.3399469411512.09407466935403
48136.83127.4306153243457.68628442490115138.543100250754-9.3993846756554
49153.04157.5553699834388.77837645620511139.7462535603574.51536998343784
50142.71143.4900940140330.695655618115951141.2342503678510.78009401403321
51123.46113.818169206418-9.62041638176302142.722247175345-9.64183079358168
52144.37151.335215545063-6.69645338462163144.1012378395596.96521554506273
53146.15151.522267940211-4.7024964439838145.4802285037735.37226794021069
54147.61139.0029670439369.96121327017837146.255819685886-8.60703295606422
55158.51170.345341125836-0.356751993834973147.03141086799911.8353411258364
56147.4148.664611236464-0.275219629083338146.4106083926201.26461123646365
57165.05173.04556062947511.2646334532842145.7898059172417.99556062947508
58154.64165.3640412500330.219200839935199143.69675791003210.7240412500329
59126.2127.750311707683-16.9540216105055141.6037099028231.55031170768251
60157.36168.529191406457.68628442490115138.50452416864911.1691914064501
61154.15164.1162851093208.77837645620511135.4053384344749.9662851093204
62123.21113.5110799062040.695655618115951132.213264475680-9.69892009379636
63113.07106.739225864877-9.62041638176302129.021190516886-6.3307741351233
64110.45101.596308940922-6.69645338462163126.0001444437-8.85369105907829
65113.57108.863398073470-4.7024964439838122.979098370514-4.70660192652971
66122.44114.9730111533589.96121327017837119.945775576464-7.46698884664235
67114.93113.304299211421-0.356751993834973116.912452782414-1.62570078857946
68111.85110.011077567541-0.275219629083338113.964142061543-1.83892243245919
69126.04129.79953520604511.2646334532842111.0158313406713.75953520604524
70121.34134.2711283091540.219200839935199108.18967085091112.9311283091541
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259862470cu7dubuj7eal3k4/1habg1259862436.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259862470cu7dubuj7eal3k4/1habg1259862436.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259862470cu7dubuj7eal3k4/2u6uc1259862436.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259862470cu7dubuj7eal3k4/2u6uc1259862436.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259862470cu7dubuj7eal3k4/3iuvv1259862436.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259862470cu7dubuj7eal3k4/3iuvv1259862436.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259862470cu7dubuj7eal3k4/4mo5v1259862436.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259862470cu7dubuj7eal3k4/4mo5v1259862436.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = periodic ; par3 = 1 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ;
 
Parameters (R input):
par1 = 12 ; par2 = periodic ; par3 = 1 ; 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