Home » date » 2009 » Dec » 10 »

WS 9 adh

*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: Thu, 10 Dec 2009 09:56:36 -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/10/t1260464232k93um4bo4ndxkx4.htm/, Retrieved Thu, 10 Dec 2009 17:57:17 +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/10/t1260464232k93um4bo4ndxkx4.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 «
1901 1395 1639 1643 1751 1797 1373 1558 1555 2061 2010 2119 1985 1963 2017 1975 1589 1679 1392 1511 1449 1767 1899 2179 2217 2049 2343 2175 1607 1702 1764 1766 1615 1953 2091 2411 2550 2351 2786 2525 2474 2332 1978 1789 1904 1997 2207 2453 1948 1384 1989 2140 2100 2045 2083 2022 1950 1422 1859 2147
 
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
119012064.41089920635218.2139045373471519.37519625631163.410899206348
213951318.97132895013-85.64878982343411556.67746087331-76.0286710498722
316391455.33204676043228.6882277492671593.97972549031-183.667953239574
416431496.43158022568160.2748662910101629.29355348331-146.568419774322
517511869.73121302426-32.33859450057431664.60738147632118.731213024258
617971923.91682559587-27.64047028308411697.72364468722126.916825595869
713731237.90242522798-222.7423331260941730.83990789811-135.097574772020
815581567.52465330036-214.7903268874991763.265673587149.52465330036284
915551566.94685327191-252.6382925480661795.6914392761611.9468532719086
1020612417.46546724876-114.771017560951819.30555031219356.465467248765
1120102126.1842491773250.89608947447061842.91966134821116.184249177317
1221192105.43550890742292.4967489182161840.06774217436-13.5644910925760
1319851914.57027246215218.2139045373471837.21582300051-70.429727537854
1419632187.76201217304-85.64878982343411823.88677765039224.762012173040
1520171994.75403995045228.6882277492671810.55773230028-22.2459600495474
1619751993.26819115769160.2748662910101796.4569425513018.2681911576869
1715891427.98244169825-32.33859450057431782.35615280233-161.017558301751
1816791603.67592750730-27.64047028308411781.96454277578-75.3240724926954
1913921225.16940037686-222.7423331260941781.57293274923-166.830599623140
2015111438.63577105709-214.7903268874991798.15455583041-72.364228942907
2114491335.90211363649-252.6382925480661814.73617891158-113.097886363511
2217671813.05374455668-114.771017560951835.7172730042746.0537445566822
2318991890.4055434285750.89608947447061856.69836709696-8.59445657142896
2421792190.81118739763292.4967489182161874.6920636841611.811187397627
2522172323.10033519130218.2139045373471892.68576027136106.100335191297
2620492276.82477741351-85.64878982343411906.82401240993227.824777413509
2723432536.34950770224228.6882277492671920.96226454850193.349507702238
2821752257.08099473867160.2748662910101932.6441389703282.080994738667
2916071302.01258110842-32.33859450057431944.32601339215-304.987418891576
3017021472.43427313654-27.64047028308411959.20619714654-229.565726863457
3117641776.65595222516-222.7423331260941974.0863809009312.6559522251612
3217661742.33570518474-214.7903268874992004.45462170276-23.6642948152632
3316151447.81543004348-252.6382925480662034.82286250459-167.184569956525
3419531937.46344745476-114.771017560952083.30757010619-15.5365525452366
3520911999.3116328177550.89608947447062131.79227770778-91.6883671822532
3624112350.94570929048292.4967489182162178.55754179130-60.0542907095196
3725502656.46328958783218.2139045373472225.32280587482106.463289587829
3823512538.51480898551-85.64878982343412249.13398083792187.514808985514
3927863070.36661644972228.6882277492672272.94515580102284.366616449717
4025252611.73542231799160.2748662910102277.98971139186.7354223179877
4124742697.30432751959-32.33859450057432283.03426698099223.304327519587
4223322431.74492886365-27.64047028308412259.8955414194499.7449288636453
4319781941.98551726820-222.7423331260942236.75681585789-36.0144827317968
4417891609.54354022380-214.7903268874992183.24678666370-179.456459776205
4519041930.90153507855-252.6382925480662129.7367574695226.9015350785498
4619972028.49697897619-114.771017560952080.2740385847631.4969789761894
4722072332.2925908255250.89608947447062030.81131970000125.292590825525
4824532602.47319399733292.4967489182162011.03005708445149.473193997335
4919481686.53730099376218.2139045373471991.24879446889-261.46269900624
501384863.170973067734-85.64878982343411990.4778167557-520.829026932266
5119891759.60493320823228.6882277492671989.70683904251-229.395066791774
5221402137.01848590348160.2748662910101982.70664780551-2.98151409651564
5321002256.63213793207-32.33859450057431975.70645656850156.632137932071
5420452148.95550552802-27.64047028308411968.68496475506103.955505528023
5520832427.07886018448-222.7423331260941961.66347294162344.078860184476
5620222300.77756012426-214.7903268874991958.01276676324278.77756012426
5719502198.27623196321-252.6382925480661954.36206058486248.276231963207
5814221008.60408040375-114.771017560951950.1669371572-413.395919596250
5918591721.1320967959950.89608947447061945.97181372954-137.867903204011
6021472062.08536691704292.4967489182161939.41788416474-84.9146330829583
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/10/t1260464232k93um4bo4ndxkx4/1xm0b1260464194.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/10/t1260464232k93um4bo4ndxkx4/1xm0b1260464194.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/10/t1260464232k93um4bo4ndxkx4/2skrn1260464194.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/10/t1260464232k93um4bo4ndxkx4/2skrn1260464194.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/10/t1260464232k93um4bo4ndxkx4/3sfe71260464194.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/10/t1260464232k93um4bo4ndxkx4/3sfe71260464194.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/10/t1260464232k93um4bo4ndxkx4/4ct051260464194.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/10/t1260464232k93um4bo4ndxkx4/4ct051260464194.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