Home » date » 2009 » Dec » 04 »

*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: Fri, 04 Dec 2009 11:25:08 -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/04/t1259951206zo0e9glgfljs0yb.htm/, Retrieved Fri, 04 Dec 2009 19:26:51 +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/04/t1259951206zo0e9glgfljs0yb.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 «
15836,8 17570,4 18252,1 16196,7 16643 17729 16446,1 15993,8 16373,5 17842,2 22321,5 22786,7 18274,1 22392,9 23899,3 21343,5 22952,3 21374,4 21164,1 20906,5 17877,4 20664,3 22160 19813,6 17735,4 19640,2 20844,4 19823,1 18594,6 21350,6 18574,1 18924,2 17343,4 19961,2 19932,1 19464,6 16165,4 17574,9 19795,4 19439,5 17170 21072,4 17751,8 17515,5 18040,3 19090,1 17746,5 19202,1 15141,6 16258,1 18586,5 17209,4 17838,7 19123,5 16583,6 15991,2 16704,4 17420,4 17872 17823,2
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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
115836.817569.463151726-1978.6079476872616082.74479596121732.66315172602
217570.418748.962534705815.744962461528716376.09250283271178.56253470582
318252.118293.06237809541541.6974122005616669.440209704140.9623780953771
416196.715377.888672617621.748656608314616993.7626707741-818.811327382422
51664316155.7359055258-187.8210373699717318.0851318442-487.264094474187
61772916498.69870257371299.1127990832217660.1884983430-1230.30129742626
716446.115620.1620921189-730.25395696082318002.2918648419-825.937907881093
815993.814580.6670745375-944.91479020103618351.8477156636-1413.13292546253
916373.515565.9133832385-1520.3169497237218701.4035664852-807.586616761495
1017842.216319.5774116049214.35386251230919150.4687258828-1522.62258839515
1122321.523811.50333132941231.9627833901919599.53388528051490.00333132935
1222786.724488.26284640141037.2950733106820047.84208028791701.56284640144
1318274.118030.6576723920-1978.6079476872620496.1502752953-243.442327608038
1422392.923967.944558756215.744962461528720802.11047878231575.04455875620
1523899.325148.83190553021541.6974122005621108.07068226931249.53190553018
1621343.521462.498073946421.748656608314621202.7532694453118.998073946434
1722952.324794.9851807487-187.8210373699721297.43585662121842.68518074872
1821374.420263.12253321061299.1127990832221186.5646677062-1111.27746678937
1921164.121982.7604781698-730.25395696082321075.6934787911818.660478169768
2020906.521885.1698933967-944.91479020103620872.7448968043978.669893396727
2117877.416605.3206349062-1520.3169497237220669.7963148176-1272.07936509384
2220664.320665.4653054229214.35386251230920448.78083206481.16530542285909
232216022860.27186729771231.9627833901920227.7653493121700.271867297717
2419813.618536.88896500681037.2950733106820053.0159616826-1276.71103499324
2517735.417571.1413736342-1978.6079476872619878.2665740530-164.258626365765
2619640.219506.297936490615.744962461528719758.3571010479-133.902063509413
2720844.420508.65495975671541.6974122005619638.4476280427-335.745040243295
2819823.120066.614689077221.748656608314619557.8366543145243.514689077205
2918594.617899.7953567837-187.8210373699719477.2256805862-694.804643216255
3021350.622018.32652628751299.1127990832219383.7606746293667.726526287512
3118574.118588.1582882885-730.25395696082319290.295668672314.0582882885174
3218924.219614.4677819306-944.91479020103619178.8470082705690.267781930557
3317343.417139.7186018551-1520.3169497237219067.3983478687-203.681398144930
3419961.220747.1634421385214.35386251230918960.8826953492785.963442138458
3519932.119777.870173781231.9627833901918854.3670428298-154.229826219995
3619464.619120.20463617671037.2950733106818771.7002905126-344.395363823274
3716165.415620.3744094919-1978.6079476872618689.0335381954-545.025590508121
3817574.916496.208667665415.744962461528718637.8463698731-1078.69133233463
3919795.419462.44338624861541.6974122005618586.6592015508-332.95661375139
4019439.520309.007721579521.748656608314618548.2436218121869.50772157955
411717016017.9929952965-187.8210373699718509.8280420734-1152.00700470348
4221072.422394.39515275971299.1127990832218451.29204815711321.99515275971
4317751.817841.0979027201-730.25395696082318392.756054240789.297902720129
4417515.517689.4446909968-944.91479020103618286.4700992042173.944690996803
4518040.319420.7328055559-1520.3169497237218180.18414416781380.43280555594
4619090.119914.3074938003214.35386251230918051.5386436874824.207493800335
4717746.516338.14407340291231.9627833901917922.8931432069-1408.35592659711
4819202.119567.76302740831037.2950733106817799.1418992810365.663027408351
4915141.614586.4172923323-1978.6079476872617675.390655355-555.182707667747
5016258.114929.480848193615.744962461528717570.9741893449-1328.61915180640
5118586.518164.74486446471541.6974122005617466.5577233347-421.755135535288
5217209.416977.001910101321.748656608314617420.0494332903-232.398089898652
5317838.718491.6798941240-187.8210373699717373.5411432460652.979894124015
5419123.519620.99128498851299.1127990832217326.8959159283497.491284988519
5516583.616617.2032683503-730.25395696082317280.250688610633.6032683502563
5615991.215685.7194030493-944.91479020103617241.5953871518-305.480596950740
5716704.417726.1768640307-1520.3169497237217202.9400856931021.77686403073
5817420.417459.1217802215214.35386251230917167.324357266238.7217802215309
591787217380.32858777051231.9627833901917131.7086288393-491.671412229516
6017823.217514.78686286121037.2950733106817094.3180638281-308.413137138799
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259951206zo0e9glgfljs0yb/12cit1259951107.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259951206zo0e9glgfljs0yb/12cit1259951107.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259951206zo0e9glgfljs0yb/2b43v1259951107.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259951206zo0e9glgfljs0yb/2b43v1259951107.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259951206zo0e9glgfljs0yb/3v1at1259951107.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259951206zo0e9glgfljs0yb/3v1at1259951107.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259951206zo0e9glgfljs0yb/4u0ts1259951107.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259951206zo0e9glgfljs0yb/4u0ts1259951107.ps (open in new window)


 
Parameters (Session):
 
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