Home » date » 2009 » Dec » 04 »

*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: Fri, 04 Dec 2009 08:12:55 -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/04/t1259939610gwqgl0sbv5nfkew.htm/, Retrieved Fri, 04 Dec 2009 16:13:36 +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/04/t1259939610gwqgl0sbv5nfkew.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 «
274412 272433 268361 268586 264768 269974 304744 309365 308347 298427 289231 291975 294912 293488 290555 284736 281818 287854 316263 325412 326011 328282 317480 317539 313737 312276 309391 302950 300316 304035 333476 337698 335932 323931 313927 314485 313218 309664 302963 298989 298423 301631 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
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1274412274795.947907815-1596.32116842400275624.373260609383.947907815105
2272433272216.681997391-4697.6802606821277346.998263291-216.318002608779
3268361267170.844866228-9518.46813220065279069.623265973-1190.15513377212
4268586269262.795934452-12872.8700185294280782.074084078676.795934451744
5264768264736.600306737-17695.1252089194282494.524902183-31.3996932630544
6269974269028.672828973-13276.2559000119284195.583071039-945.32717102673
7304744306428.31514343617163.0436166698285896.6412398951684.31514343555
8309365307767.29761165323370.7925747547287591.909813592-1597.70238834695
9308347310625.52530989816781.2963028119289287.178387292278.52530989842
10298427298919.7102845267037.42584832874290896.863867145492.710284525761
11289231288673.062289406-2717.61163640772292506.549347001-557.937710593513
12291975292075.439630654-1978.22653874236293852.786908088100.439630654466
13294912296221.296699249-1596.32116842400295199.0244691751309.29669924936
14293488295098.096565559-4697.6802606821296575.5836951231610.09656555898
15290555292676.325211129-9518.46813220065297952.1429210722121.32521112909
16284736282567.366670808-12872.8700185294299777.503347721-2168.63332919159
17281818279728.261434549-17695.1252089194301602.863774370-2089.73856545088
18287854285348.275211449-13276.2559000119303635.980688562-2505.72478855052
19316263309693.85878057617163.0436166698305669.097602754-6569.14121942426
20325412319905.79470581623370.7925747547307547.412719429-5506.20529418363
21326011325814.97586108516781.2963028119309425.727836103-196.024138915120
22328282338399.7251576377037.42584832874311126.84899403510117.7251576367
23317480324849.641484442-2717.61163640772312827.9701519667369.64148444182
24317539322843.260992860-1978.22653874236314212.9655458825304.26099286036
25313737313472.360228626-1596.32116842400315597.960939798-264.639771374117
26312276312915.849210618-4697.6802606821316333.831050064639.849210617598
27309391311230.76697187-9518.46813220065317069.7011603311839.7669718698
28302950301644.97447699-12872.8700185294317127.895541539-1305.02552301006
29300316301141.035286171-17695.1252089194317186.089922748825.03528617142
30304035304333.002136482-13276.2559000119317013.25376353298.002136481518
31333476332948.53877901817163.0436166698316840.417604313-527.461220982426
32337698335423.3750927623370.7925747547316601.832332486-2274.62490724045
33335932338719.45663652916781.2963028119316363.2470606592787.45663652947
34323931324765.8655825747037.42584832874316058.708569097834.8655825741
35313927314817.441558872-2717.61163640772315754.170077536890.441558872117
36314485315490.030251078-1978.22653874236315458.1962876651005.03025107755
37313218312870.09867063-1596.32116842400315162.222497794-347.901329370099
38309664309325.671197584-4697.6802606821314700.009063098-338.328802415985
39302963301206.672503799-9518.46813220065314237.795628402-1756.32749620138
40298989297609.995436818-12872.8700185294313240.874581712-1379.00456318236
41298423302297.171673898-17695.1252089194312243.9535350213874.17167389806
42301631305894.243098074-13276.2559000119310644.0128019384263.24309807422
43329765333322.88431447617163.0436166698309044.0720688543557.88431447634
44335083339874.92545574723370.7925747547306920.2819694994791.92545574653
45327616333654.21182704516781.2963028119304796.4918701446038.21182704455
46309119309007.5615842887037.42584832874302193.012567383-111.438415712037
47295916294960.078371785-2717.61163640772299589.533264623-955.921628215234
48291413288150.065771355-1978.22653874236296654.160767388-3262.93422864523
49291542290961.532898272-1596.32116842400293718.788270152-580.467101728194
50284678283231.652386563-4697.6802606821290822.027874119-1446.34761343728
51276475274543.200654114-9518.46813220065287925.267478086-1931.79934588581
52272566272710.047173677-12872.8700185294285294.822844852144.047173677478
53264981264992.746997302-17695.1252089194282664.37821161711.7469973021653
54263290259403.39874269-13276.2559000119280452.857157322-3886.60125730978
55296806298207.62028030417163.0436166698278241.3361030261401.62028030423
56303598307462.26609884123370.7925747547276362.9413264043864.26609884086
57286994282722.15714740516781.2963028119274484.546549783-4271.84285259462
58276427272966.8760675847037.42584832874272849.698084087-3460.12393241614
59266424264350.762018016-2717.61163640772271214.849618392-2073.23798198428
60267153266470.201817384-1978.22653874236269814.024721358-682.798182615719
61268381269945.1213441-1596.32116842400268413.1998243241564.12134409975
62262522262603.185955047-4697.6802606821267138.49430563581.1859550468507
63255542254738.679345254-9518.46813220065265863.788786946-803.320654745621
64253158254459.789518339-12872.8700185294264729.0805001901301.78951833886
65243803241706.752995485-17695.1252089194263594.372213435-2096.24700451529
66250741251917.862431642-13276.2559000119262840.3934683701176.86243164225
67280445281640.54166002617163.0436166698262086.4147233051195.54166002569
68285257285070.43810350723370.7925747547262072.769321739-186.561896493367
69270976263111.57977701516781.2963028119262059.123920173-7864.42022298463
70261076252024.0929919477037.42584832874263090.481159724-9051.90700805269
71255603249801.773237133-2717.61163640772264121.838399275-5801.22676286745
72260376257131.519233499-1978.22653874236265598.707305243-3244.48076650087
73263903262326.744957213-1596.32116842400267075.576211211-1576.25504278735
74264291264639.205823634-4697.6802606821268640.474437048348.20582363446
75263276265865.095469317-9518.46813220065270205.3726628842589.09546931676
76262572266110.652315114-12872.8700185294271906.2177034153538.65231511445
77256167256422.062464974-17695.1252089194273607.062743946255.06246497354
78264221266302.156000613-13276.2559000119275416.0998993992081.15600061312
79293860293331.81932847917163.0436166698277225.137054852-528.180671521288
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259939610gwqgl0sbv5nfkew/1dpk81259939572.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259939610gwqgl0sbv5nfkew/1dpk81259939572.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259939610gwqgl0sbv5nfkew/2hyfq1259939572.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259939610gwqgl0sbv5nfkew/2hyfq1259939572.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259939610gwqgl0sbv5nfkew/3aekk1259939573.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259939610gwqgl0sbv5nfkew/3aekk1259939573.ps (open in new window)


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