Home » date » 2010 » Dec » 29 »

*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, 29 Dec 2010 13:40:12 +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/29/t1293629938uaxnoui8eoo1aij.htm/, Retrieved Wed, 29 Dec 2010 14:38:58 +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/29/t1293629938uaxnoui8eoo1aij.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 «
3106.54 3125.67 3039.71 3051.67 3112.83 3228.01 3223.98 3328.8 3264.26 3394.14 3549.25 3744.63 3839.25 3912.28 3911.06 3675.8 3703.32 3795.91 3906.01 4070.78 4144.38 4140.3 4388.53 4433.57 4305.23 4471.65 4614.76 4697.86 4639.4 4384.47 4350.83 4325.29 4441.82 4162.5 4127.47 3722.23 3757.12 3719.52 3925.43 3751.41 3168.22 2994.38 3136 2672.2 2100.18 1881.46 1908.64 1900.09 1696.58 1748.74 1953.35 2071.37 2030.98 2169.14 2229.85 2480.93 2525.93 2475.14 2529.66 2453.37 2386.53 2517.3 2457.46 2589.73 2679.07 2506.13 2592.31
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
13106.543313.64273568123-44.87665381189252944.31391813066207.102735681234
23125.673230.1971538296119.37353227072973001.76931389966104.527153829613
33039.712936.1214127592284.07387757212643059.22470966866-103.588587240782
43051.672911.9970003836272.82761167332573118.51538794306-139.672999616381
53112.833059.62106046762-11.76712668507943177.80606621746-53.208939532376
63228.013267.60503416839-49.41133857002733237.8263044016439.5950341683865
73223.983134.3822505695215.73120684465683297.84654258583-89.5977494304843
83328.83250.131762448548.9074182316873358.56081931981-78.668237551502
93264.263127.10372324219-17.85881929599303419.2750960538-137.156276757810
103394.143396.96570055723-91.9315764991043483.245875941872.82570055723136
113549.253542.679609610818.603734559245113547.21665582994-6.57039038918629
123744.633920.43707309817-33.67181152042863602.49473842226175.807073098170
133839.254065.60383279732-44.87665381189253657.77282101458226.353832797317
143912.284090.9265778187119.37353227072973714.25988991056178.646577818709
153911.063967.2991636213384.07387757212643770.7469588065556.2391636213265
163675.83450.3899263762372.82761167332573828.38246195044-225.410073623769
173703.323532.38916159074-11.76712668507943886.01796509434-170.930838409261
183795.913699.57536174568-49.41133857002733941.65597682435-96.3346382543223
193906.013798.9948046009815.73120684465683997.29398855436-107.015195399015
204070.784033.8813859338148.9074182316874058.7711958345-36.8986140661905
214144.384186.37041618135-17.85881929599304120.2484031146541.9904161813456
224140.34181.82342715688-91.9315764991044190.7081493422341.5234271568779
234388.534507.288369870958.603734559245114261.16789556980118.758369870950
244433.574583.46681768584-33.67181152042864317.34499383459149.896817685842
254305.234281.81456171252-44.87665381189254373.52209209937-23.4154382874767
264471.654522.7155923852319.37353227072974401.2108753440451.0655923852291
274614.764716.5464638391684.07387757212644428.89965858871101.786463839162
284697.864897.6739246317372.82761167332574425.21846369494199.813924631734
294639.44869.02985788391-11.76712668507944421.53726880117229.629857883911
304384.474434.86788302483-49.41133857002734383.483455545250.3978830248252
314350.834340.4991508661115.73120684465684345.42964228924-10.3308491338948
324325.294320.3350001925948.9074182316874281.33758157572-4.95499980740806
334441.824684.25329843379-17.85881929599304217.24552086221242.433298433788
344162.54287.08651778034-91.9315764991044129.84505871876124.586517780341
354127.474203.891668865438.603734559245114042.4445965753276.4216688654333
363722.233546.22494240807-33.67181152042863931.90686911236-176.005057591927
373757.123737.7475121625-44.87665381189253821.36914164939-19.3724878374969
383719.523741.9143498568319.37353227072973677.7521178724422.394349856831
393925.434232.6510283323884.07387757212643534.13509409549307.221028332384
403751.414069.6114447017372.82761167332573360.38094362494318.201444701733
413168.223161.58033353069-11.76712668507943186.62679315439-6.63966646931385
422994.383033.26585269513-49.41133857002733004.905485874938.8858526951303
4331363433.0846145599415.73120684465682823.1841785954297.084614559942
442672.22645.3259366387848.9074182316872650.16664512954-26.8740633612233
452100.181741.06970763232-17.85881929599302477.14911166367-359.110292367677
461881.461515.82140764941-91.9315764991042339.03016884969-365.638592350585
471908.641607.765039405058.603734559245112200.91122603571-300.874960594954
481900.091709.96163044289-33.67181152042862123.89018107754-190.128369557114
491696.581391.16751769252-44.87665381189252046.86913611938-305.412482307484
501748.741440.5859258280319.37353227072972037.52054190124-308.154074171974
511953.351794.4541747447684.07387757212642028.17194768311-158.89582525524
522071.371997.5105548147472.82761167332572072.40183351194-73.859445185263
532030.981957.09540734432-11.76712668507942116.63171934076-73.8845926556814
542169.142210.05363392969-49.41133857002732177.6377046403440.9136339296879
552229.852205.3251032154215.73120684465682238.64368993992-24.5248967845750
562480.932618.1651748253648.9074182316872294.78740694295137.235174825358
572525.932718.78769535-17.85881929599302350.93112394599192.857695350002
582475.142653.890958687-91.9315764991042388.32061781211178.750958686998
592529.662625.006153762538.603734559245112425.7101116782295.3461537625344
602453.372488.24481988848-33.67181152042862452.1669916319534.8748198884832
612386.532339.31278222622-44.87665381189252478.62387158567-47.2172177737771
622517.32513.0613110535819.37353227072972502.16515667569-4.23868894642146
632457.462305.1396806621684.07387757212642525.70644176571-152.320319337841
642589.732559.9482197668772.82761167332572546.68416855980-29.7817802331297
652679.072802.24523133119-11.76712668507942567.66189535389123.175231331186
662506.132474.46263382958-49.41133857002732587.20870474044-31.6673661704172
672592.312562.1332790283515.73120684465682606.75551412700-30.1767209716527
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293629938uaxnoui8eoo1aij/12vf71293630006.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293629938uaxnoui8eoo1aij/12vf71293630006.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293629938uaxnoui8eoo1aij/2d4fa1293630006.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293629938uaxnoui8eoo1aij/2d4fa1293630006.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293629938uaxnoui8eoo1aij/3d4fa1293630006.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293629938uaxnoui8eoo1aij/3d4fa1293630006.ps (open in new window)


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