Home » date » 2009 » Dec » 04 »

*Unverified author*
R Software Module: /rwasp_decomposeloess.wasp (opens new window with default values)
Title produced by software: Decomposition by Loess
Date of computation: Fri, 04 Dec 2009 10:40:41 -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/04/t1259948535s1fz2rx5hybb1xj.htm/, Retrieved Fri, 04 Dec 2009 18:42:21 +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/04/t1259948535s1fz2rx5hybb1xj.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 «
95.5 76.7 79.4 55.2 60 64.8 82.3 210.5 106 80.8 97.3 189.5 90 69.3 87.3 57.4 56.2 61.6 77.7 177.2 97.6 81.6 96.8 191.3 106 75.1 72 63.5 57.4 62.3 79.4 178.1 109.3 85.2 102.7 193.7 108.4 73.4 85.9 58.5 58.6 62.7 77.5 180.5 102.2 82.6 97.8 197.8 93.8 72.4 77.7 58.7 53.1 64.3 76.4 188.4 105.5 79.8 96.1 202.5
 
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
195.591.06500488884390.63526419219435999.2997309189617-4.43499511115608
276.778.5864713421847-24.631368183869599.44489684168481.88647134218468
379.476.6679318616705-17.457994626078499.590062764408-2.73206813832951
455.249.9983840867836-39.217869416011599.619485329228-5.20161591321636
56061.1288394226003-40.777747316648199.64890789404791.12883942260025
664.864.7657421336396-34.755243660461799.5895015268221-0.034257866360349
782.384.3626424136274-19.292737573223799.53009515959632.06264241362737
8210.5232.58829248384188.919480363159899.492227152999522.0882924838407
9106106.5139216679226.0317191856753799.45435914640260.513921667921991
1080.878.4518303221718-16.144898719671199.2930683974993-2.34816967782822
1197.395.5297413551913-0.061519003787269999.131777648596-1.77025864480871
12189.5183.74781796391396.75291479970898.4992672363794-5.75218203608739
139081.49797898364280.63526419219435997.8667568241629-8.50202101635722
1469.366.237904852841-24.631368183869596.9934633310285-3.06209514715897
1587.395.9378247881843-17.457994626078496.1201698378948.6378247881843
1657.458.2250786431168-39.217869416011595.79279077289470.825078643116825
1756.257.7123356087528-40.777747316648195.46541170789531.51233560875281
1861.662.2891918988192-34.755243660461795.66605176164250.689191898819246
1977.778.826045757834-19.292737573223795.86669181538971.12604575783402
20177.2169.44630174743888.919480363159896.0342178894019-7.75369825256168
2197.692.96653685091066.0317191856753796.201743963414-4.63346314908944
2281.683.0604376484498-16.144898719671196.28446107122131.46043764844981
2396.897.2943408247588-0.061519003787269996.36717817902850.494340824758808
24191.3189.24409076986296.75291479970896.6029944304299-2.05590923013784
25106114.5259251259740.63526419219435996.83881068183138.52592512597435
2675.177.6760869372284-24.631368183869597.1552812466412.57608693722840
277263.9862428146275-17.457994626078497.4717518114509-8.01375718537248
2863.568.4485551138434-39.217869416011597.76931430216824.94855511384336
2957.457.5108705237627-40.777747316648198.06687679288540.110870523762685
3062.361.0085139968748-34.755243660461798.346729663587-1.29148600312524
3179.479.4661550389352-19.292737573223798.62658253428850.0661550389351788
32178.1168.34823416314888.919480363159898.9322854736918-9.75176583685163
33109.3113.3302924012296.0317191856753799.23798841309524.03029240122947
3485.287.0358382818304-16.144898719671199.50906043784071.83583828183038
35102.7105.681386541201-0.061519003787269999.78013246258632.98138654120102
36193.7190.81245291192296.75291479970899.8346322883704-2.88754708807838
37108.4116.2756036936510.63526419219435999.88913211415457.87560369365114
3873.471.7463179541934-24.631368183869599.685050229676-1.65368204580659
3985.989.7770262808807-17.457994626078499.48096834519773.87702628088073
4058.557.1277199111168-39.217869416011599.0901495048947-1.37228008888322
4158.659.2784166520563-40.777747316648198.69933066459180.678416652056342
4262.761.8529933859437-34.755243660461798.3022502745181-0.84700661405634
4377.576.3875676887793-19.292737573223797.9051698844444-1.1124323112207
44180.5174.55368779378388.919480363159897.5268318430577-5.94631220621751
45102.2101.2197870126546.0317191856753797.148493801671-0.98021298734642
4682.684.423596417403-16.144898719671196.92130230226821.82359641740291
4797.898.967408200922-0.061519003787269996.69411080286531.16740820092200
48197.8202.15477730705596.75291479970896.69230789323694.35477730705514
4993.890.27423082419710.63526419219435996.6905049836085-3.52576917580285
5072.472.6116600459814-24.631368183869596.81970813788810.211660045981361
5177.775.9090833339106-17.457994626078496.9489112921678-1.79091666608942
5258.759.4722157583038-39.217869416011597.14565365770770.772215758303844
5353.149.6353512934005-40.777747316648197.3423960232476-3.46464870659946
5464.365.7196018836136-34.755243660461797.63564177684811.41960188361362
5576.474.163850042775-19.292737573223797.9288875304486-2.23614995722494
56188.4189.6265835086688.919480363159898.25393612818011.22658350866008
57105.5106.3892960884136.0317191856753798.57898472591160.88929608841299
5879.876.815214093752-16.144898719671198.9296846259192-2.98478590624809
5996.192.9811344778606-0.061519003787269999.2803845259267-3.11886552213943
60202.5208.59388767142196.75291479970899.65319752887146.09388767142065
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948535s1fz2rx5hybb1xj/1c83i1259948439.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948535s1fz2rx5hybb1xj/1c83i1259948439.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948535s1fz2rx5hybb1xj/2egtd1259948439.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948535s1fz2rx5hybb1xj/2egtd1259948439.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948535s1fz2rx5hybb1xj/3gtrp1259948439.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948535s1fz2rx5hybb1xj/3gtrp1259948439.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948535s1fz2rx5hybb1xj/4byo61259948439.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259948535s1fz2rx5hybb1xj/4byo61259948439.ps (open in new window)


 
Parameters (Session):
par1 = FALSE ; par2 = -0.4 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
 
Parameters (R input):
par1 = 12 ; par2 = periodic ; par3 = 0 ; par5 = 1 ; par7 = 1 ; par8 = FALSE ; par9 = 1 ;
 
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