Home » date » 2010 » Aug » 13 »

Tijdreeks A - Stap 29

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 13 Aug 2010 14:20: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/Aug/13/t1281709270n4vp03odvhb89p7.htm/, Retrieved Fri, 13 Aug 2010 16:21:15 +0200
 
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/Aug/13/t1281709270n4vp03odvhb89p7.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:
Jacobs Jeff
 
Dataseries X:
» Textbox « » Textfile « » CSV «
130 129 128 126 146 145 130 120 121 121 122 124 123 125 120 124 146 149 138 133 135 149 146 141 139 141 138 139 166 179 167 154 151 162 148 143 145 143 148 139 169 186 174 161 151 158 144 135 139 137 149 136 169 185 177 164 145 147 142 126 130 136 139 120 151 166 156 150 141 141 130 110 110 123 133 108 136 148 146 142 132 128 116 90 94 112 130 106 124 139 140 129 113 110 102 78 79 94 121 99 126 137 141 119 96 96 88 64 66 92 120 101 135 146 149 134 101 100 91 70
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1130NANA-18.8329475308642NA
2129NANA-10.3190586419753NA
3128NANA0.264274691358037NA
4126NANA-13.5459104938272NA
5146NANA14.4726080246914NA
6145NANA27.4216820987654NA
7130146.648533950617128.20833333333318.4402006172840-16.6485339506173
8120135.880015432099127.758.13001543209876-15.8800154320987
9121125.921682098765127.25-1.32831790123458-4.9216820987654
10121128.657793209877126.8333333333331.82445987654320-7.65779320987652
11122120.518904320988126.75-6.231095679012341.48109567901238
12124106.620756172839126.916666666667-20.295910493827217.3792438271605
13123108.583719135802127.416666666667-18.832947530864214.4162808641976
14125117.972608024691128.291666666667-10.31905864197537.02739197530866
15120129.680941358025129.4166666666670.264274691358037-9.6809413580247
16124117.620756172839131.166666666667-13.54591049382726.37924382716051
17146147.805941358025133.33333333333314.4726080246914-1.80594135802471
18149162.463348765432135.04166666666727.4216820987654-13.4633487654321
19138154.856867283951136.41666666666718.4402006172840-16.8568672839506
20133145.880015432099137.758.13001543209876-12.8800154320988
21135137.838348765432139.166666666667-1.32831790123458-2.83834876543207
22149142.36612654321140.5416666666671.824459876543206.63387345679013
23146135.768904320988142-6.2310956790123410.2310956790124
24141123.787422839506144.083333333333-20.295910493827217.2125771604938
25139127.708719135802146.541666666667-18.832947530864211.2912808641975
26141138.305941358025148.625-10.31905864197532.69405864197535
27138150.430941358025150.1666666666670.264274691358037-12.4309413580247
28139137.829089506173151.375-13.54591049382721.17091049382717
29166166.47260802469115214.4726080246914-0.472608024691368
30179179.588348765432152.16666666666727.4216820987654-0.588348765432073
31167170.940200617284152.518.4402006172840-3.94020061728392
32154160.963348765432152.8333333333338.13001543209876-6.96334876543207
33151152.005015432099153.333333333333-1.32831790123458-1.00501543209876
34162155.574459876543153.751.824459876543206.42554012345678
35148147.643904320988153.875-6.231095679012340.356095679012384
36143133.995756172839154.291666666667-20.29591049382729.0042438271605
37145136.042052469136154.875-18.83294753086428.9579475308642
38143145.139274691358155.458333333333-10.3190586419753-2.13927469135800
39148156.014274691358155.750.264274691358037-8.014274691358
40139142.037422839506155.583333333333-13.5459104938272-3.03742283950615
41169169.722608024691155.2514.4726080246914-0.72260802469134
42186182.171682098765154.7527.42168209876543.82831790123458
43174172.606867283951154.16666666666718.44020061728401.39313271604942
44161161.796682098765153.6666666666678.13001543209876-0.796682098765444
45151152.130015432099153.458333333333-1.32831790123458-1.13001543209876
46158155.199459876543153.3751.824459876543202.80054012345678
47144147.018904320988153.25-6.23109567901234-3.01890432098762
48135132.912422839506153.208333333333-20.29591049382722.08757716049385
49139134.458719135802153.291666666667-18.83294753086424.54128086419755
50137143.222608024691153.541666666667-10.3190586419753-6.22260802469137
51149153.680941358025153.4166666666670.264274691358037-4.68094135802465
52136139.162422839506152.708333333333-13.5459104938272-3.16242283950618
53169166.639274691358152.16666666666714.47260802469142.36072530864197
54185179.130015432099151.70833333333327.42168209876545.86998456790124
55177169.398533950617150.95833333333318.44020061728407.60146604938274
56164158.671682098765150.5416666666678.130015432098765.32831790123458
57145148.755015432099150.083333333333-1.32831790123458-3.75501543209876
58147150.8244598765431491.82445987654320-3.82445987654322
59142141.352237654321147.583333333333-6.231095679012340.647762345679041
60126125.745756172839146.041666666667-20.29591049382720.254243827160508
61130125.542052469136144.375-18.83294753086424.45794753086423
62136132.597608024691142.916666666667-10.31905864197533.40239197530866
63139142.430941358025142.1666666666670.264274691358037-3.43094135802465
64120128.204089506173141.75-13.5459104938272-8.2040895061728
65151155.47260802469114114.4726080246914-4.47260802469134
66166167.255015432099139.83333333333327.4216820987654-1.25501543209873
67156156.773533950617138.33333333333318.4402006172840-0.773533950617264
68150145.088348765432136.9583333333338.130015432098764.91165123456793
69141134.838348765432136.166666666667-1.328317901234586.16165123456793
70141137.24112654321135.4166666666671.824459876543203.75887345679013
71130128.060570987654134.291666666667-6.231095679012341.9394290123457
72110112.620756172839132.916666666667-20.2959104938272-2.62075617283949
73110112.917052469136131.75-18.8329475308642-2.91705246913580
74123120.680941358025131-10.31905864197532.31905864197532
75133130.555941358025130.2916666666670.2642746913580372.44405864197532
76108115.829089506173129.375-13.5459104938272-7.82908950617283
77136142.722608024691128.2514.4726080246914-6.72260802469137
78148154.255015432099126.83333333333327.4216820987654-6.25501543209874
79146143.773533950617125.33333333333318.44020061728402.22646604938272
80142132.338348765432124.2083333333338.130015432098769.66165123456793
81132122.296682098765123.625-1.328317901234589.70331790123458
82128125.241126543210123.4166666666671.824459876543202.75887345679014
83116116.602237654321122.833333333333-6.23109567901234-0.602237654320987
8490101.662422839506121.958333333333-20.2959104938272-11.6624228395062
8594102.500385802469121.333333333333-18.8329475308642-8.50038580246911
86112110.222608024691120.541666666667-10.31905864197531.77739197530866
87130119.472608024691119.2083333333330.26427469135803710.5273919753087
88106104.120756172839117.666666666667-13.54591049382721.87924382716052
89124130.805941358025116.33333333333314.4726080246914-6.80594135802467
90139142.671682098765115.2527.4216820987654-3.6716820987654
91140132.565200617284114.12518.44020061728407.43479938271606
92129120.880015432099112.758.130015432098768.11998456790126
93113110.296682098765111.625-1.328317901234582.7033179012346
94110112.782793209877110.9583333333331.82445987654320-2.78279320987653
95102104.518904320988110.75-6.23109567901234-2.51890432098766
967890.4540895061728110.75-20.2959104938272-12.4540895061728
977991.8753858024691110.708333333333-18.8329475308642-12.8753858024691
9894100.014274691358110.333333333333-10.3190586419753-6.01427469135801
99121109.472608024691109.2083333333330.26427469135803711.5273919753086
1009994.3707561728395107.916666666667-13.54591049382724.62924382716052
101126121.222608024691106.7514.47260802469144.77739197530865
102137133.005015432099105.58333333333327.42168209876543.99498456790126
103141122.898533950617104.45833333333318.440200617284018.1014660493827
104119111.963348765432103.8333333333338.130015432098767.03665123456791
10596102.380015432099103.708333333333-1.32831790123458-6.38001543209876
10696105.574459876543103.751.82445987654320-9.57445987654322
1078897.977237654321104.208333333333-6.23109567901234-9.977237654321
1086484.6624228395062104.958333333333-20.2959104938272-20.6624228395062
1096686.8337191358025105.666666666667-18.8329475308642-20.8337191358025
1109296.3059413580247106.625-10.3190586419753-4.30594135802467
111120107.722608024691107.4583333333330.26427469135803712.2773919753086
11210194.2874228395062107.833333333333-13.54591049382726.71257716049384
113135122.597608024691108.12514.472608024691412.4023919753086
114146135.921682098765108.527.421682098765410.0783179012346
115149NANA18.4402006172840NA
116134NANA8.13001543209876NA
117101NANA-1.32831790123458NA
118100NANA1.82445987654320NA
11991NANA-6.23109567901234NA
12070NANA-20.2959104938272NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281709270n4vp03odvhb89p7/18lfy1281709252.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281709270n4vp03odvhb89p7/18lfy1281709252.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/13/t1281709270n4vp03odvhb89p7/28lfy1281709252.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281709270n4vp03odvhb89p7/28lfy1281709252.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/13/t1281709270n4vp03odvhb89p7/3jufj1281709252.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281709270n4vp03odvhb89p7/3jufj1281709252.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/13/t1281709270n4vp03odvhb89p7/4tlwm1281709252.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/13/t1281709270n4vp03odvhb89p7/4tlwm1281709252.ps (open in new window)


 
Parameters (Session):
par1 = additive ; par2 = 12 ;
 
