Home » date » 2009 » Dec » 02 »

ws9(1)

*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, 02 Dec 2009 14:46:29 -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/02/t1259790440a5jf5w67f114c7x.htm/, Retrieved Wed, 02 Dec 2009 22:47:26 +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/02/t1259790440a5jf5w67f114c7x.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 «
216234 213587 209465 204045 200237 203666 241476 260307 243324 244460 233575 237217 235243 230354 227184 221678 217142 219452 256446 265845 248624 241114 229245 231805 219277 219313 212610 214771 211142 211457 240048 240636 230580 208795 197922 194596 194581 185686 178106 172608 167302 168053 202300 202388 182516 173476 166444 171297 169701 164182 161914 159612 151001 158114 186530 187069 174330 169362 166827 178037 186412 189226 191563 188906 186005 195309 223532 226899 214126
 
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
Seasonal691070
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
1216234220568.063932461-1293.79235898235213193.7284265224334.0639324607
2213587216291.255050951-4443.10849086534215325.8534399152704.25505095063
3209465209465.446586248-7993.42503955621217457.9784533080.446586248435779
4204045199697.630122132-11166.6315768986219559.001454767-4347.36987786813
5200237194748.649059884-15934.6735161094221660.024456226-5488.3509401163
6203666195846.396157656-12163.1778597538223648.781702098-7819.60384234402
7241476237196.30773365120118.153318379225637.53894797-4279.69226634898
8260307267724.21176965825357.0794433277227532.7087870157417.21176965753
9243324247033.44330777510186.6780661655229427.8786260603709.44330777496
10244460254366.5166924443352.97990405045231200.5034035069906.51669244404
11233575239226.617337774-5049.74551872514232973.1281809515651.61733777367
12237217241410.088779752-970.340202490575233994.2514227384193.08877975246
13235243236764.417694458-1293.79235898235235015.3746645251521.41769445760
14230354229749.491838780-4443.10849086534235401.616652085-604.508161219652
15227184226573.566399911-7993.42503955621235787.858639645-610.43360008896
16221678218789.87335091-11166.6315768986235732.758225988-2888.12664908983
17217142214541.015703778-15934.6735161094235677.657812332-2600.98429622230
18219452215840.030974589-12163.1778597538235227.146885165-3611.96902541074
19256446257997.21072362420118.153318379234776.6359579971551.21072362358
20265845272370.53674666325357.0794433277233962.3838100096525.53674666333
21248624253913.19027181410186.6780661655233148.1316620215289.190271814
22241114246662.6198791613352.97990405045232212.4002167885548.61987916112
23229245232263.076747169-5049.74551872514231276.6687715563018.07674716879
24231805234490.088074466-970.340202490575230090.2521280252685.08807446598
25219277210943.956874490-1293.79235898235228903.835484493-8333.04312551045
26219313215835.862534693-4443.10849086534227233.245956172-3477.13746530702
27212610207650.768611704-7993.42503955621225562.656427852-4959.23138829568
28214771217261.221127585-11166.6315768986223447.4104493142490.22112758484
29211142216886.509045334-15934.6735161094221332.1644707765744.50904533372
30211457216193.580281517-12163.1778597538218883.5975782374736.58028151692
31240048243542.81599592320118.153318379216435.0306856983494.81599592287
32240636242395.74556794325357.0794433277213519.1749887291759.74556794288
33230580240370.00264207410186.6780661655210603.3192917619790.00264207381
34208795207115.5068435083352.97990405045207121.513252442-1679.4931564921
35197922197254.038305603-5049.74551872514203639.707213123-667.961694397498
36194596190145.825417306-970.340202490575200016.514785185-4450.17458269408
37194581194062.470001736-1293.79235898235196393.322357247-518.529998264305
38185686182798.106587982-4443.10849086534193017.001902884-2887.89341201837
39178106174564.743591036-7993.42503955621189640.681448521-3541.25640896449
40172608169662.243321005-11166.6315768986186720.388255894-2945.75667899507
41167302166738.578452843-15934.6735161094183800.095063267-563.421547157282
42168053166724.712626964-12163.1778597538181544.465232790-1328.28737303644
43202300205193.01127930720118.153318379179288.8354023142893.01127930713
44202388201847.43121733625357.0794433277177571.489339336-540.568782663526
45182516178991.17865747710186.6780661655175854.143276358-3524.82134252330
46173476169062.1509942733352.97990405045174536.869101676-4413.8490057266
47166444164718.150591731-5049.74551872514173219.594926994-1725.84940826934
48171297171420.764180346-970.340202490575172143.576022145123.764180345897
49169701169628.235241687-1293.79235898235171067.557117295-72.7647583125217
50164182162612.139111463-4443.10849086534170194.969379402-1569.86088853684
51161914162499.043398047-7993.42503955621169322.381641509585.04339804675
52159612161488.686476912-11166.6315768986168901.9450999871876.68647691203
53151001149455.164957646-15934.6735161094168481.508558464-1545.83504235430
54158114159447.304562799-12163.1778597538168943.8732969551333.30456279864
55186530183535.60864617420118.153318379169406.238035447-2994.39135382563
56187069177687.25121941125357.0794433277171093.669337262-9381.74878058946
57174330165692.22129475810186.6780661655172781.100639077-8637.77870524235
58169362159867.9038527643352.97990405045175503.116243186-9494.0961472363
59166827160478.613671430-5049.74551872514178225.131847295-6348.3863285697
60178037175416.33793668-970.340202490575181628.002265811-2620.66206331999
61186412189086.919674656-1293.79235898235185030.8726843262674.91967465606
62189226194583.844880857-4443.10849086534188311.2636100085357.84488085724
63191563199527.770503866-7993.42503955621191591.654535697964.77050386634
64188906194058.583264767-11166.6315768986194920.0483121315152.58326476725
65186005189696.231427537-15934.6735161094198248.4420885733691.23142753652
66195309201222.174387125-12163.1778597538201559.0034726295913.17438712469
67223532222076.28182493620118.153318379204869.564856685-1455.71817506439
68226899220371.77656438125357.0794433277208069.143992291-6527.22343561903
69214126206796.59880593710186.6780661655211268.723127897-7329.40119406275
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790440a5jf5w67f114c7x/11bga1259790387.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790440a5jf5w67f114c7x/11bga1259790387.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790440a5jf5w67f114c7x/2vugs1259790387.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790440a5jf5w67f114c7x/2vugs1259790387.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790440a5jf5w67f114c7x/3xz2b1259790387.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790440a5jf5w67f114c7x/3xz2b1259790387.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790440a5jf5w67f114c7x/4613y1259790387.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259790440a5jf5w67f114c7x/4613y1259790387.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