Home » date » 2010 » Dec » 28 »

Paper: analyse (min 18) 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: Tue, 28 Dec 2010 19:08:27 +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/28/t1293563260jskbew562wt0q4l.htm/, Retrieved Tue, 28 Dec 2010 20:07:40 +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/28/t1293563260jskbew562wt0q4l.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 «
3065 2997 2901 2815 2709 2711 3509 3369 3596 3448 3160 2934 2534 2266 2088 1932 1784 1851 2700 2580 2829 2298 2045 1824 1872 1801 1735 1639 1521 1758 2603 2540 3103 2801 2590 2324 2424 2288 2163 2082 1937 2155 2874 2836 3439 3278 3129 2959 3060 2898 2783 2632 2465 2689 3321 3359 4108 3407 3241 3013 3067 2965 2823 2718 2567 2658 3436 3375 3931 3371 3038
 
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
Seasonal711072
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
130652899.89184437689-76.86614851610463306.97430413922-165.108155623114
229972931.54910841643-204.2283582701993266.67924985377-65.4508915835695
329012893.03967606363-317.4238716319473226.38419556832-7.96032393637279
428152869.35216183275-422.7030987099843183.3509368772354.3521618327495
527092832.33131547736-554.6489936635063140.31767818615123.331315477357
627112736.97769902917-410.0536671503333095.0759681211625.9776990291675
735093603.29084754575364.8748943980713049.8342580561894.2908475457484
833693434.53975636867301.4391420061253002.0211016252165.5397563686683
935963444.62193105142793.170123754352954.20794519423-151.378068948583
1034483612.28123864556394.4380410549562889.28072029948164.281238645563
1131603332.77383616592162.8726684293522824.35349540473172.773836165920
1229343148.99671511361-30.87082903021162749.8741139166214.996715113612
1325342469.47141608763-76.86614851610462675.39473242847-64.5285839123658
1422662135.79636854073-204.2283582701992600.43198972946-130.203631459265
1520881967.95462460149-317.4238716319472525.46924703046-120.045375398511
1619321842.35991428290-422.7030987099842444.34318442709-89.640085717103
1717841759.43187183979-554.6489936635062363.21712182372-24.5681281602106
1818511823.12949968021-410.0536671503332288.92416747012-27.870500319792
1927002820.49389248540364.8748943980712214.63121311653120.493892485397
2025802693.13210293436301.4391420061252165.42875505952113.132102934359
2128292748.60357924315793.170123754352116.2262970025-80.3964207568492
2222982114.79472921696394.4380410549562086.76722972809-183.205270783042
2320451869.81916911697162.8726684293522057.30816245367-175.180830883025
2418241633.65976329006-30.87082903021162045.21106574015-190.34023670994
2518721787.75217948947-76.86614851610462033.11396902663-84.2478205105253
2618011761.93947701435-204.2283582701992044.28888125585-39.0605229856526
2717351731.96007814687-317.4238716319472055.46379348507-3.039921853127
2816391610.14775951731-422.7030987099842090.55533919267-28.8522404826886
2915211471.00210876323-554.6489936635062125.64688490027-49.9978912367656
3017581756.61454541735-410.0536671503332169.43912173299-1.38545458265435
3126032627.89374703623364.8748943980712213.231358565724.893747036228
3225402523.6704330951301.4391420061252254.89042489878-16.3295669049021
3331033116.28038501380793.170123754352296.5494912318513.2803850137966
3428012874.1713475733394.4380410549562333.3906113717473.1713475733022
3525902646.89560005902162.8726684293522370.2317315116356.8956000590183
3623242278.41893635857-30.87082903021162400.45189267164-45.5810636414258
3724242494.19409468446-76.86614851610462430.6720538316470.1940946844602
3822882323.30284136067-204.2283582701992456.9255169095335.3028413606717
3921632160.24489164454-317.4238716319472483.17897998741-2.75510835546447
4020822069.69002415703-422.7030987099842517.01307455296-12.3099758429726
4119371877.80182454500-554.6489936635062550.84716911850-59.1981754549965
4221552122.36764454048-410.0536671503332597.68602260985-32.6323554595156
4328742738.60022950074364.8748943980712644.52487610119-135.399770499264
4428362671.69282215957301.4391420061252698.86803583430-164.307177840429
4534393331.61868067824793.170123754352753.21119556742-107.381319321765
4632783354.62189680441394.4380410549562806.9400621406376.6218968044122
4731293234.4584028568162.8726684293522860.66892871385105.458402856800
4829593041.19344175940-30.87082903021162907.6773872708182.1934417594043
4930603242.18030268834-76.86614851610462954.68584582777182.180302688338
5028983008.32892932177-204.2283582701992991.89942894843110.328929321767
5127832854.31085956285-317.4238716319473029.113012069171.3108595628478
5226322637.89151465724-422.7030987099843048.811584052745.89151465724353
5324652416.13883762712-554.6489936635063068.51015603638-48.8611623728766
5426892713.53708284572-410.0536671503333074.5165843046124.5370828457239
5533213196.60209302910364.8748943980713080.52301257283-124.397906970905
5633593331.95294900608301.4391420061253084.60790898779-27.0470509939191
5741084334.1370708429793.170123754353088.69280540275226.137070842896
5834073324.21909033154394.4380410549563095.34286861351-82.7809096684614
5932413217.13439974639162.8726684293523101.99293182426-23.8656002536086
6030132950.83646277345-30.87082903021163106.03436625676-62.1635372265487
6130673100.79034782684-76.86614851610463110.0758006892633.7903478268408
6229653027.19223295619-204.2283582701993107.0361253140162.1922329561912
6328232859.42742169319-317.4238716319473103.9964499387536.4274216931944
6427182765.31029923115-422.7030987099843093.3927994788447.3102992311465
6525672605.85984464458-554.6489936635063082.7891490189238.8598446445831
6626582655.02855742372-410.0536671503333071.02510972662-2.97144257628406
6734363447.86403516762364.8748943980713059.2610704343111.8640351676195
6833753401.92846624413301.4391420061253046.6323917497526.9284662441250
6939314034.82616318046793.170123754353034.00371306519103.826163180460
7033713327.34992466842394.4380410549563020.21203427663-43.6500753315831
7130382906.70697608258162.8726684293523006.42035548806-131.293023917416
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293563260jskbew562wt0q4l/1o0mz1293563303.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293563260jskbew562wt0q4l/1o0mz1293563303.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293563260jskbew562wt0q4l/2o0mz1293563303.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293563260jskbew562wt0q4l/2o0mz1293563303.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/28/t1293563260jskbew562wt0q4l/3zrm21293563303.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/28/t1293563260jskbew562wt0q4l/3zrm21293563303.ps (open in new window)


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