Home » date » 2009 » Dec » 04 »

*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 15:43:34 -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/t1259966663284tfbhcbboglaz.htm/, Retrieved Fri, 04 Dec 2009 23:44:29 +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/t1259966663284tfbhcbboglaz.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 «
102.80 118.72 119.01 118.61 120.43 111.83 116.79 131.71 120.57 117.83 130.80 107.46 112.09 129.47 119.72 134.81 135.80 129.27 126.94 153.45 121.86 133.47 135.34 117.10 120.65 132.49 137.60 138.69 125.53 133.09 129.08 145.94 129.07 139.69 142.09 137.29 127.03 137.25 156.87 150.89 139.14 158.30 149.00 158.36 168.06 153.38 173.86 162.47 145.17 168.89 166.64 140.07 128.84 123.40 120.30 129.66 118.12 113.91 131.09 119.14 115.33
 
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
Seasonal611062
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1102.8100.730437281045-9.52924700828724114.398809727242-2.0695627189546
2118.72118.2951253429854.00099912636879115.143875530647-0.424874657015451
3119.01115.6648155842886.46624308166065115.888941334051-3.3451844157121
4118.61117.6500462453122.98816439412893116.581789360560-0.9599537546885
5120.43127.387287294083-3.80192468115108117.2746373870686.9572872940834
6111.83108.502347789227-2.78968603829151117.947338249065-3.32765221077318
7116.79120.723418138360-5.7634572494219118.6200391110623.93341813836021
8131.71134.5290475108839.5757376383294119.3152148507872.81904751088346
9120.57123.904680777724-2.77507136823657120.0103905905133.33468077772400
10117.83117.307752114046-2.42828871218015120.780536598134-0.522247885953689
11130.8131.2708315649828.77848582926247121.5506826057550.470831564982433
12107.4696.9806842126412-4.72195435127229122.661270138631-10.4793157873588
13112.09109.937389336780-9.52924700828724123.771857671507-2.15261066321986
14129.47129.9136798431434.00099912636879125.0253210304880.4436798431433
15119.72106.6949725288716.46624308166065126.278784389469-13.0250274711293
16134.81139.2508739636922.98816439412893127.3809616421794.44087396369208
17135.8146.918785786262-3.80192468115108128.48313889488911.1187857862618
18129.27132.034985151205-2.78968603829151129.2947008870872.76498515120474
19126.94129.537194370138-5.7634572494219130.1062628792842.59719437013757
20153.45166.7791465649359.5757376383294130.54511579673613.3291465649346
21121.86115.511102654049-2.77507136823657130.983968714188-6.34889734595103
22133.47138.320182287418-2.42828871218015131.0481064247624.85018228741802
23135.34130.7892700354018.77848582926247131.112244135337-4.55072996459914
24117.1107.909904312669-4.72195435127229131.012050038604-9.19009568733132
25120.65119.917391066417-9.52924700828724130.911855941871-0.732608933583293
26132.49129.8694991863164.00099912636879131.109501687315-2.62050081368412
27137.6137.4266094855796.46624308166065131.307147432760-0.173390514420845
28138.69142.4225476065042.98816439412893131.9692879993673.73254760650428
29125.53122.230496115178-3.80192468115108132.631428565973-3.29950388482229
30133.09135.469631542479-2.78968603829151133.5000544958132.37963154247890
31129.08129.55477682377-5.7634572494219134.3686804256520.47477682377010
32145.94147.0490714830039.5757376383294135.2551908786681.10907148300268
33129.07124.773370036553-2.77507136823657136.141701331684-4.29662996344746
34139.69144.552552365300-2.42828871218015137.2557363468814.86255236529951
35142.09137.0317428086608.77848582926247138.369771362077-5.05825719133972
36137.29139.400611369349-4.72195435127229139.9013429819232.11061136934947
37127.03122.156332406519-9.52924700828724141.432914601768-4.87366759348117
38137.25127.1774898410234.00099912636879143.321511032608-10.0725101589772
39156.87162.0636494548916.46624308166065145.2101074634485.19364945489087
40150.89151.3935889697972.98816439412893147.3982466360740.503588969796908
41139.14132.495538872451-3.80192468115108149.586385808700-6.64446112754871
42158.3167.625751152026-2.78968603829151151.7639348862669.32575115202576
43149149.821973285590-5.7634572494219153.9414839638320.82197328559019
44158.36151.6297542224439.5757376383294155.514508139227-6.73024577755672
45168.06181.807539053614-2.77507136823657157.08753231462313.7475390536136
46153.38152.177205729211-2.42828871218015157.011082982969-1.20279427078859
47173.86182.0068805194238.77848582926247156.9346336513158.146880519423
48162.47174.624368500286-4.72195435127229155.03758585098712.1543685002856
49145.17146.728708957628-9.52924700828724153.1405380506591.55870895762843
50168.89183.8946452585334.00099912636879149.88435561509815.0046452585334
51166.64180.1855837388036.46624308166065146.62817317953713.5455837388025
52140.07134.2671641075562.98816439412893142.884671498315-5.80283589244411
53128.84122.340754864058-3.80192468115108139.141169817093-6.4992451359424
54123.4113.750694660752-2.78968603829151135.838991377540-9.64930533924806
55120.3113.826644311436-5.7634572494219132.536812937986-6.47335568856379
56129.66120.5180865770579.5757376383294129.226175784614-9.14191342294332
57118.12113.099532736994-2.77507136823657125.915538631242-5.02046726300554
58113.91107.562077028893-2.42828871218015122.686211683287-6.34792297110727
59131.09133.9446294354058.77848582926247119.4568847353332.85462943540483
60119.14126.579900657496-4.72195435127229116.4220536937767.43990065749605
61115.33126.802024356067-9.52924700828724113.38722265222011.4720243560675
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259966663284tfbhcbboglaz/1odql1259966612.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259966663284tfbhcbboglaz/1odql1259966612.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259966663284tfbhcbboglaz/4jau21259966612.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259966663284tfbhcbboglaz/4jau21259966612.ps (open in new window)


 
Parameters (Session):
par1 = 36 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = MA ; par7 = 0.95 ;
 
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