Home » date » 2009 » Dec » 04 »

Ad hoc techniek 2

*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 06:42:18 -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/t1259934206il1e5zf4126vcq7.htm/, Retrieved Fri, 04 Dec 2009 14:43:32 +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/t1259934206il1e5zf4126vcq7.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 «
562 561 555 544 537 543 594 611 613 611 594 595 591 589 584 573 567 569 621 629 628 612 595 597 593 590 580 574 573 573 620 626 620 588 566 557 561 549 532 526 511 499 555 565 542 527 510 514 517 508 493 490 469 478 528 534 518 506 502 516 528
 
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
Seasonal611062
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1562561.9269410452293.6908251759214558.38223377885-0.0730589547709997
2561564.240035699221-3.75992434092145561.51988864173.24003569922127
3555558.937635370478-13.5951788750283564.6575435045513.93763537047766
4544540.461438477241-20.2371237683152567.775685291074-3.53856152275898
5537532.585237353755-29.479064431353570.893827077598-4.41476264624475
6543540.028749274319-27.9471389393755573.918389665056-2.97125072568087
7594587.27225621812223.7847915293633576.942952252515-6.7277437818783
8611608.32517606631633.842152100764579.83267183292-2.67482393368437
9613617.57809491915625.6995136675183582.7223914133264.57809491915623
10611625.40174053591811.1796328761253585.41862658795714.4017405359180
11594603.225382295687-3.34024405827524588.1148617625889.22538229568738
12595599.6400262572070.161753634368499590.1982201084244.64002625720707
13591586.0275963698183.6908251759214592.281578454261-4.97240363018227
14589588.215465257235-3.75992434092145593.544459083686-0.784534742764663
15584586.787839161917-13.5951788750283594.8073397131112.78783916191696
16573570.853662651814-20.2371237683152595.383461116501-2.14633734818619
17567567.519481911462-29.479064431353595.9595825198910.519481911461639
18569569.705997475435-27.9471389393755596.2411414639410.705997475434742
19621621.69250806264723.7847915293633596.522700407990.692508062646766
20629627.5771215703733.842152100764596.580726328866-1.42287842963026
21628633.6617340827425.6995136675183596.6387522497435.66173408273926
22612616.199716165511.1796328761253596.6206509583744.19971616550049
23595596.73769439127-3.34024405827524596.6025496670061.73769439126954
24597597.2175871607850.161753634368499596.6206592048470.217587160784888
25593585.6704060813913.6908251759214596.638768742687-7.3295939186089
26590587.487299958086-3.75992434092145596.272624382835-2.51270004191394
27580577.688698852045-13.5951788750283595.906480022983-2.31130114795485
28574573.68222192624-20.2371237683152594.554901842075-0.317778073759541
29573582.275740770187-29.479064431353593.2033236611669.27574077018653
30573583.270047719643-27.9471389393755590.67709121973210.2700477196431
31620628.06434969233923.7847915293633588.1508587782988.06434969233862
32626633.69524699386733.842152100764584.4626009053697.69524699386716
33620633.52614330004225.6995136675183580.7743430324413.5261433000422
34588588.85972359077911.1796328761253575.9606435330960.859723590778913
35566564.193300024523-3.34024405827524571.146944033752-1.80669997547670
36557548.2722450078870.161753634368499565.566001357745-8.7277549921132
37561558.3241161423413.6908251759214559.985058681737-2.67588385765873
38549547.340253648099-3.75992434092145554.419670692823-1.65974635190128
39532528.74089617112-13.5951788750283548.854282703908-3.2591038288798
40526528.370610021579-20.2371237683152543.8665137467362.37061002157884
41511512.600319641788-29.479064431353538.8787447895651.60031964178836
42499491.200933165474-27.9471389393755534.746205773902-7.79906683452634
43555555.60154171239823.7847915293633530.6136667582390.601541712397761
44565569.06802524099133.842152100764527.0898226582454.06802524099112
45542534.73450777423125.6995136675183523.565978558251-7.26549222576898
46527522.28388687198711.1796328761253520.536480251888-4.71611312801349
47510505.83326211275-3.34024405827524517.506981945525-4.16673788725018
48514512.799773060190.161753634368499515.038473305442-1.20022693981014
49517517.7392101587213.6908251759214512.5699646653580.739210158720766
50508509.259552472559-3.75992434092145510.5003718683621.25955247255939
51493491.164399803662-13.5951788750283508.430779071366-1.83560019633796
52490493.006814649273-20.2371237683152507.2303091190423.00681464927317
53469461.449225264635-29.479064431353506.029839166718-7.55077473536466
54478477.914293660279-27.9471389393755506.032845279096-0.0857063397208435
55528526.17935707916223.7847915293633506.035851391475-1.82064292083828
56534528.0104807967933.842152100764506.147367102446-5.98951920320974
57518504.04160351906525.6995136675183506.258882813417-13.9583964809348
58506494.38943852722611.1796328761253506.430928596649-11.6105614727742
59502500.737269678394-3.34024405827524506.602974379881-1.26273032160589
60516524.8900303160450.161753634368499506.9482160495878.89003031604477
61528545.0157171047863.6908251759214507.29345771929217.0157171047864
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259934206il1e5zf4126vcq7/15j381259934136.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259934206il1e5zf4126vcq7/15j381259934136.ps (open in new window)


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


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


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