Home » date » 2010 » Aug » 12 »

TIJDREEKS B - STAP 24

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 12 Aug 2010 10:47:39 +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/12/t1281610039zz0s49j6gzo9n7x.htm/, Retrieved Thu, 12 Aug 2010 12:47:19 +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/12/t1281610039zz0s49j6gzo9n7x.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:
Hoes Isabelle
 
Dataseries X:
» Textbox « » Textfile « » CSV «
158 157 156 154 152 151 152 154 155 155 156 158 156 152 145 141 140 145 143 141 144 139 141 142 141 132 122 122 127 128 122 123 128 128 128 129 124 121 109 110 107 107 104 110 114 118 117 122 113 106 102 111 106 110 105 104 106 110 107 111 101 105 108 124 122 128 124 121 125 134 126 126 111 117 118 128 127 129 124 113 120 127 114 107
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1158NANA-0.843171296296301NA
2157NANA-2.53067129629629NA
3156NANA-6.83622685185185NA
4154NANA-1.06539351851852NA
5152NANA-1.74594907407407NA
6151NANA1.89988425925926NA
7152151.955439814815154.75-2.794560185185180.0445601851851904
8154152.767939814815154.458333333333-1.690393518518521.23206018518522
9155155.809606481481153.7916666666672.01793981481480-0.809606481481495
10155157.254050925926152.7916666666674.46238425925926-2.25405092592592
11156155.066550925926151.753.316550925925920.933449074074048
12158156.8096064814811515.809606481481491.19039351851850
13156149.531828703704150.375-0.8431712962963016.46817129629628
14152146.927662037037149.458333333333-2.530671296296295.07233796296299
15145141.622106481481148.458333333333-6.836226851851853.37789351851853
16141146.267939814815147.333333333333-1.06539351851852-5.26793981481481
17140144.295717592593146.041666666667-1.74594907407407-4.29571759259258
18145146.649884259259144.751.89988425925926-1.64988425925930
19143140.663773148148143.458333333333-2.794560185185182.33622685185188
20141140.309606481481142-1.690393518518520.690393518518533
21144142.226273148148140.2083333333332.017939814814801.77372685185185
22139142.920717592593138.4583333333334.46238425925926-3.92071759259258
23141140.441550925926137.1253.316550925925920.558449074074076
24142141.684606481481135.8755.809606481481490.315393518518533
25141133.448495370370134.291666666667-0.8431712962963017.55150462962965
26132130.135995370370132.666666666667-2.530671296296291.86400462962965
27122124.413773148148131.25-6.83622685185185-2.41377314814815
28122129.059606481481130.125-1.06539351851852-7.05960648148148
29127127.379050925926129.125-1.74594907407407-0.379050925925924
30128129.941550925926128.0416666666671.89988425925926-1.94155092592592
31122123.997106481481126.791666666667-2.79456018518518-1.99710648148150
32123123.934606481481125.625-1.69039351851852-0.934606481481495
33128126.642939814815124.6252.017939814814801.35706018518519
34128128.045717592593123.5833333333334.46238425925926-0.0457175925925952
35128125.566550925926122.253.316550925925922.43344907407406
36129126.351273148148120.5416666666675.809606481481492.64872685185185
37124118.073495370370118.916666666667-0.8431712962963015.92650462962965
38121115.094328703704117.625-2.530671296296295.90567129629629
39109109.663773148148116.5-6.83622685185185-0.663773148148138
40110114.434606481481115.5-1.06539351851852-4.43460648148147
41107112.879050925926114.625-1.74594907407407-5.87905092592591
42107115.774884259259113.8751.89988425925926-8.77488425925925
43104110.330439814815113.125-2.79456018518518-6.33043981481482
44110110.351273148148112.041666666667-1.69039351851852-0.351273148148152
45114113.142939814815111.1252.017939814814800.857060185185162
46118115.337384259259110.8754.462384259259262.66261574074072
47117114.191550925926110.8753.316550925925922.80844907407409
48122116.767939814815110.9583333333335.809606481481495.23206018518519
49113110.281828703704111.125-0.8431712962963012.71817129629632
50106108.385995370370110.916666666667-2.53067129629629-2.38599537037037
51102103.497106481481110.333333333333-6.83622685185185-1.49710648148148
52111108.601273148148109.666666666667-1.065393518518522.39872685185185
53106107.170717592593108.916666666667-1.74594907407407-1.17071759259261
54110109.941550925926108.0416666666671.899884259259260.0584490740740762
55105104.288773148148107.083333333333-2.794560185185180.711226851851862
56104104.851273148148106.541666666667-1.69039351851852-0.851273148148152
57106108.767939814815106.752.01793981481480-2.76793981481481
58110112.004050925926107.5416666666674.46238425925926-2.00405092592592
59107112.066550925926108.753.31655092592592-5.06655092592591
60111115.976273148148110.1666666666675.80960648148149-4.97627314814814
61101110.865162037037111.708333333333-0.843171296296301-9.86516203703704
62105110.677662037037113.208333333333-2.53067129629629-5.67766203703704
63108107.872106481481114.708333333333-6.836226851851850.127893518518505
64124115.434606481481116.5-1.065393518518528.56539351851852
65122116.545717592593118.291666666667-1.745949074074075.45428240740742
66128121.608217592593119.7083333333331.899884259259266.3917824074074
67124117.955439814815120.75-2.794560185185186.04456018518519
68121119.976273148148121.666666666667-1.690393518518521.02372685185186
69125124.601273148148122.5833333333332.017939814814800.398726851851862
70134127.629050925926123.1666666666674.462384259259266.37094907407406
71126126.858217592593123.5416666666673.31655092592592-0.858217592592567
72126129.601273148148123.7916666666675.80960648148149-3.60127314814814
73111122.990162037037123.833333333333-0.843171296296301-11.9901620370370
74117120.969328703704123.5-2.53067129629629-3.96932870370372
75118116.122106481481122.958333333333-6.836226851851851.87789351851852
76128121.392939814815122.458333333333-1.065393518518526.6070601851852
77127119.920717592593121.666666666667-1.745949074074077.07928240740742
78129122.274884259259120.3751.899884259259266.72511574074075
79124NANA-2.79456018518518NA
80113NANA-1.69039351851852NA
81120NANA2.01793981481480NA
82127NANA4.46238425925926NA
83114NANA3.31655092592592NA
84107NANA5.80960648148149NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281610039zz0s49j6gzo9n7x/1hp431281610055.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281610039zz0s49j6gzo9n7x/1hp431281610055.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/12/t1281610039zz0s49j6gzo9n7x/2hp431281610055.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281610039zz0s49j6gzo9n7x/2hp431281610055.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/12/t1281610039zz0s49j6gzo9n7x/3aglo1281610055.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/12/t1281610039zz0s49j6gzo9n7x/3aglo1281610055.ps (open in new window)


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