Home » date » 2009 » Dec » 01 »

SHWWS9klesmeth2

*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, 01 Dec 2009 13:00:11 -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/01/t1259697670n0rvw45bw9uo17b.htm/, Retrieved Tue, 01 Dec 2009 21:01:15 +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/01/t1259697670n0rvw45bw9uo17b.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
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
Seasonal601061
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1161164.2963280276520.6473097193903137.056362252963.29632802764985
2149151.30478919406310.1731780480802136.5220327578572.30478919406261
3139140.3132508832821.69904585396374135.9877032627551.31325088328163
4135135.524253373633-1.06634083294633135.5420874593130.524253373633115
5130127.535253642055-2.63172529792659135.096471655872-2.46474635794522
6127124.651001426636-5.36075591477991134.709754488144-2.34899857336373
7122119.566749211217-9.88978653163286134.323037320415-2.43325078878257
8117112.489962804393-12.4386052858600133.948642481467-4.51003719560703
9112109.013176528270-18.5874241707890133.574247642519-2.98682347172974
10113109.678342806877-17.0608040840480133.382461277171-3.32165719312295
11149150.54350843197514.2658166562019133.1906749118231.54350843197489
12157160.75147198019420.2500950202546132.9984329995513.75147198019431
13157160.54649919333120.6473097193903132.8061910872793.54649919333085
14147151.33420064069910.1731780480802132.4926213112214.33420064069929
15137140.1219026108741.69904585396374132.1790515351623.12190261087403
16132133.333349815498-1.06634083294633131.7329910174481.33334981549788
17125121.344794798192-2.63172529792659131.286930499735-3.65520520180807
18123120.712345533623-5.36075591477991130.648410381157-2.28765446637732
19117113.879896269053-9.88978653163286130.009890262580-3.12010373094691
20114111.243065555655-12.4386052858600129.195539730205-2.75693444434464
21111112.206234972959-18.5874241707890128.3811891978301.20623497295941
22112113.581938155142-17.0608040840480127.4788659289061.58193815514173
23144147.15764068381514.2658166562019126.5765426599833.15764068381506
24150154.17265050400320.2500950202546125.5772544757424.17265050400349
25149152.77472398910920.6473097193903124.5779662915013.77472398910902
26134134.51193085591110.1731780480802123.3148910960090.51193085591062
27123122.2491382455181.69904585396374122.051815900518-0.750861754481505
28116112.584430578826-1.06634083294633120.481910254121-3.41556942117444
29117117.719720690203-2.63172529792659118.9120046077240.719720690202792
30111110.143826082345-5.36075591477991117.216929832434-0.856173917654587
31105104.367931474488-9.88978653163286115.521855057145-0.63206852551231
32102102.468690405776-12.4386052858600113.9699148800840.468690405775675
339596.1694494677654-18.5874241707890112.4179747030241.16944946776542
349391.8566756822555-17.0608040840480111.204128401793-1.14332431774451
35124123.74390124323714.2658166562019109.990282100562-0.25609875676345
36130130.69804990204820.2500950202546109.0518550776980.698049902047558
37124119.23926222577620.6473097193903108.113428054834-4.76073777422435
38115112.46234959331010.1731780480802107.36447235861-2.53765040669022
39106103.6854374836501.69904585396374106.615516662386-2.31456251634981
40105105.063159523894-1.06634083294633106.0031813090520.0631595238943419
41105107.240879342209-2.63172529792659105.3908459557182.24087934220869
42101102.540062404281-5.36075591477991104.8206935104991.54006240428134
439595.6392454663537-9.88978653163286104.2505410652790.639245466353671
449394.6484780649082-12.4386052858600103.7901272209521.64847806490823
458483.2577107941645-18.5874241707890103.329713376624-0.742289205835462
468787.8084946213283-17.0608040840480103.2523094627200.80849462132825
47116114.55927779498314.2658166562019103.174905548815-1.44072220501704
48120115.99616505123420.2500950202546103.753739928512-4.00383494876617
49117109.02011597240220.6473097193903104.332574308208-7.9798840275982
50109102.29331497012310.1731780480802105.533506981797-6.70668502987736
51105101.5665144906501.69904585396374106.734439655387-3.43348550935026
52107106.680458642266-1.06634083294633108.38588219068-0.319541357733641
53109110.594400571953-2.63172529792659110.0373247259731.59440057195314
54109111.719856346339-5.36075591477991111.6408995684402.71985634633944
55108112.645312120725-9.88978653163286113.2444744109074.64531212072539
56107111.526131071247-12.4386052858600114.9124742146134.52613107124738
5799100.006950152471-18.5874241707890116.5804740183181.00695015247112
58103104.804175735012-17.0608040840480118.2566283490361.80417573501177
59131127.80140066404314.2658166562019119.932782679755-3.19859933595659
60137132.17351679104620.2500950202546121.576388188700-4.82648320895441
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697670n0rvw45bw9uo17b/1o1md1259697609.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697670n0rvw45bw9uo17b/1o1md1259697609.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697670n0rvw45bw9uo17b/2ss221259697609.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697670n0rvw45bw9uo17b/2ss221259697609.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697670n0rvw45bw9uo17b/39f6s1259697609.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697670n0rvw45bw9uo17b/39f6s1259697609.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697670n0rvw45bw9uo17b/42rgc1259697609.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259697670n0rvw45bw9uo17b/42rgc1259697609.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