Home » date » 2010 » Dec » 12 »

Seasonal Decomposition by Loess

*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, 12 Dec 2010 11:08:58 +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/12/t1292152045cklpf6doo7pqlg1.htm/, Retrieved Sun, 12 Dec 2010 12:07:30 +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/12/t1292152045cklpf6doo7pqlg1.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 «
43880 43110 44496 44164 40399 36763 37903 35532 35533 32110 33374 35462 33508 36080 34560 38737 38144 37594 36424 36843 37246 38661 40454 44928 48441 48140 45998 47369 49554 47510 44873 45344 42413 36912 43452 42142 44382 43636 44167 44423 42868 43908 42013 38846 35087 33026 34646 37135 37985 43121 43722 43630 42234 39351 39327 35704 30466 28155 29257 29998 32529 34787 33855 34556 31348 30805 28353 24514 21106 21346 23335 24379 26290 30084 29429 30632 27349 27264 27474 24482 21453 18788 19282 19713 21917 23812 23785 24696 24562 23580 24939 23899 21454 19761 19815 20780 23462 25005 24725 26198 27543 26471 26558 25317 22896 22248 23406 25073 27691 30599 31948 32946 34012 32936 32974 30951 29812 29010 31068 32447 34844 35676 35387 36488 35652 33488 32914 29781 27951
 
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
Seasonal12910130
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
14388045398.2253761791565.16239394862241796.61222987231518.22537617906
24311042650.2171504412406.4100025319741163.3728470271-459.782849559037
34449646132.30135186282329.5651839553840530.13346418181636.3013518628
44416444929.43043791433481.3768025159239917.1927595698765.430437914278
54039938855.19587103832638.5520740038839304.2520549578-1543.80412896167
63676333397.91276533781434.8247545542738693.2624801079-3365.08723466217
73790336758.3583051494965.3687895926438082.272905258-1144.64169485064
83553234612.6275534629-1010.0444514036137461.4168979408-919.372446537149
93553337506.9890136243-3281.5499042477736840.56089062351973.98901362425
103211032763.612065269-4915.5122272228136371.9001619538653.612065268971
113337433882.4602454398-3037.6996787239335903.2394332842508.460245439768
123546236774.3855331665-1576.4536192056435726.06808603911312.38553316653
133350830901.9408672573565.16239394862235548.8967387940-2606.05913274267
143608034155.31099595812406.4100025319735598.2790015099-1924.68900404190
153456031142.77355181882329.5651839553835647.6612642258-3417.22644818121
163873737919.21694755403481.3768025159236073.4062499300-817.783052445964
173814437150.29669036192638.5520740038836499.1512356343-993.703309638142
183759436359.69934399041434.8247545542737393.4759014553-1234.30065600961
193642433594.8306431309965.3687895926438287.8005672764-2829.16935686907
203684335328.9723570352-1010.0444514036139367.0720943684-1514.02764296484
213724637327.2062827873-3281.5499042477740446.343621460581.206282787316
223866140806.1100118354-4915.5122272228141431.40221538742145.11001183542
234045441529.2388694096-3037.6996787239342416.46080931431075.2388694096
244492848221.1368150217-1576.4536192056443211.31680418403293.13681502168
254844152310.6648069978565.16239394862244006.17279905363869.66480699780
264814049363.03368115362406.4100025319744510.55631631441223.03368115362
274599844651.49498246942329.5651839553845014.9398335752-1346.50501753063
284736946124.24424952213481.3768025159245132.378947962-1244.75575047790
294955451219.62986364742638.5520740038845249.81806234871665.62986364741
304751048461.97758913911434.8247545542745123.1976563066951.977589139147
314487343784.0539601429965.3687895926444996.5772502645-1088.94603985710
324534446951.666095669-1010.0444514036144746.37835573461607.66609566900
334241343611.370443043-3281.5499042477744496.17946120471198.37044304302
343691234576.0454038416-4915.5122272228144163.4668233812-2335.95459615839
354345246110.9454931663-3037.6996787239343830.75418555772658.94549316628
364214242431.0240343136-1576.4536192056443429.429584892289.024034313603
374438245170.732621825565.16239394862243028.1049842264788.732621824973
384363642284.90717797892406.4100025319742580.6828194892-1351.09282202114
394416743871.17416129272329.5651839553842133.2606547519-295.825838707315
404442343740.60388012123481.3768025159241624.0193173629-682.39611987878
414286841982.66994602232638.5520740038841114.7779799738-885.330053977683
424390845731.92091984141434.8247545542740649.25432560431823.92091984140
434201342876.9005391725965.3687895926440183.7306712349863.900539172493
443884638774.2067627404-1010.0444514036139927.8376886632-71.7932372595606
453508733783.6051981563-3281.5499042477739671.9447060915-1303.3948018437
463302631424.222705689-4915.5122272228139543.2895215338-1601.77729431103
473464632915.0653417477-3037.6996787239339414.6343369762-1730.93465825228
483713536573.5594417916-1576.4536192056439272.894177414-561.440558208393
493798536273.6835881996565.16239394862239131.1540178518-1711.31641180045
504312144925.87394066452406.4100025319738909.71605680361804.87394066445
514372246426.15672028932329.5651839553838688.27809575532704.15672028928
524363045468.97602269833481.3768025159238309.64717478581838.97602269827
534223443898.43167217982638.5520740038837931.01625381631664.43167217982
543935139932.29556407051434.8247545542737334.8796813752581.295564070548
553932740949.8881014733965.3687895926436738.74310893411622.88810147329
563570436427.9053284092-1010.0444514036135990.1391229944723.905328409171
573046628972.0147671930-3281.5499042477735241.5351370548-1493.98523280703
582815526793.6557490498-4915.5122272228134431.856478173-1361.34425095021
592925727929.5218594327-3037.6996787239333622.1778192912-1327.47814056731
602999828741.4483617811-1576.4536192056432831.0052574245-1256.55163821885
613252932453.0049104936565.16239394862232039.8326955577-75.995089506363
623478735891.42583138092406.4100025319731276.16416608711104.42583138088
633385534867.93917942812329.5651839553830512.49563661661012.93917942806
643455635777.33206898873481.3768025159229853.29112849541221.33206898872
653134830863.36130562192638.5520740038829194.0866203742-484.638694378056
663080531549.26751036391434.8247545542728625.9077350818744.26751036389
672835327682.9023606179965.3687895926428057.7288497895-670.097639382133
682451422429.0120633024-1010.0444514036127609.0323881012-2084.9879366976
692110618333.2139778349-3281.5499042477727160.3359264129-2772.78602216515
702134620754.8169119485-4915.5122272228126852.6953152743-591.183088051468
712333523162.6449745883-3037.6996787239326545.0547041356-172.355025411704
722437923937.6115385072-1576.4536192056426396.8420806985-441.388461492843
732629025766.2081487901565.16239394862226248.6294572613-523.791851209946
743008431576.59920823582406.4100025319726184.99078923221492.59920823583
752942930407.08269484152329.5651839553826121.3521212031978.082694841534
763063231827.21822516663481.3768025159225955.40497231751195.21822516656
772734926269.99010256422638.5520740038825789.4578234320-1079.00989743585
782726427671.84787451811434.8247545542725421.3273709277407.847874518073
792747428929.434291984965.3687895926425053.19691842331455.43429198402
802448225394.5623424477-1010.0444514036124579.4821089559912.562342447687
812145322081.7826047593-3281.5499042477724105.7672994885628.782604759268
821878818836.3503142824-4915.5122272228123655.161912940548.3503142823538
831928218397.1431523315-3037.6996787239323204.5565263924-884.856847668481
841971318105.2262028436-1576.4536192056422897.2274163620-1607.77379715639
852191720678.9392997197565.16239394862222589.8983063317-1238.06070028028
862381222720.86606939842406.4100025319722496.7239280696-1091.13393060161
872378522836.8852662372329.5651839553822403.5495498076-948.11473376300
882469623408.88951366773481.3768025159222501.7336838164-1287.11048633228
892456223885.5301081712638.5520740038822599.9178178251-676.469891828994
902358022970.87024623771434.8247545542722754.304999208-609.129753762252
912493926003.9390298165965.3687895926422908.69218059081064.93902981652
922389925776.5166593114-1010.0444514036123031.52779209221877.51665931136
932145423035.1865006541-3281.5499042477723154.36340359371581.18650065411
941976121178.231317399-4915.5122272228123259.28090982381417.23131739902
951981519303.50126267-3037.6996787239323364.1984160539-511.498737329992
962078019664.1499276312-1576.4536192056423472.3036915744-1115.85007236876
972346222778.4286389565565.16239394862223580.4089670949-683.571361043501
982500523874.98592396062406.4100025319723728.6040735074-1130.01407603937
992472523243.63563612472329.5651839553823876.7991799199-1481.36436387531
1002619824774.55717056473481.3768025159224140.0660269194-1423.44282943533
1012754328044.11505207722638.5520740038824403.3328739189501.115052077213
1022647126722.18027021771434.8247545542724784.994975228251.180270217705
1032655826983.9741338702965.3687895926425166.6570765371425.974133870222
1042531726017.8394556152-1010.0444514036125626.2049957884700.839455615194
1052289622987.7969892081-3281.5499042477726085.752915039791.7969892080837
1062224822816.3828792208-4915.5122272228126595.129348002568.382879220833
1072340622745.1938977597-3037.6996787239327104.5057809643-660.806102240334
1082507324094.8507432366-1576.4536192056427627.602875969-978.149256763358
1092769126666.1376350777565.16239394862228150.6999709737-1024.86236492234
1103059930086.63280316762406.4100025319728704.9571943004-512.367196832369
1113194832307.22039841752329.5651839553829259.2144176271359.220398417547
1123294632544.82413459963481.3768025159229865.7990628845-401.175865400437
1133401234913.06421785412638.5520740038830472.383708142901.06421785415
1143293633367.70006311511434.8247545542731069.4751823306431.700063115088
1153297433316.0645538881965.3687895926431666.5666565193342.064553888056
1163095130793.8542473738-1010.0444514036132118.1902040298-157.145752626195
1172981230335.7361527075-3281.5499042477732569.8137515403523.736152707468
1182901030112.9042836908-4915.5122272228132822.6079435321102.90428369080
1193106832098.2975432002-3037.6996787239333075.40213552371030.29754320020
1203244733397.6089587999-1576.4536192056433072.8446604058950.608958799858
1213484436052.5504207636565.16239394862233070.28718528781208.55042076356
1223567636023.93768884112406.4100025319732921.6523086269347.937688841092
1233538735671.41738407862329.5651839553832773.0174319661284.417384078559
1243648836888.87756720223481.3768025159232605.7456302819400.877567202209
1253565236226.97409739842638.5520740038832438.4738285977574.97409739843
1263348833294.19803064741434.8247545542732246.9772147984-193.801969352626
1273291432807.1506094083965.3687895926432055.480600999-106.849390591655
1282978128733.6026953683-1010.0444514036131838.4417560353-1047.39730463173
1292795127562.1469931761-3281.5499042477731621.4029110717-388.853006823898
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152045cklpf6doo7pqlg1/1krbi1292152133.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152045cklpf6doo7pqlg1/1krbi1292152133.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152045cklpf6doo7pqlg1/2krbi1292152133.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152045cklpf6doo7pqlg1/2krbi1292152133.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152045cklpf6doo7pqlg1/35tvy1292152134.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292152045cklpf6doo7pqlg1/35tvy1292152134.ps (open in new window)


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