Home » date » 2010 » Dec » 08 »

*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: Wed, 08 Dec 2010 17:36:03 +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/08/t1291829638jrrx7bfggt8d9yc.htm/, Retrieved Wed, 08 Dec 2010 18:33:58 +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/08/t1291829638jrrx7bfggt8d9yc.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 «
16198.1 17535.2 16571.8 16198.9 16554.2 19554.2 15903.8 18003.8 18329.6 16260.7 14851.9 18174.1 18406.6 18466.5 16016.5 17428.5 17167.2 19630 17183.6 18344.7 19301.4 18147.5 16192.9 18374.4 20515.2 18957.2 16471.5 18746.8 19009.5 19211.2 20547.7 19325.8 20605.5 20056.9 16141.4 20359.8 19711.6 15638.6 14384.5 13855.6 14308.3 15290.6 14423.8 13779.7 15686.3 14733.8 12522.5 16189.4 16059.1 16007.1 15806.8 15160 15692.1 18908.9 16969.9 16997.5 19858.9 17681.2 16006.9 19539.9
 
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
Seasonal601061
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
116198.114541.52940891651073.5971323100616781.0734587735-1656.57059108355
217535.218034.0913871055201.36846626090216834.9401466336498.891387105494
316571.817539.1529272871-1284.3597617808816888.8068344937967.35292728715
416198.916329.3896639022-875.2058779741416943.6162140719130.489663902208
516554.216735.4675155467-625.49310919681816998.4255936501181.267515546679
619554.220729.72173952931319.3738456692417059.30441480141175.52173952935
715903.814909.1134640115-221.69669996419117120.1832359527-994.686535988501
818003.818801.701465387228.118673763030017177.7798608498797.901465387207
918329.617964.38878315371459.4347310994817235.3764857468-365.211216846314
1016260.715210.347550761142.216972569745817268.8354766692-1050.35244923894
1114851.914629.0877718107-2227.5822394023117302.2944675916-222.81222818925
1218174.117869.03392619351110.2280594128517368.9380143936-305.066073806451
1318406.618304.02130649431073.5971323100617435.5815611956-102.578693505708
1418466.519205.6584654816201.36846626090217525.9730682575739.158465481632
1516016.515700.9951864616-1284.3597617808817616.3645753193-315.504813538410
1617428.518018.4229266358-875.2058779741417713.7829513383589.922926635791
1717167.217148.6917818394-625.49310919681817811.2013273574-18.5082181605867
181963020045.83214955831319.3738456692417894.7940047724415.832149558348
1917183.616610.5100177768-221.69669996419117978.3866821874-573.089982223235
2018344.718613.019756949528.118673763030018048.2615692874268.319756949524
2119301.419025.22881251311459.4347310994818118.1364563875-276.17118748694
2218147.518047.984150173942.216972569745818204.7988772563-99.515849826068
2316192.916321.9209412771-2227.5822394023118291.4612981252129.020941277126
2418374.417231.8911209291110.2280594128518406.6808196581-1142.50887907099
2520515.221434.90252649881073.5971323100618521.9003411911919.702526498844
2618957.219055.9917096258201.36846626090218657.039824113398.7917096257552
2716471.515435.1804547453-1284.3597617808818792.1793070356-1036.31954525472
2818746.819463.8354715590-875.2058779741418904.9704064152717.035471558975
2919009.519626.7316034021-625.49310919681819017.7615057947617.231603402088
3019211.218051.0787196451319.3738456692419051.9474346858-1160.12128035501
3120547.722230.9633363874-221.69669996419119086.13336357681683.26333638738
3219325.819678.240435231928.118673763030018945.2408910050352.440435231947
3320605.520947.21685046731459.4347310994818804.3484184332341.716850467295
3420056.921588.900705552142.216972569745818482.68232187821532.00070555209
3516141.416349.3660140792-2227.5822394023118161.0162253231207.966014079200
3620359.821894.02437705641110.2280594128517715.34756353071534.22437705643
3719711.621079.92396595161073.5971323100617269.67890173831368.32396595160
3815638.614292.3404503966201.36846626090216783.4910833425-1346.25954960336
3914384.513756.0564968343-1284.3597617808816297.3032649466-628.443503165694
4013855.612717.4337702552-875.2058779741415868.9721077189-1138.16622974480
4114308.313801.4521587055-625.49310919681815440.6409504913-506.847841294488
4215290.614098.21557090011319.3738456692415163.6105834306-1192.38442909987
4314423.814182.7164835942-221.69669996419114886.5802163700-241.083516405781
4413779.712693.671461693328.118673763030014837.6098645437-1086.02853830673
4515686.315124.52575618311459.4347310994814788.6395127174-561.774243816913
4614733.814505.024831671642.216972569745814920.3581957586-228.775168328393
4712522.512220.5053606025-2227.5822394023115052.0768787999-301.994639397548
4816189.415986.12858047801110.2280594128515282.4433601091-203.271419521974
4916059.115531.79302627151073.5971323100615512.8098414184-527.306973728451
5016007.116019.4814050775201.36846626090215793.350128661612.3814050774836
5115806.816824.0693458760-1284.3597617808816073.89041590481017.26934587604
521516014841.5191951544-875.2058779741416353.6866828197-318.480804845576
5315692.115376.2101594622-625.49310919681816633.4829497346-315.889840537775
5418908.919588.39294847161319.3738456692416910.0332058591679.492948471627
5516969.916974.9132379805-221.69669996419117186.58346198375.01323798051089
5616997.516506.143967489428.118673763030017460.7373587476-491.356032510641
5719858.920523.4740133891459.4347310994817734.8912555115664.574013388989
5817681.217314.474303707542.216972569745818005.7087237227-366.725696292495
5916006.915964.8560474683-2227.5822394023118276.5261919340-42.0439525316579
6019539.919425.06884495061110.2280594128518544.5030956365-114.831155049382
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/08/t1291829638jrrx7bfggt8d9yc/1c73c1291829759.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t1291829638jrrx7bfggt8d9yc/1c73c1291829759.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t1291829638jrrx7bfggt8d9yc/2c73c1291829759.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t1291829638jrrx7bfggt8d9yc/2c73c1291829759.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t1291829638jrrx7bfggt8d9yc/3c73c1291829759.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t1291829638jrrx7bfggt8d9yc/3c73c1291829759.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/08/t1291829638jrrx7bfggt8d9yc/45z2f1291829759.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/08/t1291829638jrrx7bfggt8d9yc/45z2f1291829759.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