Home » date » 2009 » Dec » 02 »

ws 8 Ad hoc forecasting link 2

*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 13:09:47 -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/t1259784665g90pizk28uukjjd.htm/, Retrieved Wed, 02 Dec 2009 21:11:24 +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/t1259784665g90pizk28uukjjd.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:
ws 8 Ad hoc forecasting link 2
 
Dataseries X:
» Textbox « » Textfile « » CSV «
8.2 8.0 7.5 6.8 6.5 6.6 7.6 8.0 8.1 7.7 7.5 7.6 7.8 7.8 7.8 7.5 7.5 7.1 7.5 7.5 7.6 7.7 7.7 7.9 8.1 8.2 8.2 8.2 7.9 7.3 6.9 6.6 6.7 6.9 7.0 7.1 7.2 7.1 6.9 7.0 6.8 6.4 6.7 6.6 6.4 6.3 6.2 6.5 6.8 6.8 6.4 6.1 5.8 6.1 7.2 7.3 6.9 6.1 5.8 6.2 7.1 7.7 7.9 7.7 7.4 7.5 8.0 8.1
 
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
Seasonal681069
Trend1912
Low-pass1312


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
18.28.762892323006160.3518212162097587.285286460784080.562892323006166
288.274749671458660.4068460502967547.318404278244590.274749671458659
37.57.403273542834080.2452043614608227.3515220957051-0.0967264571659188
46.86.210660647972970.005809650900816087.38352970112621-0.589339352027029
56.55.81804797810215-0.2335852846494777.41553730654733-0.681952021897851
66.66.15406501168457-0.3948246808845517.44075966919999-0.445934988315434
77.67.65674879318020.07726917496715817.465982031852640.0567487931801995
888.420579399931760.08915850382141137.490262096246830.420579399931761
98.18.659636248242540.02582159111644647.514542160641010.559636248242539
107.78.02450330976678-0.1853732250803927.560869915313620.324503309766775
117.57.68937052428445-0.2965681942706667.607197669986220.189370524284445
127.67.66933747732517-0.09157902459769317.622241547272520.0693374773251749
137.87.610893359231430.3518212162097587.63728542455882-0.189106640768573
147.87.577574951224380.4068460502967547.61557899847887-0.222425048775625
157.87.760923066140250.2452043614608227.59387257239892-0.0390769338597465
167.57.408882845857020.005809650900816087.58530750324216-0.091117154142979
177.57.65684285056408-0.2335852846494777.57674243408540.156842850564076
187.16.99581843010677-0.3948246808845517.59900625077778-0.104181569893234
197.57.301460757562670.07726917496715817.62127006747017-0.198539242437326
207.57.253306334549780.08915850382141137.6575351616288-0.246693665450215
217.67.480378153096110.02582159111644647.69380025578744-0.119621846903885
227.77.85135044321368-0.1853732250803927.73402278186670.151350443213684
237.77.9223228863247-0.2965681942706667.774245307945980.222322886324691
247.98.10633820072276-0.09157902459769317.785240823874930.206338200722763
258.18.051942443986360.3518212162097587.79623633980388-0.0480575560136423
268.28.245208329817370.4068460502967547.747945619885870.0452083298173722
278.28.455140738571320.2452043614608227.699654899967860.255140738571316
288.28.775838732461060.005809650900816087.618351616638130.575838732461056
297.98.49653695134108-0.2335852846494777.53704833330840.596536951341083
307.37.54443483151936-0.3948246808845517.450389849365190.24443483151936
316.96.358999459610850.07726917496715817.36373136542199-0.541000540389146
326.65.843577094854420.08915850382141137.26726440132417-0.756422905145584
336.76.20338097165720.02582159111644647.17079743722636-0.496619028342802
346.96.90172365480175-0.1853732250803927.083649570278640.00172365480174985
3577.30006649093974-0.2965681942706666.996501703330930.300066490939737
367.17.34175318309095-0.09157902459769316.949825841506740.241753183090953
377.27.14502880410770.3518212162097586.90314997968255-0.0549711958923078
387.16.917077334748390.4068460502967546.87607661495486-0.182922665251612
396.96.705792388312010.2452043614608226.84900325022716-0.194207611687986
4077.189877514111690.005809650900816086.80431283498750.189877514111689
416.87.07396286490165-0.2335852846494776.759622419747820.273962864901653
426.46.48202229082464-0.3948246808845516.712802390059920.0820222908246357
436.76.656748464660830.07726917496715816.66598236037201-0.0432515353391656
446.66.48868386187060.08915850382141136.62215763430798-0.111316138129394
456.46.19584550063960.02582159111644646.57833290824396-0.204154499360403
466.36.26060306130305-0.1853732250803926.52477016377734-0.0393969386969530
476.26.22536077495993-0.2965681942706666.471207419310730.0253607749599345
486.56.64404891132415-0.09157902459769316.447530113273540.144048911324153
496.86.824325976553890.3518212162097586.423852807236350.024325976553893
506.86.748750640457590.4068460502967546.44440330924566-0.0512493595424104
516.46.089841827284220.2452043614608226.46495381125496-0.310158172715783
526.15.714826286075990.005809650900816086.4793640630232-0.385173713924013
535.85.33981096985805-0.2335852846494776.49377431479143-0.460189030141954
546.16.09002592496776-0.3948246808845516.50479875591679-0.0099740750322388
557.27.80690762799070.07726917496715816.515823197042150.606907627990693
567.37.934925901560.08915850382141136.575915594618580.634925901560006
576.97.138170416688540.02582159111644646.636007992195010.23817041668854
586.15.64676565466351-0.1853732250803926.73860757041688-0.453234345336485
595.85.05536104563193-0.2965681942706666.84120714863874-0.744638954368073
606.25.52390786580087-0.09157902459769316.96767115879683-0.676092134199133
617.16.754043614835330.3518212162097587.09413516895491-0.345956385164672
627.77.773923490715390.4068460502967547.219230458987860.0739234907153863
637.98.210469889518370.2452043614608227.34432574902080.310469889518373
647.77.916336288975120.005809650900816087.477854060124070.216336288975115
657.47.42220291342215-0.2335852846494777.611382371227330.0222029134221451
667.57.64195819165105-0.3948246808845517.75286648923350.141958191651046
6788.028380217793160.07726917496715817.894350607239680.0283802177931634
688.18.070768677239180.08915850382141138.04007281893941-0.0292313227608236
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784665g90pizk28uukjjd/1d1wb1259784584.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784665g90pizk28uukjjd/1d1wb1259784584.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784665g90pizk28uukjjd/30avm1259784584.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784665g90pizk28uukjjd/30avm1259784584.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784665g90pizk28uukjjd/4u9c41259784584.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/02/t1259784665g90pizk28uukjjd/4u9c41259784584.ps (open in new window)


 
Parameters (Session):
par1 = 0.01 ; par2 = 0.99 ; par3 = 0.005 ;
 
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