Home » date » 2009 » Dec » 01 »

WS8

*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 10:46:51 -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/t1259689673u3azjgpmmvg8ti9.htm/, Retrieved Tue, 01 Dec 2009 18:47: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/2009/Dec/01/t1259689673u3azjgpmmvg8ti9.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 «
325412 326011 328282 317480 317539 313737 312276 309391 302950 300316 304035 333476 337698 335932 323931 313927 314485 313218 309664 302963 298989 298423 310631 329765 335083 327616 309119 295916 291413 291542 284678 276475 272566 264981 263290 296806 303598 286994 276427 266424 267153 268381 262522 255542 253158 243803 250741 280445 285257 270976 261076 255603 260376 263903 264291 263276 262572 256167 264221 293860 300713 287224
 
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'Gwilym Jenkins' @ 72.249.127.135


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1325412314472.33858240822528.7036520167313822.957765575-10939.6614175918
2326011323745.17520294614011.088210348314265.736586706-2265.82479705353
3328282335640.7523603606214.73223180358314708.5154078367358.75236036046
4317480322898.355960872-3058.85249673189315120.4965358605418.35596087226
5317539321657.759978620-2112.23764250279315532.4776638834118.75997861952
6313737313208.331526176-1686.63032315432315952.298796979-528.668473824451
7312276312873.905653478-4694.02558355252316372.119930074597.905653478345
8309391311413.905328532-9363.8726170059316731.9672884742022.90532853157
9302950301167.502348333-12359.3169952074317091.814646874-1782.49765166698
10300316300684.564439968-17076.6166014324317024.052161464368.564439968206
11304035301753.026622756-10639.3162988098316956.289676054-2281.97337724408
12333476331911.43593726818236.3487384872316804.215324245-1564.56406273192
13337698336215.15537554822528.7036520167316652.140972436-1482.84462445223
14335932341440.44570004114011.088210348316412.4660896115508.44570004137
15323931325474.4765614116214.73223180358316172.7912067861543.47656141070
16313927314898.608778239-3058.85249673189316014.243718493971.60877823917
17314485315226.541412303-2112.23764250279315855.6962302741.54141230305
18313218312487.203944343-1686.63032315432315635.426378812-730.796055657382
19309664308606.869056129-4694.02558355252315415.156527424-1057.13094387116
20302963300516.583771211-9363.8726170059314773.288845794-2446.41622878856
21298989296205.895831042-12359.3169952074314131.421164165-2783.10416895774
22298423301062.481365667-17076.6166014324312860.1352357662639.48136566661
23310631320312.466991443-10639.3162988098311588.8493073669681.46699144348
24329765331552.61557276518236.3487384872309741.0356887481787.61557276506
25335083339744.07427785422528.7036520167307893.2220701294661.07427785418
26327616335739.92821837214011.088210348305480.9835712808123.92821837164
27309119308954.5226957656214.73223180358303068.745072432-164.477304235159
28295916294821.812193233-3058.85249673189300069.040303499-1094.18780676735
29291413287868.902107936-2112.23764250279297069.335534567-3544.09789206414
30291542290846.746667485-1686.63032315432293923.883655669-695.253332515073
31284678283271.593806781-4694.02558355252290778.431776772-1406.40619321936
32276475274381.573073312-9363.8726170059287932.299543694-2093.42692668777
33272566272405.149684592-12359.3169952074285086.167310615-160.850315407908
34264981264346.243146358-17076.6166014324282692.373455074-634.756853641884
35263290256920.736699277-10639.3162988098280298.579599533-6369.2633007234
36296806297073.18037041418236.3487384872278302.470891099267.180370414222
37303598308360.93416531922528.7036520167276306.3621826644762.93416531943
38286994285377.30668755614011.088210348274599.605102097-1616.69331244449
39276427273746.4197466676214.73223180358272892.848021529-2680.58025333268
40266424264540.526635960-3058.85249673189271366.325860772-1883.47336403979
41267153266578.433942489-2112.23764250279269839.803700014-574.566057511431
42268381269978.349616801-1686.63032315432268470.2807063531597.3496168009
43262522262637.26787086-4694.02558355252267100.757712693115.267870859941
44255542254619.645420988-9363.8726170059265828.227196018-922.354579012084
45253158254119.620315864-12359.3169952074264555.696679343961.6203158641
46243803241085.257404177-17076.6166014324263597.359197255-2717.7425958229
47250741249482.294583643-10639.3162988098262639.021715167-1258.70541635738
48280445280395.05923609818236.3487384872262258.592025415-49.9407639022102
49285257286107.13401232022528.7036520167261878.162335663850.134012320457
50270976265634.74484400714011.088210348262306.166945645-5341.25515599258
51261076253203.096212576214.73223180358262734.171555626-7872.90378742991
52255603250499.841959281-3058.85249673189263765.010537451-5103.1580407189
53260376258068.388123228-2112.23764250279264795.849519275-2307.61187677237
54263903263185.486049595-1686.63032315432266307.144273559-717.513950405002
55264291265457.586555709-4694.02558355252267818.4390278431166.58655570907
56263276266611.612476806-9363.8726170059269304.26014023335.61247680604
57262572266713.235742651-12359.3169952074270790.0812525564141.23574265122
58256167257083.587092163-17076.6166014324272327.029509269916.587092163216
59264221265217.338532828-10639.3162988098273863.977765982996.338532827795
60293860294072.92439841518236.3487384872275410.726863098212.924398415023
61300713301939.8203877722528.7036520167276957.4759602141226.82038776978
62287224281951.37706805814011.088210348278485.534721594-5272.62293194205
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259689673u3azjgpmmvg8ti9/1t91y1259689607.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259689673u3azjgpmmvg8ti9/1t91y1259689607.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/01/t1259689673u3azjgpmmvg8ti9/3fbh81259689607.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/01/t1259689673u3azjgpmmvg8ti9/3fbh81259689607.ps (open in new window)


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