Home » date » 2010 » Dec » 21 »

loess

*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: Tue, 21 Dec 2010 22:47:13 +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/21/t1292971693vc7ppbi84owl8qe.htm/, Retrieved Tue, 21 Dec 2010 23:48: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/21/t1292971693vc7ppbi84owl8qe.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 «
10570 10297 10635 10872 10296 10383 10431 10574 10653 10805 10872 10625 10407 10463 10556 10646 10702 11353 11346 11451 11964 12574 13031 13812 14544 14931 14886 16005 17064 15168 16050 15839 15137 14954 15648 15305 15579 16348 15928 16171 15937 15713 15594 15683 16438 17032 17696 17745 19394 20148 20108 18584 18441 18391 19178 18079 18483 19644 19195 19650 20830 23595 22937 21814 21928 21777 21383 21467 22052 22680 24320 24977 25204
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Seasonal Decomposition by Loess - Parameters
ComponentWindowDegreeJump
Seasonal731074
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
11057010544.0730003107409.29150031893910186.6354993704-25.9269996893363
2102979520.8947204384819.5399708132210253.5653087484-776.105279561592
31063510433.8292126975515.67566917611410320.4951181264-201.170787302466
41087211184.3366913145185.76809155097110373.8952171345312.336691314506
51029610103.177650996461.527032860902610427.2953161427-192.822349003598
61038310657.9527162985-361.28983982987410469.3371235314274.952716298470
71043110671.3937846642-320.77271558426810511.3789309201240.393784664153
81057411241.8340856823-643.35759762142610549.5235119392667.83408568225
91065311263.7743651553-545.44245811354310587.6680929582610.774365155308
101080511263.1429459414-251.20143470655910598.0584887652458.142945941361
111087211074.011658729561.539456698315910608.4488845722202.011658729525
121062510551.861296161668.721597953221310629.4171058852-73.1387038384291
13104079754.3231724828409.29150031893910650.3853271983-652.676827517198
14104639375.5392048583819.5399708132210730.9208243285-1087.46079514170
15105569784.8680093652515.67566917611410811.4563214587-771.131990634809
161064610124.1107967916185.76809155097110982.1211116574-521.889203208373
171070210189.68706528361.527032860902611152.7859018561-512.312934717009
181135311630.5201343502-361.28983982987411436.7697054797277.520134350212
191134611292.0192064810-320.77271558426811720.7535091032-53.9807935189529
201145111459.5704639414-643.35759762142612085.78713368008.57046394140707
211196412022.6216998567-545.44245811354312450.820758256858.621699856727
221257412538.1795827783-251.20143470655912861.0218519283-35.8204172217429
231303112729.237597701961.539456698315913271.2229455998-301.762402298102
241381213878.455733653868.721597953221313676.822668392966.4557336538364
251454414596.2861084950409.29150031893914082.422391186152.2861084949636
261493114609.0834677120819.5399708132214433.3765614748-321.91653228798
271488614471.9935990605515.67566917611414784.3307317634-414.006400939539
281600516787.8679678951185.76809155097115036.3639405540782.867967895054
291706418778.075817794661.527032860902615288.39714934451714.07581779457
301516815260.7459641546-361.28983982987415436.543875675392.7459641545902
311605016836.0821135782-320.77271558426815584.6906020060786.082113578223
321583916678.8182020758-643.35759762142615642.5393955457839.818202075752
331513715119.0542690282-545.44245811354315700.3881890853-17.9457309717618
341495414465.6270035304-251.20143470655915693.5744311762-488.372996469634
351564815547.699870034661.539456698315915686.7606732671-100.300129965397
361530514872.673869211968.721597953221315668.6045328349-432.326130788077
371557915098.2601072784409.29150031893915650.4483924026-480.739892721571
381634816181.3074424297819.5399708132215695.1525867571-166.692557570337
391592815600.4675497123515.67566917611415739.8567811116-327.532450287717
401617116277.0624089767185.76809155097115879.1694994723106.062408976717
411593715793.990749306161.527032860902616018.4822178330-143.009250693922
421571315539.3266296980-361.28983982987416247.9632101319-173.673370302036
431559415031.3285131535-320.77271558426816477.4442024308-562.671486846537
441568315238.7953653117-643.35759762142616770.5622323097-444.204634688302
451643816357.7621959249-545.44245811354317063.6802621887-80.23780407511
461703216966.1769070792-251.20143470655917349.0245276274-65.8230929208476
471769617696.091750235561.539456698315917634.36879306620.0917502355259785
481774517533.609863878468.721597953221317887.6685381684-211.390136121587
491939420237.7402164105409.29150031893918140.9682832706843.740216410493
502014821123.2217386159819.5399708132218353.2382905709975.2217386159
512010821134.8160329527515.67566917611418565.50829787121026.81603295269
521858418257.7091827849185.76809155097118724.5227256641-326.290817215086
531844117936.935813682161.527032860902618883.5371534570-504.064186317941
541839118122.7358035334-361.28983982987419020.5540362964-268.264196466571
551917819519.2017964484-320.77271558426819157.5709191359341.201796448415
561807917440.3684614884-643.35759762142619360.9891361331-638.631538511625
571848317947.0351049833-545.44245811354319564.4073531303-535.964895016714
581964419695.061439583-251.20143470655919844.139995123651.0614395829944
591919518204.587906184861.539456698315920123.8726371169-990.412093815186
601965018815.329277486768.721597953221320415.9491245601-834.670722513343
612083020542.6828876777409.29150031893920708.0256120034-287.317112322311
622359525380.6962694046819.5399708132220989.76375978211785.69626940464
632293724086.822423263515.67566917611421271.50190756091149.82242326298
642181421864.0710559584185.76809155097121578.160852490750.0710559583786
652192821909.653169718761.527032860902621884.8197974204-18.3468302813017
662177721701.2912880885-361.28983982987422213.9985517414-75.7087119115131
672138320543.5954095219-320.77271558426822543.1773060624-839.404590478112
682146720715.4143058227-643.35759762142622861.9432917987-751.585694177265
692205221468.7331805785-545.44245811354323180.709277535-583.26681942146
702268022115.0271170984-251.20143470655923496.1743176082-564.972882901591
712432024766.821185620461.539456698315923811.6393576813446.821185620382
722497725750.766205551468.721597953221324134.5121964954773.766205551423
732520425541.3234643717409.29150031893924457.3850353094337.323464371653
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292971693vc7ppbi84owl8qe/1utsr1292971629.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292971693vc7ppbi84owl8qe/1utsr1292971629.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292971693vc7ppbi84owl8qe/252au1292971629.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292971693vc7ppbi84owl8qe/252au1292971629.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292971693vc7ppbi84owl8qe/352au1292971629.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292971693vc7ppbi84owl8qe/352au1292971629.ps (open in new window)


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