Home » date » 2009 » Dec » 11 »

workshop 9 - review link 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, 11 Dec 2009 05:08:29 -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/11/t1260533344hfwz9p96b16ezm6.htm/, Retrieved Fri, 11 Dec 2009 13:09:09 +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/11/t1260533344hfwz9p96b16ezm6.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 «
5.4 5.4 5.6 5.7 5.8 5.8 5.8 5.9 6.1 6.4 6.4 6.3 6.2 6.2 6.3 6.4 6.5 6.6 6.6 6.6 6.8 7 7.2 7.3 7.5 7.6 7.6 7.7 7.7 7.7 7.7 7.6 7.7 7.9 7.9 7.9 7.8 7.6 7.4 7 7 7.2 7.5 7.8 7.8 7.7 7.6 7.6 7.5 7.5 7.6 7.6 7.9 7.6 7.5 7.5 7.6 7.7 7.8 7.9 7.9
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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
15.45.270755550163590.03873222161147745.49051222822493-0.129244449836411
25.45.30552276302457-0.06690735057851315.56138458755395-0.0944772369754334
35.65.6357710796415-0.06802802652446155.632256946882960.0357710796415001
45.75.82041221618889-0.1221165816902105.701704365501320.120412216188889
55.85.88505340250394-0.05620518662361815.771151784119680.0850534025039371
65.85.8463446205719-0.08621751985126635.839872899279370.0463446205719009
75.85.76763588840749-0.0762299028465415.90859401443905-0.0323641115925088
85.95.87140361933342-0.04735259441492665.97594897508151-0.0285963806665812
96.16.115171362701230.04152470157480896.043303935723960.015171362701226
106.46.548577399165450.1479003067049646.103522294129580.148577399165453
116.46.481983410745890.1542759367189106.16374065253520.0819834107458881
126.36.234162929317270.1406239687336996.22521310194903-0.0658370706827283
136.26.074582227025670.03873222161147746.28668555136286-0.125417772974332
146.26.11990880383026-0.06690735057851316.34699854674825-0.080091196169736
156.36.26071648439082-0.06802802652446156.40731154213364-0.0392835156091831
166.46.45156671078234-0.1221165816902106.470549870907870.0515667107823417
176.56.52241698694152-0.05620518662361816.53378819968210.0224169869415247
186.66.67007833702601-0.08621751985126636.616139182825250.0700783370260147
196.66.57773973687813-0.0762299028465416.69849016596841-0.0222602631218685
206.66.4462365153384-0.04735259441492666.80111607907653-0.153763484661603
216.86.654733306240540.04152470157480896.90374199218465-0.145266693759458
2276.839774496756760.1479003067049647.01232519653828-0.160225503243245
237.27.124815662389180.1542759367189107.12090840089191-0.0751843376108221
247.37.23440449915310.1406239687336997.2249715321132-0.0655955008469045
257.57.632233115054020.03873222161147747.32903466333450.132233115054024
267.67.84809630197954-0.06690735057851317.418811048598970.248096301979541
277.67.75944059266102-0.06802802652446157.508587433863450.159440592661015
287.77.94725143822806-0.1221165816902107.574865143462150.247251438228062
297.77.81506233356277-0.05620518662361817.641142853060850.115062333562768
307.77.80919209134572-0.08621751985126637.677025428505550.109192091345720
317.77.7633218988963-0.0762299028465417.712908003950240.063321898896298
327.67.53418840060835-0.04735259441492667.71316419380658-0.0658115993916546
337.77.645054914762270.04152470157480897.71342038366292-0.0549450852377262
347.97.971829875332180.1479003067049647.680269817962850.0718298753321838
357.97.99860481101830.1542759367189107.647119252262790.0986048110183022
367.98.049504552269610.1406239687336997.609871478996690.149504552269613
377.87.988644072657940.03873222161147747.572623705730590.188644072657936
387.67.71196162406456-0.06690735057851317.554945726513950.111961624064562
397.47.33076027922715-0.06802802652446157.53726774729732-0.0692397207728535
4076.59666835364326-0.1221165816902107.52544822804695-0.403331646356741
4176.54257647782703-0.05620518662361817.51362870879659-0.457423522172967
427.26.98505328620969-0.08621751985126637.50116423364157-0.214946713790305
437.57.58753014435998-0.0762299028465417.488699758486560.0875301443599827
447.88.15150027743632-0.04735259441492667.495852316978600.351500277436322
457.88.055470422954540.04152470157480897.503004875470650.255470422954541
467.77.716662747080890.1479003067049647.535436946214150.0166627470808889
477.67.477855046323450.1542759367189107.56786901695764-0.122144953676554
487.67.467515496454920.1406239687336997.59186053481139-0.132484503545085
497.57.34541572572340.03873222161147747.61585205266513-0.154584274276603
507.57.44951883867078-0.06690735057851317.61738851190773-0.0504811613292206
517.67.64910305537412-0.06802802652446157.618924971150340.0491030553741183
527.67.70016446242637-0.1221165816902107.621952119263840.100164462426371
537.98.23122591924629-0.05620518662361817.624979267377330.331225919246286
547.67.64833441027575-0.08621751985126637.637883109575510.0483344102757517
557.57.42544295107284-0.0762299028465417.6507869517737-0.0745570489271552
567.57.3840951294973-0.04735259441492667.66325746491762-0.115904870502694
577.67.482747320363650.04152470157480897.67572797806154-0.117252679636353
587.77.565862986185550.1479003067049647.68623670710949-0.134137013814452
597.87.748978627123660.1542759367189107.69674543615743-0.0510213728763418
607.97.952729981484950.1406239687336997.706646049781360.052729981484946
617.98.044721114983250.03873222161147747.716546663405280.144721114983245
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260533344hfwz9p96b16ezm6/10izm1260533306.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260533344hfwz9p96b16ezm6/10izm1260533306.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260533344hfwz9p96b16ezm6/28dkg1260533306.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260533344hfwz9p96b16ezm6/28dkg1260533306.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260533344hfwz9p96b16ezm6/3682m1260533306.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260533344hfwz9p96b16ezm6/3682m1260533306.ps (open in new window)


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