Home » date » 2009 » Dec » 09 »

ws 9 ad

*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: Wed, 09 Dec 2009 12:09:07 -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/09/t1260385785pg130sdd0o3gi60.htm/, Retrieved Wed, 09 Dec 2009 20:09:50 +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/09/t1260385785pg130sdd0o3gi60.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 «
2360 2214 2825 2355 2333 3016 2155 2172 2150 2533 2058 2160 2260 2498 2695 2799 2947 2930 2318 2540 2570 2669 2450 2842 3440 2678 2981 2260 2844 2546 2456 2295 2379 2479 2057 2280 2351 2276 2548 2311 2201 2725 2408 2139 1898 2537 2069 2063 2524 2437 2189 2793 2074 2622 2278 2144 2427 2139 1828 2072 1800 1758 2246 1987 1868 2514 2121
 
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
Seasonal671068
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
123602281.5514081298775.64978935818892362.79880251194-78.448591870132
222142131.27966452141-66.49498480661582363.21532028521-82.7203354785925
328253078.841318848207.5268430935292363.63183805847253.841318847997
423552294.4163547557150.49557786805832365.08806737624-60.5836452442941
523332282.4912920943016.96441121169702366.544296694-50.5087079056957
630163289.79323565683372.4224502444462369.78431409873273.793235656828
721551992.92793146126-55.95226296470832373.02433150345-162.072068538745
821722121.98289482621-155.3225154418162377.33962061561-50.017105173792
921502038.73657830859-120.3914880363512381.65490972776-111.263421691414
1025332598.4561218189874.14538439803342393.3984937829865.4561218189838
1120582007.77573183094-296.9178096691382405.1420778382-50.2242681690636
1221601991.78839596133-102.1253357324212430.33693977109-168.211604038674
1322601988.8184089378275.64978935818892455.53180170399-271.181591062177
1424982579.71684285455-66.49498480661582482.7781419520681.7168428545524
1526952672.44867470633207.5268430935292510.02448220014-22.551325293668
1627993005.6010465369650.49557786805832541.90337559498206.601046536962
1729473303.2533197984816.96441121169702573.78226898982356.253319798482
1829302869.29183725825372.4224502444462618.2857124973-60.708162741746
1923182029.16310695993-55.95226296470832662.78915600478-288.836893040071
2025402540.39166535727-155.3225154418162694.930850084550.391665357265538
2125702533.31894387203-120.3914880363512727.07254416432-36.6810561279726
2226692533.7303477228474.14538439803342730.12426787913-135.269652277159
2324502463.74181807521-296.9178096691382733.1759915939313.7418180752088
2428423065.3671341064-102.1253357324212720.75820162602223.367134106401
2534404096.009798983775.64978935818892708.34041165811656.0097989837
2626782732.80335096437-66.49498480661582689.6916338422554.8033509643687
2729813083.43030088009207.5268430935292671.04285602638102.430300880087
2822601833.6848869363850.49557786805832635.81953519556-426.315113063617
2928443070.4393744235716.96441121169702600.59621436474226.439374423568
3025462167.10350686122372.4224502444462552.47404289434-378.896493138783
3124562463.60039154077-55.95226296470832504.351871423947.60039154077049
3222952281.24172551380-155.3225154418162464.08078992801-13.7582744861970
3323792454.58177960426-120.3914880363512423.8097084320975.5817796042606
3424792481.9572114731774.14538439803342401.89740412882.9572114731659
3520572030.93270984363-296.9178096691382379.98509982551-26.0672901563739
3622802295.93346036070-102.1253357324212366.1918753717215.9334603607017
3723512273.9515597238875.64978935818892352.39865091793-77.0484402761163
3822762279.10943257569-66.49498480661582339.385552230923.10943257569079
3925482562.10070336255207.5268430935292326.3724535439214.1007033625478
4023112254.4272678623850.49557786805832317.07715426956-56.5727321376189
4122012077.2537337931016.96441121169702307.7818549952-123.746266206896
4227252771.62561130557372.4224502444462305.9519384499846.6256113055701
4324082567.83024105994-55.95226296470832304.12202190477159.830241059939
4421392125.993776949-155.3225154418162307.32873849282-13.0062230510016
4518981605.85603295548-120.3914880363512310.53545508087-292.143967044517
4625372686.4594153088474.14538439803342313.39520029312149.459415308842
4720692118.66286416376-296.9178096691382316.2549455053849.6628641637562
4820631912.17715692547-102.1253357324212315.94817880695-150.822843074529
4925242656.7087985332975.64978935818892315.64141210852132.708798533293
5024372623.65330465633-66.49498480661582316.84168015028186.653304656334
5121891852.43120871443207.5268430935292318.04194819205-336.568791285575
5227933222.2545365401550.49557786805832313.24988559179429.254536540152
5320741822.5777657967716.96441121169702308.45782299153-251.422234203230
5426222586.68177749546372.4224502444462284.89577226010-35.3182225045416
5522782350.61854143605-55.95226296470832261.3337215286672.6185414360502
5621442218.12428174248-155.3225154418162225.1982336993474.1242817424759
5724272785.32874216633-120.3914880363512189.06274587002358.328742166327
5821392048.7114142334574.14538439803342155.14320136852-90.288585766552
5918281831.69415280212-296.9178096691382121.223656867013.69415280212388
6020722147.57876318363-102.1253357324212098.5465725487975.578763183627
6118001448.4807224112475.64978935818892075.86948823057-351.519277588762
6217581529.83615640349-66.49498480661582052.65882840313-228.163843596513
6322462255.02498833079207.5268430935292029.448168575689.02498833078653
6419871916.8766666503050.49557786805832006.62775548164-70.1233333496953
6518681735.2282464007116.96441121169701983.80734238759-132.771753599287
6625142692.07489318326372.4224502444461963.50265657230178.074893183255
6721212354.7542922077-55.95226296470831943.19797075701233.754292207702
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260385785pg130sdd0o3gi60/16gk01260385744.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260385785pg130sdd0o3gi60/16gk01260385744.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260385785pg130sdd0o3gi60/2rv5m1260385744.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260385785pg130sdd0o3gi60/2rv5m1260385744.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/09/t1260385785pg130sdd0o3gi60/3r9081260385744.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/09/t1260385785pg130sdd0o3gi60/3r9081260385744.ps (open in new window)


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