Parameters (R input):
par1 = additive ; par2 = 12 ;
 
R code (references can be found in the software module):
par2 <- as.numeric(par2)
x <- ts(x,freq=par2)
m <- decompose(x,type=par1)
m$figure
bitmap(file='test1.png')
plot(m)
dev.off()
mylagmax <- length(x)/2
bitmap(file='test2.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(x),lag.max = mylagmax,main='Observed')
acf(as.numeric(m$trend),na.action=na.pass,lag.max = mylagmax,main='Trend')
acf(as.numeric(m$seasonal),na.action=na.pass,lag.max = mylagmax,main='Seasonal')
acf(as.numeric(m$random),na.action=na.pass,lag.max = mylagmax,main='Random')
par(op)
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
spectrum(as.numeric(x),main='Observed')
spectrum(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
spectrum(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
spectrum(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
bitmap(file='test4.png')
op <- par(mfrow = c(2,2))
cpgram(as.numeric(x),main='Observed')
cpgram(as.numeric(m$trend[!is.na(m$trend)]),main='Trend')
cpgram(as.numeric(m$seasonal[!is.na(m$seasonal)]),main='Seasonal')
cpgram(as.numeric(m$random[!is.na(m$random)]),main='Random')
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Classical Decomposition by Moving Averages',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observations',header=TRUE)
a<-table.element(a,'Fit',header=TRUE)
a<-table.element(a,'Trend',header=TRUE)
a<-table.element(a,'Seasonal',header=TRUE)
a<-table.element(a,'Random',header=TRUE)
a<-table.row.end(a)
for (i in 1:length(m$trend)) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
if (par1 == 'additive') a<-table.element(a,m$trend[i]+m$seasonal[i]) else a<-table.element(a,m$trend[i]*m$seasonal[i])
a<-table.element(a,m$trend[i])
a<-table.element(a,m$seasonal[i])
a<-table.element(a,m$random[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.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