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 09:50:59 +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/t12917154988i1aviammp0hukk.htm/, Retrieved Tue, 07 Dec 2010 10:51:43 +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/t12917154988i1aviammp0hukk.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 «
46 62 66 59 58 61 41 27 58 70 49 59 44 36 72 45 56 54 53 35 61 52 47 51 52 63 74 45 51 64 36 30 55 64 39 40 63 45 59 55 40 64 27 28 45 57 45 69 60 56 58 50 51 53 37 22 55 70 62 58 39 49 58 47 42 62 39 40 72 70 54 65
 
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'George Udny Yule' @ 72.249.76.132


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
14636.4219352653799-1.0632744922472556.6413392268674-9.57806473462015
26267.69308642176140.099499265093681956.20741431314495.69308642176144
36663.464224771953512.762285828624155.7734893994223-2.53577522804649
45964.3254419639629-1.6406080431598755.3151660791975.32544196396289
55863.3533214485102-2.2101642074818254.85684275897165.35332144851019
66159.85702283996057.7480340428855754.3949431171540-1.14297716003952
74141.1940625712892-13.127106046625453.93304347533630.194062571289166
82722.2720342413456-21.680036577647753.408002336302-4.72796575865438
95857.51667784811135.600360954620952.8829611972678-0.483322151888707
107076.068919007046311.709442707051852.22163828590186.06891900704635
114949.2878276758584-2.8481430503941651.56031537453580.287827675858360
125961.86932053907784.6497123388434151.48096712207882.86932053907781
134437.6616556226255-1.0632744922472551.4016188696218-6.33834437737452
143620.29234329209450.099499265093681951.6081574428118-15.7076567079055
157279.42301815537412.762285828624151.81469601600187.42301815537401
164539.880002307446-1.6406080431598751.7606057357139-5.11999769255398
175662.503648752056-2.2101642074818251.70651545542596.50364875205597
185448.45779913652657.7480340428855751.794166820588-5.54220086347354
195367.2452878608754-13.127106046625451.881818185750114.2452878608753
203539.3126183512332-21.680036577647752.36741822641454.31261835123318
216163.54662077830025.600360954620952.85301826707892.54662077830024
225239.252168277374411.709442707051853.0383890155737-12.7478317226256
234743.6243832863255-2.8481430503941653.2237597640686-3.37561671367447
245144.27745501118964.6497123388434153.072832649967-6.72254498881042
255252.1413689563819-1.0632744922472552.92190553586540.141368956381854
266373.14320926747790.099499265093681952.757291467428510.1432092674779
277482.645036772384312.762285828624152.59267739899158.64503677238433
284539.1806383240464-1.6406080431598752.4599697191135-5.81936167595359
295151.8829021682464-2.2101642074818252.32726203923540.882902168246417
306468.39170697736247.7480340428855751.8602589797524.39170697736241
313633.7338501263568-13.127106046625451.3932559202687-2.26614987364321
323030.9447079403866-21.680036577647750.73532863726110.944707940386564
335554.32223769112565.600360954620950.0774013542535-0.677762308874428
346466.626575532519911.709442707051849.66398176042832.62657553251985
353931.5975808837911-2.8481430503941649.2505621666031-7.40241911620891
364026.40058929962354.6497123388434148.9496983615331-13.5994107003765
376378.414439935784-1.0632744922472548.648834556463215.4144399357841
384541.56750978740440.099499265093681948.3329909475019-3.43249021259558
395957.220566832835212.762285828624148.0171473385406-1.77943316716475
405563.6981659156896-1.6406080431598747.94244212747028.69816591568964
414034.3424272910820-2.2101642074818247.8677369163999-5.65757270891804
426471.90108847765937.7480340428855748.35087747945527.90108847765928
432718.293088004115-13.127106046625448.8340180425105-8.70691199588502
442828.3713481005724-21.680036577647749.30868847707530.371348100572405
454534.61628013373915.600360954620949.78335891164-10.3837198662609
465752.166066292033511.709442707051850.1244910009147-4.83393370796654
474542.3825199602048-2.8481430503941650.4656230901894-2.61748003979520
486982.6526660420684.6497123388434150.697621619088613.6526660420680
496070.1336543442595-1.0632744922472550.929620147987810.1336543442595
505660.7284210063180.099499265093681951.17207972858834.72842100631803
515851.823174862187112.762285828624151.4145393091888-6.17682513781293
525049.9848409745743-1.6406080431598751.6557670685856-0.0151590254257457
535152.3131693794994-2.2101642074818251.89699482798251.31316937949936
545346.55491407991257.7480340428855751.6970518772019-6.44508592008748
553735.6299971202041-13.127106046625451.4971089264214-1.37000287979594
562214.5811344327679-21.680036577647751.0989021448797-7.41886556723205
575553.69894368204115.600360954620950.700695363338-1.30105631795894
587077.818452756215711.709442707051850.47210453673247.81845275621574
596276.6046293402674-2.8481430503941650.243513710126814.6046293402674
605861.00978182292964.6497123388434150.3405058382273.00978182292960
613928.6257765259201-1.0632744922472550.4374979663272-10.3742234740799
624946.98135919153280.099499265093681950.9191415433735-2.01864080846720
635851.83692905095612.762285828624151.4007851204198-6.16307094904398
644743.3006707792362-1.6406080431598752.3399372639237-3.69932922076383
654232.9310748000542-2.2101642074818253.2790894074276-9.06892519994576
666262.08197427034857.7480340428855754.16999168676590.0819742703485105
673936.0662120805212-13.127106046625455.0608939661043-2.93378791947883
684045.6010195404533-21.680036577647756.07901703719435.60101954045332
697281.30249893709475.600360954620957.09714010828449.3024989370947
707070.043711566601311.709442707051858.24684572634680.043711566601317
715451.4515917059849-2.8481430503941659.3965513444093-2.54840829401512
726564.74336914645144.6497123388434160.6069185147052-0.256630853548621
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/07/t12917154988i1aviammp0hukk/1fswg1291715456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t12917154988i1aviammp0hukk/1fswg1291715456.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Dec/07/t12917154988i1aviammp0hukk/40svm1291715456.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/07/t12917154988i1aviammp0hukk/40svm1291715456.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = 1 ; par3 = 1 ; par4 = 12 ;
 
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