Home » date » 2010 » Dec » 20 »

Paper statistiek - decomposition by Loess 3

*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: Mon, 20 Dec 2010 13:25:49 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851475o9arp9030ftft5j.htm/, Retrieved Mon, 20 Dec 2010 14:24:40 +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/2010/Dec/20/t1292851475o9arp9030ftft5j.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
16306977 16307888 16307482 16308869 16311019 16312596 16315238 16319511 16327575 16330818 16331930 16334210 16334715 16335459 16334090 16333559 16334600 16336676 16337253 16342333 16348917 16352678 16352972 16357992 16359133 16362938 16365065 16367596 16371278 16374541 16377339 16383275 16393843 16399139 16401009 16405399 16409106 16414307 16418055 16423337 16428686 16434935 16440452 16449092 16464859 16473709 16479291 16485787 16489042 16495231 16501683 16506782 16513615 16520661 16528400 16538542 16554596 16562317 16568499 16574989
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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
11630697716307832.0173111-2299.1185606716316308421.1012496855.017311051488
21630788816308574.9467278-3013.1507927207116310214.2040649686.946727849543
31630748216307943.4767738-4986.7836539681116312007.3068801461.476773848757
41630886916309605.6732511-5721.8374384478216313854.1641874736.67325108312
51631101916311736.4698659-5399.4913605563716315701.0214946717.469865949824
61631259616312152.5512176-4568.2234437301316317607.6722261-443.448782371357
71631523816314886.233442-3924.5563995997616319514.3229576-351.76655799523
81631951116318157.3276472-596.47865123066616321461.1510041-1353.67235284112
91632757516324417.22204987324.7988996467116323407.9790506-3157.77795019746
101633081816327471.46688268684.257978270916325480.2751391-3346.53311737627
111633193016329029.91253197277.5162404019816327552.5712277-2900.08746805973
121633421016331539.20649627223.0693814413316329657.7241223-2670.79350379109
131633471516339966.2415436-2299.1185606716316331762.87701705251.24154363014
141633545916340205.1794807-3013.1507927207116333725.97131204746.1794806812
151633409016337477.7180469-4986.7836539681116335689.06560703387.71804693528
161633355916335405.3323986-5721.8374384478216337434.50503981846.33239862323
171633460016335419.5468879-5399.4913605563716339179.9444726819.546887941658
181633667616337014.2323888-4568.2234437301316340905.9910549338.232388813049
191633725316335798.5187624-3924.5563995997616342632.0376372-1454.48123761825
201634233316340478.3332964-596.47865123066616344784.1453549-1854.66670363955
211634891716343572.94802787324.7988996467116346936.2530725-5344.05197217129
221635267816346896.88897288684.257978270916349774.8530489-5781.11102716252
231635297216346053.03073437277.5162404019816352613.4530253-6918.96926565655
241635799216352776.92103217223.0693814413316355984.0095865-5215.07896792516
251635913316361210.5524130-2299.1185606716316359354.56614772077.55241296254
261636293816365825.1707247-3013.1507927207116363063.98006802887.17072473653
271636506516368343.3896657-4986.7836539681116366773.39398833278.38966571353
281636759616370320.3228011-5721.8374384478216370593.51463732724.32280113362
291637127816373541.8560742-5399.4913605563716374413.63528642263.85607418232
301637454116375396.045324-4568.2234437301316378254.1781197855.045324010774
311637733916376507.8354465-3924.5563995997616382094.7209531-831.164553463459
321638327516380955.6922115-596.47865123066616386190.7864397-2319.30778845958
331639384316390074.34917407324.7988996467116390286.8519263-3768.65082596242
341639913916394670.5766288684.257978270916394923.1653937-4468.42337200046
351640100916395181.00489857277.5162404019816399559.4788611-5827.99510154314
361640539916398824.59082367223.0693814413316404750.3397949-6574.40917638317
371640910616410569.9178319-2299.1185606716316409941.20072871463.9178319294
381641430716415967.0384242-3013.1507927207116415660.11236851660.03842419200
391641805516419717.7596457-4986.7836539681116421379.02400831662.75964565761
401642333716424859.6610732-5721.8374384478216427536.17636521522.66107320786
411642868616429078.1626384-5399.4913605563716433693.3287222392.162638388574
421643493516434292.7920860-4568.2234437301316440145.4313577-642.207913963124
431644045216438231.0224064-3924.5563995997616446597.5339932-2220.97759361751
441644909216445460.5386879-596.47865123066616453319.9399633-3631.46131208353
451646485916462350.85516697324.7988996467116460042.3459334-2508.14483305998
461647370916471621.19247218684.257978270916467112.5495496-2087.80752789229
471647929116477121.73059387277.5162404019816474182.7531658-2169.26940622926
481648578716482842.57992407223.0693814413316481508.3506946-2944.42007604241
491648904216491549.1703373-2299.1185606716316488833.94822342507.17033729888
501649523116497197.6011167-3013.1507927207116496277.5496761966.60111671872
511650168316504631.6325253-4986.7836539681116503721.15112862948.63252533786
521650678216508317.0217016-5721.8374384478216510968.81573691535.02170155011
531651361516514413.0110154-5399.4913605563716518216.4803452798.011015394703
541652066116520455.8099358-4568.2234437301316525434.4135079-205.190064189956
551652840016528072.2097289-3924.5563995997616532652.3466707-327.790271077305
561653854216537851.4042278-596.47865123066616539829.0744235-690.595772240311
571655459616554861.39892417324.7988996467116547005.8021763265.398924088106
581656231716561803.39685948684.257978270916554146.3451623-513.60314056091
591656849916568433.59561137277.5162404019816561286.8881483-65.4043887145817
601657498916574348.87120347223.0693814413316568406.0594151-640.128796555102
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851475o9arp9030ftft5j/1o3mu1292851546.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851475o9arp9030ftft5j/1o3mu1292851546.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851475o9arp9030ftft5j/2o3mu1292851546.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851475o9arp9030ftft5j/2o3mu1292851546.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851475o9arp9030ftft5j/3yu3x1292851546.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851475o9arp9030ftft5j/3yu3x1292851546.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851475o9arp9030ftft5j/49m301292851546.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t1292851475o9arp9030ftft5j/49m301292851546.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