Home » date » 2009 » Dec » 04 »

WS 9, Populair model 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: Fri, 04 Dec 2009 08:58:57 -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/04/t1259942438cr63t88s1bczdhd.htm/, Retrieved Fri, 04 Dec 2009 17:00:43 +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/04/t1259942438cr63t88s1bczdhd.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 «
95.1 97 112.7 102.9 97.4 111.4 87.4 96.8 114.1 110.3 103.9 101.6 94.6 95.9 104.7 102.8 98.1 113.9 80.9 95.7 113.2 105.9 108.8 102.3 99 100.7 115.5 100.7 109.9 114.6 85.4 100.5 114.8 116.5 112.9 102 106 105.3 118.8 106.1 109.3 117.2 92.5 104.2 112.5 122.4 113.3 100 110.7 112.8 109.8 117.3 109.1 115.9 96 99.8 116.8 115.7 99.4 94.3
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


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


Seasonal Decomposition by Loess - Time Series Components
tObservedFittedSeasonalTrendRemainder
195.192.8878530528455-4.24367339882487101.555820345979-2.21214694715448
29795.3963663468978-3.07619862842305101.679832281525-1.60363365310221
3112.7116.8048756545486.79128012838068101.8038442170714.10487565454818
4102.9103.4051167759520.497032285268324101.8978509387790.505116775952288
597.493.4653469314822-0.657204591969873101.991857660488-3.93465306851778
6111.4111.5522915619309.19941189240246102.0482965456670.152291561930312
787.489.639238780271-16.9439742111179102.1047354308472.23923878027105
896.897.4932760190589-6.01593238948192102.1226563704230.693276019058871
9114.1117.2273190740728.83210361592867102.1405773099993.12731907407208
10110.3109.8486596001438.71892977778947102.032410622067-0.451340399856647
11103.9103.6499980088472.22575805701757101.924243934135-0.250001991152686
12101.6106.772018171012-5.32753759771041101.7555194266995.17201817101156
1394.691.8568784795623-4.24367339882487101.586794919263-2.74312152043771
1495.993.4875038089862-3.07619862842305101.388694819437-2.41249619101379
15104.7101.4181251520086.79128012838068101.190594719611-3.28187484799177
16102.8103.9564599707160.497032285268324101.1465077440151.15645997071630
1798.195.7547838235502-0.657204591969873101.102420768420-2.34521617644980
18113.9117.2550404496289.19941189240246101.3455476579693.3550404496284
1980.977.1552996635993-16.9439742111179101.588674547519-3.74470033640074
2095.795.375260234472-6.01593238948192102.040672155010-0.324739765527951
21113.2115.0752266215708.83210361592867102.4926697625011.87522662157021
22105.9100.1165106523098.71892977778947102.964559569902-5.78348934769102
23108.8111.9377925656802.22575805701757103.4364493773023.13779256568044
24102.3106.083403293726-5.32753759771041103.8441343039853.78340329372575
259997.9918541681576-4.24367339882487104.251819230667-1.00814583184243
26100.799.8651265729173-3.07619862842305104.611072055506-0.834873427082712
27115.5119.2383949912756.79128012838068104.9703248803443.7383949912751
28100.795.5928760566310.497032285268324105.310091658101-5.1071239433689
29109.9114.807346156113-0.657204591969873105.6498584358574.90734615611291
30114.6114.0108342049309.19941189240246105.989753902667-0.58916579506969
3185.481.4143248416404-16.9439742111179106.329649369477-3.98567515835961
32100.5100.308325084281-6.01593238948192106.707607305201-0.191674915718636
33114.8113.6823311431488.83210361592867107.085565240924-1.11766885685229
34116.5116.8639609938848.71892977778947107.4171092283270.36396099388395
35112.9115.8255887272532.22575805701757107.7486532157302.92558872725287
36102101.280096262271-5.32753759771041108.047441335439-0.71990373772897
37106107.897443943676-4.24367339882487108.3462294551491.89744394367567
38105.3105.116166711282-3.07619862842305108.560031917141-0.183833288717821
39118.8122.0348854924876.79128012838068108.7738343791333.23488549248681
40106.1102.8298522410300.497032285268324108.873115473701-3.27014775896961
41109.3110.284808023700-0.657204591969873108.972396568270.984808023699799
42117.2116.1110869156279.19941189240246109.089501191971-1.08891308437299
4392.592.7373683954469-16.9439742111179109.2066058156710.237368395446865
44104.2105.019712574705-6.01593238948192109.3962198147770.819712574705022
45112.5106.5820625701898.83210361592867109.585833813883-5.91793742981146
46122.4126.2845341423048.71892977778947109.7965360799063.88453414230432
47113.3114.3670035970532.22575805701757110.0072383459301.06700359705277
4810095.1849458248002-5.32753759771041110.142591772910-4.81505417519976
49110.7115.365728198934-4.24367339882487110.2779451998914.66572819893419
50112.8118.434231291714-3.07619862842305110.2419673367095.63423129171413
51109.8102.6027303980926.79128012838068110.205989473527-7.19726960190782
52117.3124.6113693351570.497032285268324109.4915983795747.31136933515744
53109.1110.079997306349-0.657204591969873108.7772072856210.979997306348523
54115.9114.6630221121789.19941189240246107.937565995419-1.23697788782169
5596101.846049505901-16.9439742111179107.0979247052175.84604950590072
5699.899.3996202253004-6.01593238948192106.216312164181-0.400379774699573
57116.8119.4331967609258.83210361592867105.3346996231462.63319676092549
58115.7118.2889619911478.71892977778947104.3921082310642.58896199114703
5999.493.12472510400132.22575805701757103.449516838981-6.27527489599875
6094.391.4823370935319-5.32753759771041102.445200504179-2.81766290646812
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259942438cr63t88s1bczdhd/10u3k1259942334.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259942438cr63t88s1bczdhd/10u3k1259942334.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259942438cr63t88s1bczdhd/22xvs1259942335.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259942438cr63t88s1bczdhd/22xvs1259942335.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259942438cr63t88s1bczdhd/359rt1259942335.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259942438cr63t88s1bczdhd/359rt1259942335.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259942438cr63t88s1bczdhd/4hgqz1259942335.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259942438cr63t88s1bczdhd/4hgqz1259942335.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