Home » date » 2010 » Dec » 17 »

Loess Decomposition: Passengers

*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, 17 Dec 2010 16:48:07 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/17/t1292604400418to9zm3dr5k4d.htm/, Retrieved Fri, 17 Dec 2010 17:46:40 +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/2010/Dec/17/t1292604400418to9zm3dr5k4d.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
989236 1008380 1207763 1368839 1469798 1498721 1761769 1653214 1599104 1421179 1163995 1037735 1015407 1039210 1258049 1469445 1552346 1549144 1785895 1662335 1629440 1467430 1202209 1076982 1039367 1063449 1335135 1491602 1591972 1641248 1898849 1798580 1762444 1622044 1368955 1262973 1195650 1269530 1479279 1607819 1712466 1721766 1949843 1821326 1757802 1590367 1260647 1149235 1016367 1027885 1262159 1520854 1544144 1564709 1821776 1741365 1623386 1498658 1241822 1136029
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
19892361019020.12362652-379171.7049339531338623.5813074429784.1236265174
210083801026393.68733991-350271.4402490661340637.7529091518013.6873399126
312077631197944.44842319-125070.3729340581342651.92451087-9818.55157681252
413688391336622.2674160156142.81311448941344912.91946951-32216.7325839947
514697981455867.44373968136554.6418321751347173.91442814-13930.5562603155
614987211491369.78432243156508.4812994531349563.73437812-7351.21567757009
717617691767585.73351502403998.7121568861351953.554328095816.73351502162
816532141656361.42821317295352.7051366971354713.866650143147.42821316584
915991041606693.49021367234040.3308141491357474.178972187589.4902136689
1014211791401445.0745904478443.98148730581362468.94392226-19733.9254095610
1111639951155589.06787322-195062.7767455491367463.70887233-8405.93212678027
1210377351014761.94494923-311465.3340935381372173.38914431-22973.0550507708
1310154071033102.63551766-379171.7049339531376883.0694162917695.6355176647
1410392101048653.16042606-350271.4402490661380038.279823019443.16042605694
1512580491257974.88270433-125070.3729340581383193.49022973-74.1172956710216
1614694451496894.5151881356142.81311448941385852.6716973827449.5151881319
1715523461579625.50500280136554.6418321751388511.8531650327279.5050027962
1815491441551043.24055472156508.4812994531390736.278145821899.24055472482
1917858951774830.5847165403998.7121568861392960.70312662-11064.4152835007
2016623351633986.73966128295352.7051366971395330.55520202-28348.2603387164
2116294401627139.26190843234040.3308141491397700.40727742-2300.73809157289
2214674301454665.4671550178443.98148730581401750.55135768-12764.5328449896
2312022091193680.08130760-195062.7767455491405800.69543794-8528.91869239509
2410769821052403.95712870-311465.3340935381413025.37696484-24578.0428712976
2510393671037655.64644223-379171.7049339531420250.05849173-1711.3535577741
2610634491046311.25383751-350271.4402490661430858.18641155-17137.7461624872
2713351351353874.05860268-125070.3729340581441466.3143313818739.0586026793
2814916021472666.5947174756142.81311448941454394.59216804-18935.4052825328
2915919721580066.48816312136554.6418321751467322.87000471-11905.5118368834
3016412481644288.61801534156508.4812994531481698.900685213040.61801534053
3118988491897624.35647741403998.7121568861496074.93136570-1224.6435225897
3217985801791459.06519002295352.7051366971510348.22967328-7120.93480997602
3317624441766226.14120500234040.3308141491524621.527980853782.14120499697
3416220441629401.5552723978443.98148730581536242.463240307357.55527239153
3513689551385109.37824580-195062.7767455491547863.3984997516154.378245797
3612629731282294.20546051-311465.3340935381555117.1286330319321.2054605109
3711956501208100.84616765-379171.7049339531562370.8587663012450.8461676508
3812695301325126.91088612-350271.4402490661564204.5293629555596.9108861187
3914792791517590.17297447-125070.3729340581566038.1999595938311.1729744663
4016078191597800.8393668856142.81311448941561694.34751863-10018.1606331184
4117124661731026.86309016136554.6418321751557350.4950776718560.8630901584
4217217661740938.35449029156508.4812994531546085.1642102619172.3544902876
4319498431960867.45450026403998.7121568861534819.8333428511024.4545002629
4418213261828268.97007591295352.7051366971519030.324787396942.97007591417
4517578021778322.85295392234040.3308141491503240.8162319320520.8529539246
4615903671614117.4189923678443.98148730581488172.5995203423750.4189923573
4712606471243252.3939368-195062.7767455491473104.38280875-17394.606063199
4811492351149270.40734269-311465.3340935381460664.9267508535.4073426858522
491016367963680.234240996-379171.7049339531448225.47069296-52686.7657590036
501027885967237.27404457-350271.4402490661438804.16620450-60647.72595543
5112621591220005.51121802-125070.3729340581429382.86171603-42153.4887819765
5215208541558357.7148556356142.81311448941427207.4720298837503.7148556304
5315441441526701.2758241136554.6418321751425032.08234373-17442.7241759009
5415647091548874.22740985156508.4812994531424035.29129070-15834.7725901506
5518217761816514.78760545403998.7121568861423038.50023767-5261.21239455394
5617413651764680.01841877295352.7051366971422697.2764445323315.0184187705
5716233861590375.61653445234040.3308141491422356.05265140-33010.3834655457
5814986581496321.0147773178443.98148730581422551.00373539-2336.985222694
5912418221255960.82192617-195062.7767455491422745.9548193814138.8219261689
6011360291160197.44818737-311465.3340935381423325.8859061624168.4481873733
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292604400418to9zm3dr5k4d/1tzre1292604483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292604400418to9zm3dr5k4d/1tzre1292604483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292604400418to9zm3dr5k4d/2tzre1292604483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292604400418to9zm3dr5k4d/2tzre1292604483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292604400418to9zm3dr5k4d/348qz1292604483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292604400418to9zm3dr5k4d/348qz1292604483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292604400418to9zm3dr5k4d/4eipj1292604483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292604400418to9zm3dr5k4d/4eipj1292604483.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