Home » date » 2010 » Dec » 27 »

Decomposition by Loess

*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: Mon, 27 Dec 2010 10:08:53 +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/27/t1293444477poyxw4z5klufoxf.htm/, Retrieved Mon, 27 Dec 2010 11:07:57 +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/27/t1293444477poyxw4z5klufoxf.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:
Prijsverandering in Nederland
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
13.7 13.7 13.7 1.3 1.3 1.3 -7.4 -7.4 -7.4 -12.9 -12.9 -12.9 -9.6 -9.6 -9.6 -11.1 -11.1 -11.1 -8.3 -8.3 -8.3 -2.7 -2.7 -2.7 5.1 5.1 5.1 4.6 4.6 4.6 5.6 5.6 5.6 5.1 5.1 5.1 0.8 0.8 0.8 6 6 6 9.3 9.3 9.3 8.7 8.7 8.7 11 11 11 8.5 8.5 8.5 4.4 4.4 4.4 2.5 2.5 2.5 0.3 0.3 0.3 -3 -3 -3
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
113.714.72092272803321.1282220096532211.55085526231361.02092272803322
213.716.65848389979141.494487276014649.247028824193952.95848389979142
313.718.59604507154961.860752542376056.943202386074344.89604507154961
41.3-1.80151201154961-0.3379173587738684.73942937032348-3.10151201154961
51.30.100937279273388-0.03659363384601162.53565635457262-1.19906272072661
61.31.935364444508730.2446691199034560.4199664355878090.635364444508735
7-7.4-12.1697616104482-0.934514906154846-1.69572348339701-4.76976161044815
8-7.4-10.3189972450477-0.719927902661002-3.76107485229134-2.91899724504766
9-7.4-8.46823287964717-0.505340899167158-5.82642622118568-1.06823287964717
10-12.9-17.5288623704331-0.885075930956122-7.38606169861081-4.62886237043307
11-12.9-16.1694900117557-0.684812812208324-8.94569717603595-3.26949001175572
12-12.9-15.5620517367793-0.62394690744708-9.61400135577358-2.66205173677934
13-9.6-10.0459164741421.12822200965322-10.2823055355112-0.445916474142008
14-9.6-10.36777679644211.49448727601464-10.3267104795725-0.767776796442098
15-9.6-10.68963711874221.86075254237605-10.3711154236339-1.08963711874219
16-11.1-12.0115192658895-0.337917358773868-9.85056337533665-0.911519265889481
17-11.1-12.8333950391146-0.0365936338460116-9.33001132703943-1.73339503911455
18-11.1-14.06930054548850.244669119903456-8.37536857441491-2.96930054548855
19-8.3-8.24475927205477-0.934514906154846-7.420725821790390.0552407279452307
20-8.3-9.69230975802217-0.719927902661002-6.18776233931683-1.39230975802217
21-8.3-11.1398602439896-0.505340899167158-4.95479885684328-2.83986024398956
22-2.7-0.922082560519593-0.885075930956122-3.592841508524291.77791743948041
23-2.7-2.48430302758638-0.684812812208324-2.230884160205290.215696972413618
24-2.7-3.85601930000428-0.62394690744708-0.920033792548643-1.15601930000428
255.18.680961415238771.128222009653220.3908165751080083.58096141523877
265.17.202519436780961.494487276014641.502993287204402.10251943678097
275.15.724077458323161.860752542376052.615169999300790.624077458323158
284.66.12936859991178-0.3379173587738683.408548758862081.52936859991178
294.65.03466611542264-0.03659363384601164.201927518423380.434666115422636
304.64.442171551670730.2446691199034564.51315932842581-0.15782844832927
315.67.3101237677266-0.9345149061548464.824391138428251.71012376772659
325.67.22918320441601-0.7199279026610024.690744698244991.62918320441601
335.67.14824264110543-0.5053408991671584.557098258061731.54824264110543
345.16.69621964667233-0.8850759309561224.388856284283791.59621964667233
355.16.66419850170247-0.6848128122083244.220614310505861.56419850170247
365.16.56777277356656-0.623946907447084.256174133880521.46777277356656
370.8-3.819955966908391.128222009653224.29173395725517-4.61995596690839
380.8-4.436970496495571.494487276014644.54248322048093-5.23697049649557
390.8-5.053985026082741.860752542376054.79323248370669-5.85398502608274
4067.10094706268672-0.3379173587738685.236970296087151.10094706268672
4166.3558855253784-0.03659363384601165.680708108467610.355885525378399
4265.424937275498770.2446691199034566.33039360459777-0.575062724501228
439.312.5544358054269-0.9345149061548466.980079100727933.25443580542692
449.311.6482243382954-0.7199279026610027.671703564365622.34822433829538
459.310.7420128711638-0.5053408991671588.363328028003321.44201287116384
468.79.54013651823849-0.8850759309561228.744939412717630.840136518238486
478.78.95826201477637-0.6848128122083249.126550797431960.258262014776369
488.78.91709433064987-0.623946907447089.10685257679720.217094330649875
491111.78462363418431.128222009653229.087154356162460.784623634184324
501111.74100164616311.494487276014648.764511077822270.741001646163097
511111.69737965814191.860752542376058.441867799482080.69737965814187
528.59.3929269772858-0.3379173587738687.944990381488060.892926977285808
538.59.58848067035197-0.03659363384601167.448112963494041.08848067035197
548.59.974275969258320.2446691199034566.781054910838221.47427596925832
554.43.62051804797245-0.9345149061548466.1139968581824-0.77948195202755
564.44.26337309093207-0.7199279026610025.25655481172893-0.13662690906793
574.44.90622813389169-0.5053408991671584.399112765275470.506228133891689
582.52.44222238117224-0.8850759309561223.44285354978388-0.0577776188277621
592.53.19821847791603-0.6848128122083242.48659433429230.698218477916027
602.54.06918125853217-0.623946907447081.554765648914911.56918125853217
610.3-1.151158973190741.128222009653220.622936963537516-1.45115897319074
620.3-0.579307418201121.49448727601464-0.315179857813516-0.87930741820112
630.3-0.007455863211504541.86075254237605-1.25329667916455-0.307455863211505
64-3-3.46478992474197-0.337917358773868-2.19729271648416-0.464789924741968
65-3-2.82211761235021-0.0365936338460116-3.141288753803780.177882387649792
66-3-2.159772567746780.244669119903456-4.084896552156680.840227432253221
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293444477poyxw4z5klufoxf/1vj5g1293444529.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293444477poyxw4z5klufoxf/1vj5g1293444529.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293444477poyxw4z5klufoxf/2vj5g1293444529.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293444477poyxw4z5klufoxf/2vj5g1293444529.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293444477poyxw4z5klufoxf/36a4j1293444529.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293444477poyxw4z5klufoxf/36a4j1293444529.ps (open in new window)


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