Home » date » 2010 » Dec » 07 »

*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, 07 Dec 2010 18:13:04 +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/07/t1291746668p1rh6sca9wxugcb.htm/, Retrieved Tue, 07 Dec 2010 19:31:08 +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/07/t1291746668p1rh6sca9wxugcb.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 «
103,48 103,93 103,89 104,4 104,79 104,77 105,13 105,26 104,96 104,75 105,01 105,15 105,2 105,77 105,78 106,26 106,13 106,12 106,57 106,44 106,54 107,1 108,1 108,4 108,84 109,62 110,42 110,67 111,66 112,28 112,87 112,18 112,36 112,16 111,49 111,25 111,36 111,74 111,1 111,33 111,25 111,04 110,97 111,31 111,02 111,07 111,36 111,54 112,05 112,52 112,94 113,33 113,78 113,77 113,82 113,89 114,25 114,41
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1103.48103.523732869337-0.375604568322368103.8118716989850.0437328693372763
2103.93103.911271597193-0.0121135084173189103.960841911224-0.0187284028066017
3103.89103.738810391563-0.068622515025883104.109812123463-0.151189608436852
4104.4104.3922408544180.149998994485012104.257760151097-0.00775914558175828
5104.79104.8536712189490.320620602320715104.4057081787310.063671218948528
6104.77104.7441106595480.242716182188632104.553173158264-0.025889340452224
7105.13105.1925501493090.366811712894177104.7006381377960.062550149309402
8105.26105.5309576371870.139845291933964104.8491970708790.270957637186612
9104.96104.943364890820-0.0211208947821083104.997756003962-0.0166351091803278
10104.75104.505925989120-0.146060777663887105.140134788544-0.244074010879757
11105.01104.976947984936-0.239461558060768105.282513573125-0.0330520150640865
12105.15105.252942082198-0.357009023908446105.404066941710.102942082198368
13105.2105.249984258027-0.375604568322368105.5256203102950.0499842580270666
14105.77105.902234436783-0.0121135084173189105.6498790716340.132234436783321
15105.78105.854484682053-0.068622515025883105.7741378329730.0744846820532103
16106.26106.4200680363110.149998994485012105.9499329692040.160068036310648
17106.13105.8136512922430.320620602320715106.125728105436-0.316348707756731
18106.12105.6179692735630.242716182188632106.379314544248-0.502030726436729
19106.57106.1402873040460.366811712894177106.632900983060-0.429712695954365
20106.44105.7699544117820.139845291933964106.970200296284-0.670045588218031
21106.54105.793621285274-0.0211208947821083107.307499609508-0.746378714725822
22107.1106.615582287138-0.146060777663887107.730478490526-0.484417712861998
23108.1108.286004186517-0.239461558060768108.1534573715440.186004186516953
24108.4108.505835096274-0.357009023908446108.6511739276350.105835096273680
25108.84108.906714084597-0.375604568322368109.1488904837260.0667140845966401
26109.62109.606139601765-0.0121135084173189109.645973906652-0.0138603982350674
27110.42110.765565185447-0.068622515025883110.1430573295790.345565185446844
28110.67110.6432219461200.149998994485012110.546779059395-0.0267780538798092
29111.66112.0488786084690.320620602320715110.9505007892110.388878608468744
30112.28113.0993760244040.242716182188632111.2179077934070.81937602440425
31112.87113.8878734895020.366811712894177111.4853147976041.01787348950212
32112.18112.5947749144200.139845291933964111.6253797936460.414774914419709
33112.36112.975676105093-0.0211208947821083111.7654447896890.615676105093158
34112.16112.689063714160-0.146060777663887111.7769970635040.529063714159506
35111.49111.430912220741-0.239461558060768111.788549337320-0.0590877792590305
36111.25111.158799585663-0.357009023908446111.698209438246-0.0912004143371945
37111.36111.487735029151-0.375604568322368111.6078695391710.127735029150884
38111.74111.99946095839-0.0121135084173189111.4926525500270.259460958390036
39111.1110.891186954143-0.068622515025883111.377435560883-0.208813045857184
40111.33111.2045540625880.149998994485012111.305446942927-0.125445937411968
41111.25110.9459210727080.320620602320715111.233458324971-0.304078927291556
42111.04110.5976642398020.242716182188632111.239619578009-0.442335760197921
43110.97110.3274074560580.366811712894177111.245780831048-0.642592543941944
44111.31111.1401538339160.139845291933964111.340000874150-0.169846166083730
45111.02110.626899977530-0.0211208947821083111.434220917252-0.393100022469653
46111.07110.670551134806-0.146060777663887111.615509642858-0.399448865194259
47111.36111.162663189596-0.239461558060768111.796798368465-0.197336810403755
48111.54111.408791089853-0.357009023908446112.028217934056-0.131208910147393
49112.05112.215967068675-0.375604568322368112.2596374996470.165967068675187
50112.52112.547745119873-0.0121135084173189112.5043683885440.0277451198728187
51112.94113.199523237584-0.068622515025883112.7490992774420.259523237584077
52113.33113.5105824127790.149998994485012112.9994185927360.180582412778563
53113.78113.9896414896480.320620602320715113.2497379080310.209641489648249
54113.77113.7978942158010.242716182188632113.499389602010.0278942158014104
55113.82113.5241469911170.366811712894177113.749041295989-0.295853008883057
56113.89113.6448937249670.139845291933964113.995260983099-0.245106275033166
57114.25114.279640224573-0.0211208947821083114.2414806702100.0296402245726028
58114.41114.480661857019-0.146060777663887114.4853989206450.0706618570193172
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291746668p1rh6sca9wxugcb/165bi1291745580.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291746668p1rh6sca9wxugcb/165bi1291745580.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/07/t1291746668p1rh6sca9wxugcb/2hxt41291745580.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291746668p1rh6sca9wxugcb/2hxt41291745580.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/07/t1291746668p1rh6sca9wxugcb/3hxt41291745580.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t1291746668p1rh6sca9wxugcb/3hxt41291745580.ps (open in new window)


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