Home » date » 2010 » Dec » 20 »

Paper statistiek - decomposition by Loess 2

*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:24:00 +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/t12928513283dwfpxid0d0o42c.htm/, Retrieved Mon, 20 Dec 2010 14:22:13 +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/t12928513283dwfpxid0d0o42c.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 «
48 49 59 56 47 56 50 54 79 50 54 56 50 46 47 43 52 48 36 41 34 37 37 34 55 37 27 38 43 26 32 29 41 55 50 30 35 29 22 39 24 38 30 31 39 33 57 49 74 74 115 67 51 114 70 73 77 67 60 73
 
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
14840.52351015405834.5389837875004550.9375060584412-7.47648984594167
24947.706743987445-1.2551160123423251.5483720248974-1.29325601255504
35960.48998827696635.3507737316802352.15923799135351.48998827696627
45659.34200284187570.027658546450933452.63033861167343.34200284187571
54745.9940282550252-5.0954674870184253.1014392319932-1.00597174497478
65650.94461898873457.6317346668709153.4236463443946-5.05538101126552
75051.6951757399989-5.4410291967949653.7458534567961.69517573999894
85458.0969022070982-4.0312256246646753.93432341756654.09690220709817
979100.0986311575273.7785754641356154.12279337833721.0986311575274
105048.6160729127785-2.3857212410172153.7696483282387-1.38392708722149
115454.33352551627410.24997120558546953.41650327814040.333525516274136
125662.9623844100522-3.3691514551126252.40676704506046.96238441005222
135044.06398540051924.5389837875004551.3970308119804-5.93601459948084
144643.5002841969141-1.2551160123423249.7548318154283-2.49971580308594
154740.53659344944365.3507737316802348.1126328188761-6.46340655055636
164339.6075475168910.027658546450933446.364793936658-3.39245248310897
175264.4785124325785-5.0954674870184244.616955054439912.4785124325785
184844.83744339657557.6317346668709143.5308219365536-3.16255660342454
193634.9963403781276-5.4410291967949642.4446888186673-1.00365962187237
204144.4354343302562-4.0312256246646741.59579129440853.43543433025615
213423.47453076571473.7785754641356140.7468937701497-10.5254692342853
223736.5251065417862-2.3857212410172139.860614699231-0.474893458213792
233734.77569316610220.24997120558546938.9743356283123-2.22430683389776
243433.2677183167266-3.3691514551126238.101433138386-0.732281683273364
255568.23248556403994.5389837875004537.228530648459713.2324855640399
263738.335365496476-1.2551160123423236.91975051586631.33536549647597
272712.03825588504685.3507737316802336.610970383273-14.9617441149532
283839.03860050455400.027658546450933436.93374094899511.03860050455395
294353.8389559723012-5.0954674870184237.256511514717210.8389559723012
30266.973538837676467.6317346668709137.3947264954526-19.0264611623235
313231.9080877206069-5.4410291967949637.5329414761880-0.0919122793930782
322924.86974366952-4.0312256246646737.1614819551447-4.13025633048001
334141.43140210176313.7785754641356136.79002243410130.431402101763069
345576.0190378870338-2.3857212410172136.366683353983421.0190378870338
355063.8066845205490.24997120558546935.943344273865513.8066845205490
363027.8251849818526-3.3691514551126235.5439664732601-2.17481501814743
373530.31642753984494.5389837875004535.1445886726546-4.68357246015507
382924.6283680704460-1.2551160123423234.6267479418963-4.37163192955396
39224.540319057181845.3507737316802334.1089072111379-17.4596809428182
403944.01770521110990.027658546450933433.95463624243925.01770521110991
412419.2951022132780-5.0954674870184233.8003652737404-4.70489778672195
423832.88635137891057.6317346668709135.4819139542186-5.11364862108949
433028.2775665620982-5.4410291967949637.1634626346968-1.7224334379018
443124.9370552248145-4.0312256246646741.0941703998502-6.06294477518555
453929.19654637086073.7785754641356145.0248781650037-9.8034536291393
463318.8403056546883-2.3857212410172149.5454155863289-14.1596943453117
475759.68407578676050.24997120558546954.06595300765412.68407578676047
484942.8443941850867-3.3691514551126258.5247572700259-6.15560581491329
497480.47745468010184.5389837875004562.98356153239786.47745468010179
507482.4969203993624-1.2551160123423266.758195612988.49692039936237
51115154.1163965747585.3507737316802370.532829693562139.1163965747576
526762.46103377483250.027658546450933471.5113076787166-4.53896622516754
535134.6056818231474-5.0954674870184272.4897856638711-16.3943181768526
54114147.1125619587907.6317346668709173.255703374338833.1125619587903
557071.4194081119885-5.4410291967949674.02162108480651.41940811198847
567375.4866207060429-4.0312256246646774.54460491862182.48662070604286
577775.15383578342723.7785754641356175.0675887524371-1.84616421657276
586761.1181064603879-2.3857212410172175.2676147806293-5.88189353961214
596044.2823879855930.24997120558546975.4676408088215-15.717612014407
607373.9373510247025-3.3691514551126275.43180043041020.937351024702451
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928513283dwfpxid0d0o42c/1colh1292851437.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/20/t12928513283dwfpxid0d0o42c/1colh1292851437.ps (open in new window)


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


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


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