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 02:31:00 -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/t1259919115qjjmk53lol2kxt4.htm/, Retrieved Fri, 04 Dec 2009 10:32:00 +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/t1259919115qjjmk53lol2kxt4.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:
ws9.2ld
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2756.76 2849.27 2921.44 2981.85 3080.58 3106.22 3119.31 3061.26 3097.31 3161.69 3257.16 3277.01 3295.32 3363.99 3494.17 3667.03 3813.06 3917.96 3895.51 3801.06 3570.12 3701.61 3862.27 3970.1 4138.52 4199.75 4290.89 4443.91 4502.64 4356.98 4591.27 4696.96 4621.4 4562.84 4202.52 4296.49 4435.23 4105.18 4116.68 3844.49 3720.98 3674.4 3857.62 3801.06 3504.37 3032.6 3047.03 2962.34 2197.82 2014.45 1862.83 1905.41 1810.99 1670.07 1864.44 2052.02 2029.6 2070.83 2293.41 2443.27
 
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
12756.762693.92200592316-58.1500811395732877.74807521641-62.8379940768368
22849.272891.31432851822-104.6485573456392911.8742288274242.0443285182159
32921.442959.15059359670-62.27097603514042946.0003824384437.7105935967043
42981.853014.10359749678-32.20994203318082981.806344536432.2535974967786
53080.583159.92058432331-16.37289095767793017.6123066343779.3405843233104
63106.223206.06423155733-49.45297968994243055.8287481326299.8442315573252
73119.313066.0798504460278.49495992311013094.04518963087-53.2301495539764
83061.262875.70215615761113.2885618398363133.52928200255-185.557843842386
93097.313008.2785281767913.32809744897993173.01337437423-89.0314718232144
103161.693123.67821276784-21.27133113985603220.97311837202-38.011787232163
113257.163216.0479644128529.33917321734943268.93286236980-41.1120355871535
123277.013108.54682009325109.9263648431893335.54681506357-168.463179906755
133295.323246.62931338225-58.1500811395733402.16076775733-48.6906866177551
143363.993366.96243849561-104.6485573456393465.666118850032.97243849561073
153494.173521.43950609241-62.27097603514043529.1714699427327.2695060924125
163667.033784.54028642129-32.20994203318083581.72965561189117.510286421291
173813.064008.20504967663-16.37289095767793634.28784128105195.145049676626
183917.964199.18283730771-49.45297968994243686.19014238224281.222837307707
193895.513974.4325965934778.49495992311013738.0924434834278.922596593472
203801.063693.90688465563113.2885618398363794.92455350453-107.153115344370
213570.123275.1552390253713.32809744897993851.75666352565-294.96476097463
223701.613513.37209257102-21.27133113985603911.11923856883-188.237907428976
233862.273724.7190131706429.33917321734943970.48181361201-137.550986829363
243970.13795.21481497972109.9263648431894035.05882017709-174.885185020281
254138.524235.5542543974-58.1500811395734099.6358267421797.034254397403
264199.754329.73696434581-104.6485573456394174.41159299983129.986964345811
274290.894394.86361677766-62.27097603514044249.18735925748103.973616777656
284443.914609.05564390818-32.20994203318084310.974298125165.145643908178
294502.644648.89165396516-16.37289095767794372.76123699252146.251653965159
304356.984362.63251347962-49.45297968994244400.780466210325.65251347962294
314591.274675.2453446487778.49495992311014428.7996954281283.9753446487712
324696.964858.19237466901113.2885618398364422.43906349115161.232374669014
334621.44813.3934709968413.32809744897994416.07843155418191.993470996838
344562.844769.75656419341-21.27133113985604377.19476694645206.916564193406
354202.524037.3897244439329.33917321734944338.31110233872-165.130275556067
364296.494208.59761258747109.9263648431894274.45602256934-87.8923874125303
374435.234718.00913833961-58.1500811395734210.60094279996282.779138339609
384105.184185.93759006131-104.6485573456394129.0709672843380.757590061311
394116.684248.08998426645-62.27097603514044047.54099176869131.409984266448
403844.493775.76224183499-32.20994203318083945.42770019819-68.7277581650142
413720.983615.01848232998-16.37289095767793843.31440862770-105.961517670018
423674.43687.30162329671-49.45297968994243710.9513563932312.9016232967092
433857.624058.1567359181278.49495992311013578.58830415877200.53673591812
443801.064075.95205667060113.2885618398363412.87938148957274.892056670596
453504.373748.2414437306513.32809744897993247.17045882037243.871443730653
463032.63016.77327129988-21.27133113985603069.69805983998-15.8267287001204
473047.033172.4951659230729.33917321734942892.22566085959125.465165923065
482962.343096.88574465342109.9263648431892717.86789050339134.545744653423
492197.821910.27996099238-58.1500811395732543.51012014719-287.540039007617
502014.451737.41028208074-104.6485573456392396.1382752649-277.039717919263
511862.831539.16454565253-62.27097603514042248.76643038261-323.665454347475
521905.411643.89445558287-32.20994203318082199.13548645031-261.515544417132
531810.991488.84834843967-16.37289095767792149.50454251801-322.141651560333
541670.071278.63752548104-49.45297968994242110.95545420891-391.432474518964
551864.441577.9786741770978.49495992311012072.4063658998-286.461325822912
562052.021948.95027494543113.2885618398362041.80116321474-103.069725054571
572029.62034.6759420213513.32809744897992011.195960529675.07594202135056
582070.832171.62215443148-21.27133113985601991.30917670838100.792154431477
592293.412586.0584338955629.33917321734941971.42239288709292.648433895562
602443.272816.46598177202109.9263648431891960.14765338479373.195981772018
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259919115qjjmk53lol2kxt4/1ba031259919058.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259919115qjjmk53lol2kxt4/1ba031259919058.ps (open in new window)


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


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


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