Home » date » 2010 » Dec » 26 »

LOESS Yuan

*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: Sun, 26 Dec 2010 13:22:06 +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/26/t12933696007bc2ylrtjmfmvc1.htm/, Retrieved Sun, 26 Dec 2010 14:20:04 +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/26/t12933696007bc2ylrtjmfmvc1.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 «
7,4271 7,7662 7,6289 7,5281 7,3831 7,2355 7,0617 7,1237 7,4533 7,5411 7,4978 7,3525 7,3862 7,311 7,2013 7,249 7,3321 7,59 7,9082 8,2123 8,0929 8,118 8,1206 8,2883 8,4281 8,7917 8,9168 8,9446 8,9786 9,5862 9,6533 9,4125 9,2195 9,2882 9,6774 9,6857 10,1688 10,4399 10,4675 10,149 9,9163 9,9268 10,0529 10,1622 10,083 10,1134 10,3423 10,7536 11,0967 10,8588 10,7719 10,9262 10,708 10,5062 10,0683 9,8954 9,9589 9,9177 9,7189 9,5273 9,5746 9,763 9,6117 9,6581 9,8361 10,2353 10,1285 10,1347 10,2141 10,0971 9,9651 10,1286 10,3356 10,1238 10,1326 10,2467 10,44 10,3689 10,2415 10,3899 10,3162 10,4533 10,6741 10,8957 10,7404 10,6568 10,5682 10,9833 11,0237 10,8462 10,7287 10,7809 10,2609 9,8252 9,1071 8,695 9,2205 9,0496 8,7406 8,921 9,011 9,3157 9,5786 9,6246 9,7485 9,9431 10,1152 10,1827 9,9777 9,7436 9,3462 9,2623 9,1505 8,5794 8,3245 8,6538 8,752 8,8104 9,2665 9,0895
 
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
Seasonal12010121
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
17.42717.271537288098230.07862655399882127.50403615790295-0.155562711901767
27.76627.964942744115580.08224536248579937.485211893398630.198742744115576
37.62897.83228808557461-0.04087571446891297.46638762889430.203388085574608
47.52817.6113132649108-0.004992099135911097.449878834225110.0832132649108033
57.38317.35908845507276-0.02625849462866767.43337003955591-0.0240115449272436
67.23557.048819865619610.004698142077878177.41748199230251-0.186680134380389
77.06176.7716314617301-0.04982540677921577.40159394504911-0.290068538269897
87.12376.857010385991740.008156495032182067.38223311897608-0.266689614008262
97.45337.57103931192951-0.02731160483256287.362872292903050.117739311929515
107.54117.76429793730326-0.03169600997525387.3495980726720.223197937303262
117.49787.65842661102720.0008495365318612347.336323852440940.160626611027202
127.35257.338663417117620.006383330692064667.35995325219032-0.0138365828823828
137.38627.310190794061480.07862655399882127.3835826519397-0.0760092059385213
147.3117.10349803336050.08224536248579937.4362566041537-0.207501966639502
157.20136.95454515810121-0.04087571446891297.4889305563677-0.246754841898793
167.2496.94856662627712-0.004992099135911097.55442547285879-0.300433373722876
177.33217.0705381052788-0.02625849462866767.61992038934987-0.261561894721200
187.597.46858477075960.004698142077878177.70671708716252-0.121415229240395
197.90828.07271162180405-0.04982540677921577.793513784975170.164511621804047
208.21238.505712996032020.008156495032182067.91073050893580.293412996032017
218.09298.18516437193613-0.02731160483256288.027947232896440.0922643719361282
228.1188.10515420212657-0.03169600997525388.16254180784869-0.0128457978734353
238.12067.943214080667190.0008495365318612348.29713638280095-0.177385919332808
248.28838.134937930110220.006383330692064668.43527873919771-0.153362069889779
258.42818.20415235040670.07862655399882128.57342109559448-0.223947649593301
268.79178.8016969050730.08224536248579938.699457732441210.00999690507299178
278.91689.04898134518097-0.04087571446891298.825494369287940.132181345180975
288.94468.95019464506892-0.004992099135911098.943997454066990.00559464506892304
298.97868.92095795578263-0.02625849462866769.06250053884604-0.0576420442173688
309.58629.985882924834930.004698142077878179.18181893308720.399682924834929
319.653310.0552880794509-0.04982540677921579.301137327328350.401988079450867
329.41259.395019369514440.008156495032182069.42182413545338-0.0174806304855615
339.21958.92380066125415-0.02731160483256289.5425109435784-0.295699338745846
349.28828.96756992857378-0.03169600997525389.64052608140147-0.320630071426219
359.67749.61540924424360.0008495365318612349.73854121922454-0.0619907557563977
369.68579.55780009293490.006383330692064669.80721657637303-0.127899907065091
3710.168810.38308151247970.07862655399882129.875891933521520.214281512479662
3810.439910.86262412172740.08224536248579939.934930515786830.422724121727368
3910.467510.9819066164168-0.04087571446891299.993969098052150.514406616416764
4010.14910.2511817127294-0.0049920991359110910.05181038640650.102181712729385
419.91639.74920681986776-0.026258494628667610.1096516747609-0.167093180132236
429.92689.686679234614030.0046981420778781710.1622226233081-0.240120765385971
4310.05299.94083183492393-0.049825406779215710.2147935718553-0.112068165076069
4410.162210.04717763645720.0081564950321820610.2690658685106-0.115022363542773
4510.0839.86997343966666-0.027311604832562810.3233381651659-0.213026560333336
4610.11349.87201972052794-0.031696009975253810.3864762894473-0.241380279472061
4710.342310.23413604973940.00084953653186123410.4496144137287-0.108163950260591
4810.753611.00360842805270.0063833306920646610.49720824125520.250008428052711
4911.096711.56997137721950.078626553998821210.54480206878170.47327137721946
5010.858811.08760881159440.082245362485799310.54774582591980.228808811594442
5110.771911.0339861314111-0.040875714468912910.55068958305780.262086131411113
5210.926211.3528694226804-0.0049920991359110910.50452267645550.426669422680424
5310.70810.9839027247755-0.026258494628667610.45835576985320.275902724775493
5410.506210.64394469185040.0046981420778781710.36375716607170.137744691850404
5510.06839.91726684448896-0.049825406779215710.2691585622903-0.151033155511044
569.89549.626051667263870.0081564950321820610.1565918377039-0.269348332736131
579.95899.90108649171492-0.027311604832562810.0440251131176-0.0578135082850775
589.91779.91085980019882-0.03169600997525389.95623620977643-0.00684019980117512
599.71899.568503157032920.0008495365318612349.86844730643522-0.15039684296708
609.52739.213833106687660.006383330692064669.83438356262028-0.313466893312343
619.57469.270253627195840.07862655399882129.80031981880534-0.304346372804158
629.7639.629776239053060.08224536248579939.81397839846114-0.133223760946938
639.61179.43663873635198-0.04087571446891299.82763697811694-0.175061263648026
649.65819.45881060888475-0.004992099135911099.86238149025116-0.199289391115252
659.83619.80133249224328-0.02625849462866769.89712600238539-0.0347675077567189
6610.235310.52253632298530.004698142077878179.943365534936850.287236322985271
6710.128510.3172203392909-0.04982540677921579.989605067488320.188720339290896
6810.134710.22805137953490.0081564950321820610.03319212543290.093351379534937
6910.214110.3787324214551-0.027311604832562810.07677918337740.164632421455121
7010.097110.1152569912631-0.031696009975253810.11063901871210.0181569912631048
719.96519.784851609421280.00084953653186123410.1444988540469-0.180248390578717
7210.128610.08402157333850.0063833306920646610.1667950959694-0.0445784266615021
7310.335610.40348210810920.078626553998821210.18909133789200.0678821081091598
7410.12389.955540710317850.082245362485799310.2098139271964-0.168259289682153
7510.132610.0755391979682-0.040875714468912910.2305365165007-0.0570608020317742
7610.246710.2340308164952-0.0049920991359110910.2643612826407-0.0126691835048032
7710.4410.6080724458479-0.026258494628667610.29818604878070.168072445847923
7810.368910.38783077514010.0046981420778781710.34527108278210.0189307751400634
7910.241510.1404692899958-0.049825406779215710.3923561167834-0.101030710004157
8010.389910.33324181516760.0081564950321820610.4384016898003-0.0566581848324397
8110.316210.1752643420154-0.027311604832562810.4844472628171-0.140935657984580
8210.453310.4062516189094-0.031696009975253810.5320443910659-0.0470483810906437
8310.674110.76770894415350.00084953653186123410.57964151931470.0936089441534822
8410.895711.15958064842300.0063833306920646610.62543602088490.263880648423019
8510.740410.7309429235460.078626553998821210.6712305224552-0.0094570764539963
8610.656810.53932121992720.082245362485799310.692033417587-0.117478780072803
8710.568210.4644394017501-0.040875714468912910.7128363127188-0.103760598249922
8810.983311.310312283311-0.0049920991359110910.66127981582490.327012283310992
8911.023711.4639351756977-0.026258494628667610.6097233189310.44023517569766
9010.846211.20539118302800.0046981420778781710.48231067489410.359191183028013
9110.728711.152327375922-0.049825406779215710.35489803085720.423627375922006
9210.780911.36610605391090.0081564950321820610.18753745105690.585206053910911
9310.260910.5289347335760-0.027311604832562810.02017687125660.268034733575957
949.82529.8405577956229-0.03169600997525389.841538214352360.0153577956228919
959.10718.550450906020020.0008495365318612349.66289955744812-0.556649093979981
968.6957.866894002689220.006383330692064669.51672266661872-0.828105997310784
979.22058.991827670211860.07862655399882129.37054577578932-0.228672329788139
989.04968.714190798561220.08224536248579939.30276383895298-0.335409201438779
998.74068.28709381235227-0.04087571446891299.23498190211664-0.453506187647728
1008.9218.5830793200624-0.004992099135911099.26391277907352-0.337920679937605
1019.0118.75541483859827-0.02625849462866769.2928436560304-0.255585161401726
1029.31579.244981100001680.004698142077878179.38172075792044-0.0707188999983188
1039.57869.73642754696873-0.04982540677921579.470597859810490.157827546968726
1049.62469.692660931593680.008156495032182069.548382573374140.0680609315936813
1059.74859.89814431789478-0.02731160483256289.626167286937780.149644317894781
1069.943110.2641476523792-0.03169600997525389.653748357596060.321047652379189
10710.115210.54822103521380.0008495365318612349.681329428254350.433021035213793
10810.182710.72490833761830.006383330692064669.634108331689630.542208337618307
1099.977710.28988621087630.07862655399882129.586887235124910.312186210876268
1109.74369.917928751111320.08224536248579939.487025886402880.174328751111322
1119.34629.34611117678806-0.04087571446891299.38716453768085-8.88232119375942e-05
1129.26239.23107697246837-0.004992099135911099.29851512666754-0.0312230275316328
1139.15059.11739277897443-0.02625849462866769.20986571565424-0.0331072210255723
1148.57948.024592454451720.004698142077878179.1295094034704-0.554807545548284
1158.32457.64967231549264-0.04982540677921579.04915309128657-0.674827684507358
1168.65388.331280992385520.008156495032182068.9681625125823-0.322519007614478
1178.7528.64413967095455-0.02731160483256288.88717193387802-0.107860329045453
1188.81048.84054931712284-0.03169600997525388.811946692852410.0301493171228433
1199.26659.795429011641340.0008495365318612348.73672145182680.528929011641335
1209.08959.503639566575050.006383330692064668.668977102732890.414139566575049
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/26/t12933696007bc2ylrtjmfmvc1/1a5co1293369722.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t12933696007bc2ylrtjmfmvc1/1a5co1293369722.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t12933696007bc2ylrtjmfmvc1/22wtr1293369722.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t12933696007bc2ylrtjmfmvc1/22wtr1293369722.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/26/t12933696007bc2ylrtjmfmvc1/32wtr1293369722.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/26/t12933696007bc2ylrtjmfmvc1/32wtr1293369722.ps (open in new window)


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