Home » date » 2009 » Dec » 04 »

WorkShop9 (SHW)

*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 07:52:37 -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/t1259938386d7aec3dlfl17v71.htm/, Retrieved Fri, 04 Dec 2009 15:53:11 +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/t1259938386d7aec3dlfl17v71.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 «
101.3 106.3 94 102.8 102 105.1 92.4 81.4 105.8 120.3 100.7 88.8 94.3 99.9 103.4 103.3 98.8 104.2 91.2 74.7 108.5 114.5 96.9 89.6 97.1 100.3 122.6 115.4 109 129.1 102.8 96.2 127.7 128.9 126.5 119.8 113.2 114.1 134.1 130 121.8 132.1 105.3 103 117.1 126.3 138.1 119.5 138 135.5 178.6 162.2 176.9 204.9 132.2 142.5 164.3 174.9 175.4 143
 
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
1101.3108.507492755687-5.1094649703389599.20197221465187.20749275568718
2106.3117.026239774926-3.7286564413877699.302416666461410.7262397749263
39478.064986977146610.532151904582499.402861118271-15.9350130228534
4102.8100.0411187461376.0726583956355999.4862228582277-2.75888125386329
5102100.0572570371414.3731583646749999.5695845981843-1.94274296285934
6105.193.612985769139317.009780603250999.5772336276099-11.4870142308607
792.499.2487034307068-14.033586087742299.58488265703546.84870343070683
881.483.4696606310588-20.270319627064999.60065899600612.06966063105877
9105.8108.1506114139573.8329532510661099.6164353349772.35061141395698
10120.3130.10609957463710.678043776724699.81585664863799.80609957463747
11100.797.62157986707523.76314217062593100.015277962299-3.07842013292480
1288.891.0134094270464-13.119868864689299.70645943764282.21340942704643
1394.394.3118240573522-5.1094649703389599.39764091298670.0118240573522002
1499.9104.530358502593-3.7286564413877698.9982979387954.63035850259283
15103.497.668893130814610.532151904582498.5989549646031-5.73110686918545
16103.3102.1561579170156.0726583956355998.3711836873494-1.14384208298495
1798.895.08342922522944.3731583646749998.1434124100956-3.7165707747706
18104.293.173070520922217.009780603250998.217148875827-11.0269294790778
1991.298.142700746184-14.033586087742298.29088534155836.94270074618395
2074.770.7750600005025-20.270319627064998.8952596265624-3.9249399994975
21108.5113.6674128373673.8329532510661099.49963391156655.16741283736737
22114.5117.71412315989810.6780437767246100.6078330633783.21412315989781
2396.988.32082561418553.76314217062593101.716032215189-8.5791743858145
2489.689.2777833800191-13.1198688646892103.04208548467-0.322216619980892
2597.194.9413262161873-5.10946497033895104.368138754152-2.15867378381273
26100.398.4500179812127-3.72865644138776105.878638460175-1.84998201878729
27122.6127.27870992921910.5321519045824107.3891381661984.67870992921922
28115.4115.4869242865106.07265839563559109.2404173178550.0869242865097704
29109102.5351451658144.37315836467499111.091696469511-6.46485483418589
30129.1128.17816331881917.0097806032509113.012056077930-0.921836681180608
31102.8104.701170401394-14.0335860877422114.9324156863491.90117040139361
3296.296.234577120422-20.2703196270649116.4357425066430.034577120422
33127.7133.6279774219973.83295325106610117.9390693269375.92797742199667
34128.9128.14792604662710.6780437767246118.974030176648-0.752073953373
35126.5129.2278668030153.76314217062593120.0089910263602.72786680301455
36119.8132.206139627267-13.1198688646892120.51372923742212.4061396272674
37113.2110.490997521855-5.10946497033895121.018467448484-2.70900247814527
38114.1110.992781544017-3.72865644138776120.935874897371-3.10721845598346
39134.1136.81456574915910.5321519045824120.8532823462582.71456574915946
40130133.1660019140716.07265839563559120.7613396902943.16600191407082
41121.8118.5574446009964.37315836467499120.669397034329-3.24255539900399
42132.1125.82788418581517.0097806032509121.362335210934-6.27211581418509
43105.3102.578312700203-14.0335860877422122.055273387539-2.72168729979724
44103102.102548456977-20.2703196270649124.167771170087-0.89745154302257
45117.1104.0867777962983.83295325106610126.280268952635-13.0132222037016
46126.3112.00927226073910.6780437767246129.912683962536-14.2907277392609
47138.1138.8917588569373.76314217062593133.5450989724370.79175885693698
48119.5114.098265011494-13.1198688646892138.021603853195-5.40173498850555
49138138.611356236386-5.10946497033895142.4981087339520.611356236386456
50135.5128.066789579828-3.72865644138776146.661866861560-7.43321042017206
51178.6195.84222310625010.5321519045824150.82562498916717.2422231062505
52162.2165.0050576873516.07265839563559153.3222839170132.80505768735139
53176.9193.6078987904664.37315836467499155.81894284485916.7078987904662
54204.9234.63585968001217.0097806032509158.15435971673729.7358596800124
55132.2117.943809499128-14.0335860877422160.489776588615-14.2561905008724
56142.5142.674240643338-20.2703196270649162.5960789837260.174240643338408
57164.3160.0646653700963.83295325106610164.702381378838-4.23533462990446
58174.9172.60507703986710.6780437767246166.516879183408-2.29492296013302
59175.4178.7054808413963.76314217062593168.3313769879783.30548084139571
60143129.183759162283-13.1198688646892169.936109702407-13.8162408377173
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259938386d7aec3dlfl17v71/101uw1259938355.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259938386d7aec3dlfl17v71/101uw1259938355.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259938386d7aec3dlfl17v71/23pcs1259938355.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259938386d7aec3dlfl17v71/23pcs1259938355.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259938386d7aec3dlfl17v71/39c1w1259938355.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259938386d7aec3dlfl17v71/39c1w1259938355.ps (open in new window)


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