Home » date » 2009 » Dec » 01 »

*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, 01 Dec 2009 12:02:13 -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/01/t1259694170k35jsggljepyfhx.htm/, Retrieved Tue, 01 Dec 2009 20:02:55 +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/01/t1259694170k35jsggljepyfhx.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 «
8.9 8.8 8.3 7.5 7.2 7.4 8.8 9.3 9.3 8.7 8.2 8.3 8.5 8.6 8.5 8.2 8.1 7.9 8.6 8.7 8.7 8.5 8.4 8.5 8.7 8.7 8.6 8.5 8.3 8 8.2 8.1 8.1 8 7.9 7.9 8 8 7.9 8 7.7 7.2 7.5 7.3 7 7 7 7.2 7.3 7.1 6.8 6.4 6.1 6.5 7.7 7.9 7.5 6.9 6.6 6.9
 
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
Seasonal601061
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
18.99.291549742913050.2776994921795928.230750764907360.391549742913053
28.89.089718213484080.2541512220828018.256130564433120.289718213484079
38.38.267886618704250.05060301733686168.28151036395889-0.0321133812957477
47.56.92573165366038-0.2305885732286518.30485691956827-0.574268346339617
57.26.52357689773922-0.4517803729168718.32820347517765-0.676423102260777
67.46.9702702816967-0.5150780934000018.3448078117033-0.429729718303296
78.88.976963835566430.2616240162046258.361412148228950.176963835566429
89.39.841879657567570.3803755449994138.377744797433020.541879657567566
99.39.946795192024960.259127361337958.39407744663710.646795192024957
108.78.99277138911287-0.02448563503179158.431714245918910.292771389112875
118.28.13874767769199-0.2080987228927248.46935104520074-0.061252322308011
128.38.17447705829103-0.05354931487311968.4790722565821-0.125522941708972
138.58.233507039856960.2776994921795928.48879346796345-0.266492960143042
148.68.481606366375420.2541512220828018.46424241154178-0.118393633624576
158.58.509705627543040.05060301733686168.43969135512010.0097056275430365
168.28.20259965482347-0.2305885732286518.427988918405180.00259965482346658
178.18.2354938912266-0.4517803729168718.416286481690270.135493891226604
187.97.88772644644879-0.5150780934000018.42735164695122-0.0122735535512142
198.68.49995917158320.2616240162046258.43841681221217-0.100040828416791
208.78.568365559012580.3803755449994138.451258895988-0.131634440987416
218.78.676771658898210.259127361337958.46410097976384-0.0232283411017882
228.58.54611978647466-0.02448563503179158.478365848557130.046119786474657
238.48.5154680055423-0.2080987228927248.492630717350430.115468005542295
248.58.55927164234125-0.05354931487311968.494277672531870.0592716423412476
258.78.62637588010710.2776994921795928.49592462771331-0.073624119892905
268.78.680610648452850.2541512220828018.46523812946435-0.0193893515471473
278.68.714845351447760.05060301733686168.434551631215380.114845351447761
288.58.84694641174865-0.2305885732286518.383642161480.346946411748652
298.38.71904768117225-0.4517803729168718.332732691744620.419047681172252
3088.24055510062516-0.5150780934000018.274522992774840.240555100625164
318.27.922062689990320.2616240162046258.21631329380505-0.27793731000968
328.17.666588263664710.3803755449994138.15303619133587-0.433411736335285
338.17.851113549795360.259127361337958.08975908886669-0.248886450204641
3487.98801952888247-0.02448563503179158.03646610614932-0.0119804711175266
357.98.02492559946078-0.2080987228927247.983173123431940.124925599460781
367.97.9148533268741-0.05354931487311967.938695987999030.0148533268740927
3787.82808165525430.2776994921795927.89421885256611-0.171918344745703
3887.913555521335880.2541512220828017.83229325658132-0.0864444786641192
397.97.979029322066610.05060301733686167.770367660596530.0790293220666118
4088.5422291721221-0.2305885732286517.688359401106540.542229172122109
417.78.24542923130031-0.4517803729168717.606351141616560.545429231300314
427.27.38978294275009-0.5150780934000017.525295150649910.189782942750091
437.57.294136824112110.2616240162046257.44423915968326-0.205863175887886
447.36.865130673206040.3803755449994137.35449378179454-0.434869326793955
4576.476124234756230.259127361337957.26474840390582-0.523875765243774
4676.85860962610331-0.02448563503179157.16587600892848-0.141390373896693
4777.14109510894158-0.2080987228927247.067003613951150.141095108941579
487.27.43666062040507-0.05354931487311967.016888694468050.236660620405075
497.37.355526732835460.2776994921795926.966773774984950.055526732835462
507.16.970732927509570.2541512220828016.97511585040763-0.129267072490427
516.86.565939056832830.05060301733686166.9834579258303-0.234060943167167
526.46.03675621753166-0.2305885732286516.993832355697-0.363243782468343
536.15.64757358735319-0.4517803729168717.00420678556369-0.452426412646814
546.56.50736597685811-0.5150780934000017.007712116541890.00736597685811091
557.78.127158536275280.2616240162046257.01121744752010.427158536275280
567.98.400279652012810.3803755449994137.019344802987780.500279652012813
577.57.71340048020660.259127361337957.027472158455450.213400480206595
586.96.78617587222111-0.02448563503179157.03830976281068-0.113824127778891
596.66.35895135572681-0.2080987228927247.04914736716591-0.241048644273187
606.96.79387967953191-0.05354931487311967.05966963534121-0.106120320468092
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259694170k35jsggljepyfhx/17s6z1259694131.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259694170k35jsggljepyfhx/17s6z1259694131.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259694170k35jsggljepyfhx/21x041259694131.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259694170k35jsggljepyfhx/21x041259694131.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259694170k35jsggljepyfhx/3jwmd1259694131.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259694170k35jsggljepyfhx/3jwmd1259694131.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259694170k35jsggljepyfhx/46sd91259694131.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259694170k35jsggljepyfhx/46sd91259694131.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