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 12:50:19 -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/t1259956261nkcrs08xl5p1uon.htm/, Retrieved Fri, 04 Dec 2009 20:51:06 +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/t1259956261nkcrs08xl5p1uon.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 «
5560 3922 3759 4138 4634 3996 4308 4143 4429 5219 4929 5755 5592 4163 4962 5208 4755 4491 5732 5731 5040 6102 4904 5369 5578 4619 4731 5011 5299 4146 4625 4736 4219 5116 4205 4121 5103 4300 4578 3809 5526 4247 3830 4394 4826 4409 4569 4106 4794 3914 3793 4405 4022 4100 4788 3163 3585 3903 4178 3863 4187
 
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
Seasonal611062
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
155606202.81396913073664.804665204744252.38136566453642.81396913073
239223984.28860795912-439.4771537621634299.1885458030562.2886079591171
337593430.52384125353-258.5195671950954345.99572594156-328.476158746468
441383982.33967714975-102.9777790242544396.63810187451-155.660322850251
546344584.75507023861235.9644519539434447.28047780745-49.2449297613912
639963897.41543512960-404.3248431310184498.90940800142-98.5845648704035
743083998.2754876042667.18617420034524550.53833819540-309.724512395741
841433825.70311312112-142.9443205334194603.2412074123-317.296886878884
944294345.53161877847-143.4756954076794655.94407662921-83.4683812215308
1052195318.44792143048396.5433273770634723.0087511924599.4479214304829
1149295054.1646039340113.76197031028794790.0734257557125.164603934014
1257556536.92448260413113.4584410253474859.61707637052781.924482604135
1355925590.03460780992664.804665204744929.16072698534-1.96539219007718
1441633762.24350253943-439.4771537621635003.23365122274-400.756497460575
1549625105.21299173496-258.5195671950955077.30657546014143.212991734956
1652085394.54437561607-102.9777790242545124.43340340818186.544375616074
1747554102.47531668984235.9644519539435171.56023135622-652.524683310165
1844914199.73387056091-404.3248431310185186.59097257011-291.266129439089
1957326195.1921120156667.18617420034525201.62171378399463.19211201566
2057316396.68667589974-142.9443205334195208.25764463367665.686675899745
2150405008.58211992433-143.4756954076795214.89357548335-31.4178800756727
2261026599.03253069364396.5433273770635208.4241419293497.03253069364
2349044592.2833213144713.76197031028795201.95470837524-311.716678685530
2453695461.90645471925113.4584410253475162.635104255492.9064547192493
2555785367.8798346597664.804665204745123.31550013556-210.120165340304
2646194625.20971954571-439.4771537621635052.267434216466.20971954570814
2747314739.30019889775-258.5195671950954981.219368297358.30019889774849
2850115216.06855561586-102.9777790242544908.9092234084205.068555615858
2952995525.43646952661235.9644519539434836.59907851945226.436469526609
3041463926.95403622279-404.3248431310184769.37080690823-219.045963777211
3146254480.6712905026467.18617420034524702.14253529701-144.328709497358
3247364965.77245826953-142.9443205334194649.17186226389229.772458269527
3342193985.27450617691-143.4756954076794596.20118923077-233.72549382309
3451165270.51307364757396.5433273770634564.94359897537154.513073647568
3542053862.5520209697413.76197031028794533.68600871997-342.447979030258
3641213612.45048618198113.4584410253474516.09107279267-508.549513818018
3751035042.69919792989664.804665204744498.49613686537-60.3008020701136
3843004547.7315522841-439.4771537621634491.74560147806247.731552284103
3945784929.52450110435-258.5195671950954484.99506609075351.524501104347
4038093237.03043285023-102.9777790242544483.94734617402-571.969567149769
4155266333.13592178876235.9644519539434482.8996262573807.135921788758
4242474426.66645839021-404.3248431310184471.6583847408179.666458390215
4338303132.3966825753467.18617420034524460.41714322431-697.603317424655
4443944502.55228618428-142.9443205334194428.39203434913108.552286184285
4548265399.10876993372-143.4756954076794396.36692547396573.108769933721
4644094059.34797975417396.5433273770634362.10869286877-349.652020245828
4745694796.3875694261413.76197031028794327.85046026357227.387569426138
4841063796.33813084277113.4584410253474302.20342813188-309.661869157226
4947944646.63893879507664.804665204744276.55639600019-147.361061204925
5039144028.39126154531-439.4771537621634239.08589221686114.391261545305
5137933642.90417876156-258.5195671950954201.61538843353-150.095821238436
5244054763.60867592194-102.9777790242544149.36910310231358.608675921942
5340223710.91273027496235.9644519539434097.12281777109-311.087269725038
5441004558.94866747113-404.3248431310184045.37617565989458.948667471129
5547885515.1842922509767.18617420034523993.62953354868727.18429225097
5631632528.52453533060-142.9443205334193940.41978520282-634.475464669403
5735853426.26565855072-143.4756954076793887.21003685696-158.734341449280
5839033579.10167211883396.5433273770633830.35500050411-323.898327881172
5941784568.7380655384513.76197031028793773.49996415126390.738065538451
6038633898.08067622674113.4584410253473714.4608827479135.0806762267393
6141874053.77353345069664.804665204743655.42180134457-133.226466549306
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956261nkcrs08xl5p1uon/1y0fi1259956216.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956261nkcrs08xl5p1uon/1y0fi1259956216.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956261nkcrs08xl5p1uon/35qzd1259956216.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259956261nkcrs08xl5p1uon/35qzd1259956216.ps (open in new window)


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