Home » date » 2009 » Dec » 03 »

WS 9

*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: Thu, 03 Dec 2009 08:11:30 -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/03/t1259853125ct62yos0aonfq9w.htm/, Retrieved Thu, 03 Dec 2009 16:12:10 +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/03/t1259853125ct62yos0aonfq9w.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:
WS 9 link 9
 
Dataseries X:
» Textbox « » Textfile « » CSV «
162 161 149 139 135 130 127 122 117 112 113 149 157 157 147 137 132 125 123 117 114 111 112 144 150 149 134 123 116 117 111 105 102 95 93 124 130 124 115 106 105 105 101 95 93 84 87 116 120 117 109 105 107 109 109 108 107 99 103 131 137
 
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
Seasonal611062
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1162163.89107791359621.0617838709463139.0471382154571.89107791359626
2161163.31539593892220.4094557905409138.2751482705372.31539593892160
3149150.48701653347410.0098251409079137.5031583256181.48701653347447
4139139.6945404130741.48013468961784136.8253248973080.694540413074265
5135135.102064665932-1.24955613492973136.1474914689980.102064665931550
6130127.203728634383-2.75610895293840135.552380318556-2.79627136561714
7127124.505394220283-5.46266338839578134.957269168113-2.49460577971715
8122119.534477935209-9.93555344720785134.401075511999-2.46552206479129
9117112.563560032687-12.4084418885721133.844881855885-4.43643996731322
10112109.008849048802-18.5676971295376133.558848080735-2.99115095119754
11113109.654139309109-16.9269536146940133.272814305585-3.34586069089085
12149150.50777236292514.3457800704663133.1464475666081.50777236292532
13157159.91813530142221.0617838709463133.0200808276322.91813530142184
14157160.8202138205320.4094557905409132.7703303889293.82021382052989
15147151.46959490886510.0098251409079132.5205799502274.46959490886547
16137140.3614092216571.48013468961784132.1584560887253.36140922165703
17132133.453223907706-1.24955613492973131.7963322272241.45322390770610
18125121.500179847318-2.75610895293840131.25592910562-3.49982015268159
19123120.747137404379-5.46266338839578130.715525984016-2.25286259562063
20117113.963386089075-9.93555344720785129.972167358133-3.03661391092542
21114111.179633156322-12.4084418885721129.22880873225-2.820366843678
22111112.218687353072-18.5676971295376128.3490097764661.21868735307197
23112113.457742794013-16.9269536146940127.4692108206811.45774279401297
24144147.11564229410814.3457800704663126.5385776354263.11564229410806
25150153.33027167888421.0617838709463125.6079444501703.33027167888352
26149153.0862272893620.4094557905409124.5043169200994.08622728936008
27134134.58948546906410.0098251409079123.4006893900280.5894854690642
28123122.5390432840721.48013468961784121.980822026310-0.460956715928035
29116112.688601472337-1.24955613492973120.560954662593-3.31139852766279
30117117.858262340804-2.75610895293840118.8978466121340.858262340804316
31111110.22792482672-5.46266338839578117.234738561676-0.772075173279887
32105104.371867449033-9.93555344720785115.563685998174-0.62813255096654
33102102.515808453899-12.4084418885721113.8926334346730.515808453898998
349596.0710077961857-18.5676971295376112.4966893333521.07100779618565
359391.8262083826633-16.9269536146940111.100745232031-1.17379161733668
36124123.61264040925914.3457800704663110.041579520275-0.387359590741255
37130129.95580232053521.0617838709463108.982413808519-0.0441976794654408
38124119.43563217788420.4094557905409108.154912031575-4.56436782211566
39115112.66276460446210.0098251409079107.327410254630-2.33723539553834
40106103.8580631086561.48013468961784106.661802201726-2.14193689134427
41105105.253361986107-1.24955613492973105.9961941488220.253361986107279
42105107.339913865538-2.75610895293840105.4161950874002.33991386553816
43101102.626467362418-5.46266338839578104.8361960259781.62646736241776
449595.6547005221938-9.93555344720785104.2808529250140.654700522193806
459394.682932064522-12.4084418885721103.7255098240501.68293206452203
468483.1574560638012-18.5676971295376103.410241065736-0.842543936198794
478787.8319813072714-16.9269536146940103.0949723074230.831981307271377
48116114.32601406013814.3457800704663103.328205869396-1.67398593986198
49120115.37677669768521.0617838709463103.561439431369-4.62322330231495
50117109.10532524022820.4094557905409104.485218969231-7.89467475977153
51109102.58117635199910.0098251409079105.408998507093-6.41882364800058
52105101.5836631071521.48013468961784106.936202203231-3.41633689284836
53107106.786150235561-1.24955613492973108.463405899368-0.213849764438663
54109110.734977727191-2.75610895293840110.0211312257481.73497772719060
55109111.883806836269-5.46266338839578111.5788565521272.88380683626855
56108112.744551250734-9.93555344720785113.1910021964744.74455125073358
57107111.605294047751-12.4084418885721114.8031478408214.6052940477508
5899100.116376926620-18.5676971295376116.4513202029171.11637692662046
59103104.827461049681-16.9269536146940118.0994925650131.82746104968112
60131127.93592381265114.3457800704663119.718296116882-3.06407618734877
61137131.60111646030221.0617838709463121.337099668752-5.39888353969828
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259853125ct62yos0aonfq9w/1zlmh1259853087.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259853125ct62yos0aonfq9w/1zlmh1259853087.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259853125ct62yos0aonfq9w/2bb0j1259853087.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259853125ct62yos0aonfq9w/2bb0j1259853087.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259853125ct62yos0aonfq9w/394191259853087.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259853125ct62yos0aonfq9w/394191259853087.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/03/t1259853125ct62yos0aonfq9w/401ki1259853087.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/03/t1259853125ct62yos0aonfq9w/401ki1259853087.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