Home » date » 2010 » Dec » 20 »

Paper statistiek - decomposition by 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: Mon, 20 Dec 2010 13:18:44 +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/20/t1292851112mz0ldvl4icoh9rg.htm/, Retrieved Mon, 20 Dec 2010 14:18:38 +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/20/t1292851112mz0ldvl4icoh9rg.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 «
493 514 522 490 484 506 501 462 465 454 464 427 460 473 465 422 415 413 420 363 376 380 384 346 389 407 393 346 348 353 364 305 307 312 312 286 324 336 327 302 299 311 315 264 278 278 287 279 324 354 354 360 363 385 412 370 389 395 417 404
 
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
1493480.8182309022259.0016299974883496.180139100287-12.1817690977750
2514504.68014034783529.7643269514014493.555532700764-9.31985965216523
3522525.9420524074827.1270212912793490.9309263012413.94205240747965
4490491.6620979505260.301846850505906488.0360551989681.66209795052595
5484483.382129116384-0.523313213078866485.141184096695-0.61787088361632
6506517.82578020349512.1543793146486482.01984048185711.8257802034945
7501501.26942384060821.8320792923732478.8984968670190.269423840608226
8462475.876649257514-27.4751000466452475.59845078913113.8766492575139
9465474.683868008634-16.9822727198782472.2984047112449.68386800863408
10454456.726657374498-16.1842799895037467.4576226150062.72665737449779
11464472.56945654299-7.18629706175729462.6168405187688.5694565429896
12427430.176734517691-31.8300260244715455.6532915067813.17673451769059
13460462.3086275077189.0016299974883448.6897424947942.30862750771757
14473475.18272010716929.7643269514014441.0529529414292.18272010716925
15465469.45681532065627.1270212912793433.4161633880644.45681532065618
16422417.4788229712850.301846850505906426.219330178209-4.52117702871487
17415411.500816244725-0.523313213078866419.022496968353-3.49918375527454
18413401.21893683904812.1543793146486412.626683846303-11.7810631609519
19420411.93704998337421.8320792923732406.230870724253-8.0629500166263
20363352.952128596696-27.4751000466452400.52297144995-10.0478714033045
21376374.167200544232-16.9822727198782394.815072175646-1.83279945576817
22380386.745184002375-16.1842799895037389.4390959871286.74518400237542
23384391.123177263147-7.18629706175729384.063119798617.12317726314711
24346344.949862429613-31.8300260244715378.880163594859-1.05013757038745
25389395.3011626114049.0016299974883373.6972073911086.30116261140398
26407415.96641674183229.7643269514014368.2692563067668.96641674183223
27393396.03167348629627.1270212912793362.8413052224253.03167348629563
28346334.6091986932650.301846850505906357.088954456229-11.390801306735
29348345.186709523046-0.523313213078866351.336603690033-2.81329047695425
30353348.1133085384612.1543793146486345.732312146891-4.88669146153973
31364366.03990010387821.8320792923732340.1280206037492.03990010387764
32305302.498470097238-27.4751000466452334.976629949407-2.50152990276194
33307301.157033424813-16.9822727198782329.825239295065-5.84296657518701
34312314.790843368745-16.1842799895037325.3934366207592.79084336874507
35312310.224663115305-7.18629706175729320.961633946452-1.77533688469470
36286286.723896936261-31.8300260244715317.1061290882100.723896936261156
37324325.7477457725439.0016299974883313.2506242299691.74774577254311
38336332.30747916909429.7643269514014309.928193879505-3.69252083090601
39327320.2672151796827.1270212912793306.605763529041-6.73278482031992
40302299.5706189666880.301846850505906304.127534182807-2.42938103331244
41299296.874008376506-0.523313213078866301.649304836572-2.12599162349358
42311309.13400515967712.1543793146486300.711615525674-1.86599484032257
43315308.39399449285121.8320792923732299.773926214775-6.60600550714867
44264254.433114810935-27.4751000466452301.04198523571-9.5668851890648
45278270.672228463234-16.9822727198782302.310044256645-7.32777153676648
46278265.902654006528-16.1842799895037306.281625982976-12.0973459934721
47287270.933089352450-7.18629706175729310.253207709307-16.0669106475496
48279272.916242463392-31.8300260244715316.913783561079-6.08375753660795
49324315.424010589669.0016299974883323.574359412852-8.5759894103403
50354345.76515195564329.7643269514014332.470521092956-8.2348480443572
51354339.50629593566127.1270212912793341.366682773059-14.4937040643388
52360367.8923282766890.301846850505906351.8058248728057.89232827668883
53363364.278346240528-0.523313213078866362.2449669725511.27834624052781
54385385.06610756278312.1543793146486372.7795131225680.0661075627833725
55412418.85386143504221.8320792923732383.3140592725856.85386143504178
56370373.520776035701-27.4751000466452393.9543240109443.52077603570092
57389390.387683970575-16.9822727198782404.5945887493041.38768397057459
58395390.921088565861-16.1842799895037415.263191423643-4.07891143413906
59417415.254502963775-7.18629706175729425.931794097982-1.74549703622461
60404403.243438185595-31.8300260244715436.586587838876-0.756561814404563
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851112mz0ldvl4icoh9rg/16shf1292851121.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851112mz0ldvl4icoh9rg/16shf1292851121.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851112mz0ldvl4icoh9rg/26shf1292851121.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851112mz0ldvl4icoh9rg/26shf1292851121.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851112mz0ldvl4icoh9rg/3z1z01292851121.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851112mz0ldvl4icoh9rg/3z1z01292851121.ps (open in new window)


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