Home » date » 2009 » Dec » 04 »

workshop 9 - ad hoc 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, 04 Dec 2009 03:27: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/04/t1259922511z12es6e9mkt74pp.htm/, Retrieved Fri, 04 Dec 2009 11:28:36 +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/t1259922511z12es6e9mkt74pp.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 «
8,6 8,5 8,3 7,8 7,8 8 8,6 8,9 8,9 8,6 8,3 8,3 8,3 8,4 8,5 8,4 8,6 8,5 8,5 8,4 8,5 8,5 8,5 8,5 8,5 8,5 8,5 8,5 8,6 8,4 8,1 8 8 8 8 7,9 7,8 7,8 7,9 8,1 8 7,6 7,3 7 6,8 7 7,1 7,2 7,1 6,9 6,7 6,7 6,6 6,9 7,3 7,5 7,3 7,1 6,9 7,1
 
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
18.68.89174879544010.05725915588528938.250992048674620.291748795440094
28.58.692930968602660.03438453887267638.272684492524660.19293096860266
38.38.294113102554720.01150996107056508.29437693637471-0.00588689744527926
47.87.33852292359227-0.05276969686518138.3142467732729-0.461477076407725
57.87.28293282305083-0.01704943322193038.3341166101711-0.517067176949167
687.69397509708618-0.04284449643283178.34886939934665-0.306024902913816
78.68.785017501823250.05136030965454948.36362218852220.185017501823252
88.99.35331226219750.06799299368406788.378694744118430.453312262197498
98.99.381606774238540.02462592604679458.393767299714670.481606774238536
108.68.79343434441067-0.01981186950986588.42637752509920.193434344410671
118.38.22526192765297-0.08424967813668938.45898775048372-0.0747380723470314
128.38.1578136582686-0.03040772354952848.47259406528094-0.142186341731406
138.38.056540464036560.05725915588528938.48620038007815-0.243459535963437
148.48.292558632989560.03438453887267638.47305682813777-0.107441367010443
158.58.528576762732050.01150996107056508.459913276197390.0285767627320492
168.48.39670194117588-0.05276969686518138.4560677556893-0.00329805882411804
178.68.76482719804071-0.01704943322193038.452222235181220.164827198040713
188.58.57913037608005-0.04284449643283178.463714120352780.0791303760800517
198.58.47343368482110.05136030965454948.47520600552435-0.0265663151788953
208.48.249197101957670.06799299368406788.48280990435826-0.150802898042333
218.58.484960270761020.02462592604679458.49041380319218-0.0150397292389783
228.58.52773216250104-0.01981186950986588.492079707008820.0277321625010423
238.58.59050406731123-0.08424967813668938.493745610825460.090504067311226
248.58.54543280136111-0.03040772354952848.484974922188420.0454328013611107
258.58.466536610563340.05725915588528938.47620423355137-0.0334633894366583
268.58.51830279163170.03438453887267638.447312669495630.0183027916316956
278.58.570068933489550.01150996107056508.418421105439890.0700689334895461
288.58.67941164323185-0.05276969686518138.373358053633330.17941164323185
298.68.88875443139515-0.01704943322193038.328295001826770.288754431395155
308.48.56888171093395-0.04284449643283178.273962785498880.168881710933949
318.17.929009121174460.05136030965454948.21963056917099-0.170990878825542
3287.770403285315270.06799299368406788.16160372100066-0.229596714684727
3387.871797201122880.02462592604679458.10357687283033-0.12820279887712
3487.96677192393867-0.01981186950986588.0530399455712-0.0332280760613308
3588.08174665982462-0.08424967813668938.002503018312070.0817466598246241
367.97.87877386390164-0.03040772354952847.95163385964789-0.0212261360983597
377.87.6419761431310.05725915588528937.90076470098371-0.158023856869000
387.87.736212440238790.03438453887267637.82940302088854-0.0637875597612139
397.98.030448698136070.01150996107056507.758041340793360.130448698136072
408.18.58010261060897-0.05276969686518137.672667086256210.480102610608968
4188.42975660150287-0.01704943322193037.587292831719060.429756601502866
427.67.73662298309183-0.04284449643283177.5062215133410.136622983091835
437.37.123489495382520.05136030965454947.42515019496293-0.176510504617479
4476.59474729197090.06799299368406787.33725971434503-0.405252708029095
456.86.326004840226080.02462592604679457.24936923372712-0.473995159773919
4676.86307422029934-0.01981186950986587.15673764921053-0.136925779700659
477.17.22014361344276-0.08424967813668937.064106064693930.120143613442764
487.27.4153139941659-0.03040772354952847.015093729383630.215313994165901
497.17.176659450041380.05725915588528936.966081394073330.0766594500413822
506.96.794523759628560.03438453887267636.97109170149877-0.105476240371444
516.76.412388030005230.01150996107056506.97610200892421-0.287611969994771
526.76.45580891673688-0.05276969686518136.9969607801283-0.244191083263125
536.66.19922988188952-0.01704943322193037.0178195513324-0.400770118110476
546.96.8087482226009-0.04284449643283177.03409627383193-0.0912517773990995
557.37.4982666940140.05136030965454947.050372996331460.198266694013994
567.57.861109274049030.06799299368406787.07089773226690.361109274049025
577.37.483951605750850.02462592604679457.091422468202360.183951605750848
587.17.10401487542067-0.01981186950986587.115796994089190.00401487542067436
596.96.74407815816067-0.08424967813668937.14017151997602-0.155921841839334
607.17.06458363025804-0.03040772354952847.16582409329149-0.0354163697419576
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922511z12es6e9mkt74pp/1fznq1259922447.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259922511z12es6e9mkt74pp/1fznq1259922447.ps (open in new window)


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


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


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