Home » date » 2009 » Dec » 03 »

*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: Thu, 03 Dec 2009 10:04:54 -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/03/t125986003386hxarmwr8ddrgj.htm/, Retrieved Thu, 03 Dec 2009 18:07:18 +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/03/t125986003386hxarmwr8ddrgj.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 «
115.6 111.9 107 107.1 100.6 99.2 108.4 103 99.8 115 90.8 95.9 114.4 108.2 112.6 109.1 105 105 118.5 103.7 112.5 116.6 96.6 101.9 116.5 119.3 115.4 108.5 111.5 108.8 121.8 109.6 112.2 119.6 104.1 105.3 115 124.1 116.8 107.5 115.6 116.2 116.3 119 111.9 118.6 106.9 103.2 118.6 118.7 102.8 100.6 94.9 94.5 102.9 95.3 92.5 102.7 91.5 89.5
 
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
Seasonal601061
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1115.6118.2511189253537.15098127132412105.7978998033232.65111892535323
2111.9110.4929455191797.72013802187104105.586916458950-1.40705448082137
3107106.2747701263392.34929675908322105.375933114578-0.72522987366122
4107.1110.949655013092-1.95277965494508105.2031246418533.84965501309193
5100.699.1045324759887-2.93484864511705105.030316169128-1.49546752401126
699.297.1332182235113-3.62819156370390104.894973340193-2.06678177648868
7108.4106.7419032391035.29846624963986104.759630511257-1.65809676089675
8103103.289978906677-1.94657147815202104.6565925714750.289978906677305
999.897.1180507316206-2.07160536331314104.553554631693-2.6819492683794
10115118.3323137570506.96989384764446104.6977923953063.33231375704953
1190.885.9865724301123-9.22860258903177104.842030158919-4.81342756988774
1295.994.1812345256804-7.72617379393264105.344939268252-1.71876547431962
13114.4115.8011703510917.15098127132412105.8478483775851.40117035109087
14108.2102.2360120691577.72013802187104106.443849908972-5.96398793084268
15112.6115.8108518005592.34929675908322107.0398514403583.21085180055852
16109.1112.563879462311-1.95277965494508107.5889001926353.46387946231056
17105104.796899700206-2.93484864511705108.137948944911-0.203100299793761
18105105.046436602757-3.62819156370390108.5817549609470.0464366027573959
19118.5122.6759727733785.29846624963986109.0255609769824.17597277337792
20103.799.99437653913-1.94657147815202109.352194939022-3.70562346086997
21112.5117.392776462251-2.07160536331314109.6788289010624.89277646225136
22116.6116.2875674478856.96989384764446109.942538704470-0.312432552114686
2396.692.222354081153-9.22860258903177110.206248507879-4.37764591884692
24101.9101.003126078593-7.72617379393264110.523047715340-0.896873921406979
25116.5115.0091718058757.15098127132412110.839846922801-1.49082819412467
26119.3119.6915084908037.72013802187104111.1883534873260.391508490803091
27115.4116.9138431890662.34929675908322111.5368600518511.51384318906561
28108.5107.054564975781-1.95277965494508111.898214679164-1.44543502421936
29111.5113.675279338639-2.93484864511705112.2595693064782.1752793386393
30108.8108.705180083399-3.62819156370390112.523011480305-0.094819916600784
31121.8125.5150800962285.29846624963986112.7864536541323.71508009622849
32109.6108.245556740245-1.94657147815202112.901014737907-1.35444325975536
33112.2113.45602954163-2.07160536331314113.0155758216831.25602954163004
34119.6119.1079278634416.96989384764446113.122178288914-0.492072136558832
35104.1104.199821832886-9.22860258903177113.2287807561460.0998218328861071
36105.3104.905960269887-7.72617379393264113.420213524046-0.394039730113363
37115109.2373724367307.15098127132412113.611646291946-5.76262756327046
38124.1126.6288906199967.72013802187104113.8509713581332.52889061999581
39116.8117.1604068165972.34929675908322114.090296424320.360406816596836
40107.5102.673854952032-1.95277965494508114.278924702913-4.82614504796784
41115.6119.667295663611-2.93484864511705114.4675529815064.06729566361112
42116.2121.531825126215-3.62819156370390114.4963664374895.33182512621457
43116.3112.7763538568875.29846624963986114.525179893473-3.52364614311261
44119125.835198832755-1.94657147815202114.1113726453976.83519883275538
45111.9112.174039965993-2.07160536331314113.6975653973210.2740399659926
46118.6117.6076280716986.96989384764446112.622478080657-0.992371928301807
47106.9111.481211825038-9.22860258903177111.5473907639944.58121182503764
48103.2104.144129769601-7.72617379393264109.9820440243310.944129769601176
49118.6121.6323214440077.15098127132412108.4166972846693.03232144400707
50118.7122.9641545859417.72013802187104106.7157073921884.26415458594079
51102.898.23598574120932.34929675908322105.014717499708-4.56401425879073
52100.699.4712235795372-1.95277965494508103.681556075408-1.12877642046283
5394.990.3864539940087-2.93484864511705102.348394651108-4.51354600599127
5494.591.5313425101831-3.62819156370390101.096849053521-2.96865748981691
55102.9100.6562302944275.2984662496398699.8453034559333-2.24376970557316
5695.393.9251357726871-1.9465714781520298.621435705465-1.37486422731286
5792.589.6740374083167-2.0716053633131497.3975679549964-2.82596259168329
58102.7102.1889797292126.9698938476444696.2411264231432-0.51102027078764
5991.597.1439176977418-9.2286025890317795.084684891295.64391769774181
6089.592.72637874439-7.7261737939326493.99979504954273.22637874438996
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t125986003386hxarmwr8ddrgj/1zz561259859891.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t125986003386hxarmwr8ddrgj/1zz561259859891.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t125986003386hxarmwr8ddrgj/2w09m1259859891.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t125986003386hxarmwr8ddrgj/2w09m1259859891.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t125986003386hxarmwr8ddrgj/3yax01259859891.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t125986003386hxarmwr8ddrgj/3yax01259859891.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t125986003386hxarmwr8ddrgj/450q81259859891.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t125986003386hxarmwr8ddrgj/450q81259859891.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