Home » date » 2010 » Dec » 26 »

*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: Sun, 26 Dec 2010 20:54:45 +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/26/t129339677033gntbcoe6eazao.htm/, Retrieved Sun, 26 Dec 2010 21:52: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/2010/Dec/26/t129339677033gntbcoe6eazao.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 «
6 6 8 4 8 10 9 12 9 11 11 11 11 11 9 8 6 7 8 6 5 2 3 3 7 8 7 7 6 6 7 5 5 5 4 4 4 1 -1 3 4 3 2 1 4 3 5 6 6 6 6 6 5 6 5 6 5 7 4 5 6 6 5 3 2 3 3 2 0 4 4 5 6 6 5 5 3 5 5 5 3 6 6 4 6 5 4 5 5 4 3 2 3 2 -1 0 -2 1 -2 -2 -2 -6 -4 -2 0 -5 -4 -5 -1 -2 -4 -1 1 1 -2 1 1 3 3 1 1 0 2 2 -1 1 0 1 1 3 2
 
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'Gwilym Jenkins' @ 72.249.127.135


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
165.32037739333250.7870331713943045.89258943527319-0.679622606667494
264.971591189342930.627215190211236.40119362044584-1.02840881065707
389.25916973161067-0.1689675372291586.909797805618481.25916973161067
440.679209855869273-0.05853362795969377.37932377209042-3.32079014413073
588.462887837853-0.3117375764153587.848849738562360.462887837852999
61011.7323731233649-0.01188719551879048.27951407215391.73237312336490
799.6382210634115-0.3483994691569338.710178405745430.638221063411505
81214.9278488578223-0.04842214777457549.12057328995232.92784885782227
998.7629296466815-0.2938978208406829.53096817415919-0.237070353318504
101112.07543811921090.1909989341484159.73356294664071.07543811921089
111112.2061289506423-0.1422866697645159.93615771912221.20612895064231
121112.4612008872695-0.2211149808948889.759914093625411.46120088726948
131111.62929636047710.7870331713943049.583670468128620.629296360477079
141112.18120737247960.627215190211239.191577437309141.18120737247963
1599.3694831307395-0.1689675372291588.799484406489670.369483130739491
1687.83818162519734-0.05853362795969378.22035200276235-0.161818374802660
1764.67051797738032-0.3117375764153587.64121959903504-1.32948202261968
1876.95367905017171-0.01188719551879047.05820814534708-0.0463209498282913
1989.87320277749781-0.3483994691569336.475196691659121.87320277749781
2065.9123655193109-0.04842214777457546.13605662846367-0.0876344806890952
2154.49698125557246-0.2938978208406825.79691656526822-0.503018744427536
222-1.872665465191590.1909989341484155.68166653104318-3.87266546519159
2330.57587017294638-0.1422866697645155.56641649681814-2.42412982705362
2430.658578748793659-0.2211149808948885.56253623210123-2.34142125120634
2577.654310861221370.7870331713943045.558655967384320.654310861221373
2689.741910558953150.627215190211235.630874250835621.74191055895315
2778.46587500294224-0.1689675372291585.703092534286921.46587500294224
2878.25809326485338-0.05853362795969375.800440363106321.25809326485338
2966.41394938448964-0.3117375764153585.897788191925720.41394938448964
3066.21860969585519-0.01188719551879045.79327749966360.218609695855195
3178.65963266175546-0.3483994691569335.688766807401471.65963266175546
3254.76250798747698-0.04842214777457545.2859141602976-0.237492012523020
3355.41083630764696-0.2938978208406824.883061513193720.410836307646964
3455.362632905749620.1909989341484154.446368160101960.362632905749623
3544.13261186275431-0.1422866697645154.009674807010200.132611862754310
3644.55521203934419-0.2211149808948883.665902941550700.555212039344192
3743.890835752514510.7870331713943043.32213107609119-0.109164247485491
381-1.700687528379470.627215190211233.07347233816824-2.70068752837947
39-1-4.65584606301614-0.1689675372291582.82481360024529-3.65584606301614
4033.30472629673109-0.05853362795969372.75380733122860.304726296731094
4145.62893651420345-0.3117375764153582.682801062211901.62893651420345
4233.15283437420992-0.01188719551879042.859052821308870.152834374209924
4321.31309488875110-0.3483994691569333.03530458040583-0.686905111248896
441-1.32677038601085-0.04842214777457543.37519253378542-2.32677038601085
4544.57881733367567-0.2938978208406823.715080487165010.57881733367567
4631.766604275015270.1909989341484154.04239679083631-1.23339572498473
4755.7725735752569-0.1422866697645154.369713094507610.772573575256904
4867.5778430607591-0.2211149808948884.643271920135791.57784306075909
4966.296136082841720.7870331713943044.916830745763980.29613608284172
5066.209644889565450.627215190211235.163139920223320.209644889565453
5166.7595184425465-0.1689675372291585.409449094682660.7595184425465
5266.53387606775289-0.05853362795969375.52465756020680.533876067752887
5354.6718715506844-0.3117375764153585.63986602573096-0.328128449315598
5466.37922525442707-0.01188719551879045.632661941091720.379225254427070
5554.72294161270445-0.3483994691569335.62545785645248-0.277058387295551
5666.48949103082872-0.04842214777457545.558931116945860.48949103082872
5754.80149344340145-0.2938978208406825.49240437743923-0.198506556598545
5878.475969593753590.1909989341484155.3330314720981.47596959375359
5942.96862810300775-0.1422866697645155.17365856675676-1.03137189699225
6055.28743801725568-0.2211149808948884.933676963639210.287438017255681
6166.519271468084050.7870331713943044.693695360521650.519271468084048
6266.981659893226330.627215190211234.391124916562440.98165989322633
6356.08041306462593-0.1689675372291584.088554472603231.08041306462593
6432.21441588640866-0.05853362795969373.84411774155104-0.785584113591345
6520.712056565916512-0.3117375764153583.59968101049885-1.28794343408349
6632.50362652219531-0.01188719551879043.50826067332348-0.496373477804689
6732.93155913300882-0.3483994691569333.41684033614811-0.0684408669911809
6820.58247061926342-0.04842214777457543.46595152851116-1.41752938073658
690-3.22116490003352-0.2938978208406823.5150627208742-3.22116490003352
7044.151286816008250.1909989341484153.657714249843330.151286816008254
7144.34192089095205-0.1422866697645153.800365778812460.34192089095205
7256.21733177139415-0.2211149808948884.003783209500741.21733177139415
7367.005766188416690.7870331713943044.2072006401891.00576618841669
7466.971930173480040.627215190211234.400854636308730.971930173480045
7555.57445890480071-0.1689675372291584.594508632428450.574458904800712
7655.33812989599521-0.05853362795969374.720403731964480.338129895995211
7731.46543874491484-0.3117375764153584.84629883150052-1.53456125508516
7855.15080063825786-0.01188719551879044.861086557260930.150800638257863
7955.4725251861356-0.3483994691569334.875874283021340.472525186135597
8055.19167169001523-0.04842214777457544.856750457759340.191671690015230
8131.45627118834333-0.2938978208406824.83762663249736-1.54372881165667
8266.975266279566590.1909989341484154.8337347862850.975266279566588
8367.31244372969188-0.1422866697645154.829842940072641.31244372969188
8443.43507239525282-0.2211149808948884.78604258564206-0.564927604747177
8566.47072459739420.7870331713943044.742242231211490.470724597394206
8654.783651538428480.627215190211234.5891332713603-0.216348461571524
8743.73294322572006-0.1689675372291584.4360243115091-0.267056774279941
8855.92073912685493-0.05853362795969374.137794501104760.920739126854934
8956.47217288571494-0.3117375764153583.839564690700421.47217288571494
9044.62261443137574-0.01188719551879043.389272764143050.622614431375742
9133.40941863157126-0.3483994691569332.938980837585680.409418631571257
9221.63800961297636-0.04842214777457542.41041253479822-0.361990387023642
9334.41205358882992-0.2938978208406821.881844232010761.41205358882992
9422.518378303456090.1909989341484151.290622762395500.518378303456086
95-1-2.55711462301572-0.1422866697645150.699401292780238-1.55711462301572
9600.139731634696662-0.2211149808948880.08138334619822570.139731634696662
97-2-4.250398571010520.787033171394304-0.536634600383787-2.25039857101052
9812.390331385498620.62721519021123-1.017546575709851.39033138549862
99-2-2.33257391173494-0.168967537229158-1.49845855103591-0.332573911734936
100-2-2.08503515215598-0.0585336279596937-1.85643121988432-0.0850351521559838
101-2-1.47385853485190-0.311737576415358-2.214403888732740.526141465148097
102-6-9.5282449279866-0.0118871955187904-2.45986787649461-3.5282449279866
103-4-4.94626866658659-0.348399469156933-2.70533186425648-0.946268666586587
104-2-1.10913900044847-0.0484221477745754-2.842438851776950.890860999551529
10503.27344366013811-0.293897820840682-2.979545839297433.27344366013811
106-5-7.294482596568390.190998934148415-2.89651633758002-2.29448259656839
107-4-5.04422649437286-0.142286669764515-2.81348683586262-1.04422649437286
108-5-7.2206826225404-0.221114980894888-2.55820239656472-2.22068262254040
109-1-0.4841152141274920.787033171394304-2.302917957266810.515884785872508
110-2-2.655792347888540.62721519021123-1.97142284232268-0.655792347888545
111-4-6.19110473539228-0.168967537229158-1.63992772737856-2.19110473539228
112-1-0.754141021805861-0.0585336279596937-1.187325350234450.245858978194139
11313.04646054950569-0.311737576415358-0.7347229730903332.04646054950569
11412.28944779257329-0.0118871955187904-0.2775605970545011.28944779257329
115-2-3.8312023098244-0.3483994691569330.179601778981332-1.8312023098244
11611.56937560537044-0.04842214777457540.479046542404140.569375605370436
11711.51540651501373-0.2938978208406820.7784913058269480.515406515013735
11834.878955496026020.1909989341484150.9300455698255641.87895549602602
11935.06068683594033-0.1422866697645151.081599833824182.06068683594033
12011.11183656491032-0.2211149808948881.109278415984570.111836564910319
12110.07600983046073870.7870331713943041.13695699814496-0.923990169539261
1220-1.76033663318180.627215190211231.13312144297057-1.7603366331818
12323.03968164943298-0.1689675372291581.129285887796181.03968164943298
12422.88683379696071-0.05853362795969371.171699830998980.886833796960713
125-1-2.90237619778642-0.3117375764153581.21411377420178-1.90237619778642
12610.752080378101334-0.01188719551879041.25980681741746-0.247919621898666
1270-0.9571003914762-0.3483994691569331.30549986063313-0.9571003914762
12810.689055714269325-0.04842214777457541.35936643350525-0.310944285730675
12910.880664814463312-0.2938978208406821.41323300637737-0.119335185536688
13034.324876945577830.1909989341484151.484124120273751.32487694557783
13122.58727143559438-0.1422866697645151.555015234170130.58727143559438
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/26/t129339677033gntbcoe6eazao/1tqf61293396881.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t129339677033gntbcoe6eazao/1tqf61293396881.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t129339677033gntbcoe6eazao/2tqf61293396881.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t129339677033gntbcoe6eazao/2tqf61293396881.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t129339677033gntbcoe6eazao/34hwr1293396881.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t129339677033gntbcoe6eazao/34hwr1293396881.ps (open in new window)


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