Home » date » 2010 » Jul » 28 »

Tijdreeks 1 - 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: Wed, 28 Jul 2010 14:23:18 +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/Jul/28/t1280327107uvsqtueo2s35dyf.htm/, Retrieved Wed, 28 Jul 2010 16:25:13 +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/Jul/28/t1280327107uvsqtueo2s35dyf.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:
Patrick Fieremans
 
Dataseries X:
» Textbox « » Textfile « » CSV «
136 135 134 132 152 151 136 126 127 127 128 130 125 118 111 104 126 131 122 116 115 115 113 122 114 106 93 89 114 122 115 116 120 120 120 121 118 112 99 96 120 135 128 134 134 132 130 125 124 114 101 101 123 143 133 136 137 135 141 136 133 124 110 104 130 160 142 142 137 135 139 135 134 120 103 101 127 159 141 140 135 127 130 128 126 110 101 102 129 169 146 145 138 123 124 137 132 112 105 106 137 175 151 142 140 122 127 135 128 117 107 108 134 171 154 146 148 122 124 135
 
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'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1136NANA0.632716049382716NA
2135NANA-10.7654320987654NA
3134NANA-22.3996913580247NA
4132NANA-24.5848765432099NA
5152NANA0.901234567901231NA
6151NANA25.8966049382716NA
7136142.989197530864134.0416666666678.94753086419753-6.98919753086419
8126140.054012345679132.8757.179012345679-14.054012345679
9127137.04012345679131.2083333333335.83179012345679-10.0401234567901
10127129.929012345679129.0833333333330.845679012345682-2.929012345679
11128129.651234567901126.8333333333332.81790123456790-1.65123456790121
12130129.614197530864124.9166666666674.697530864197540.385802469135811
13125124.132716049383123.50.6327160493827160.867283950617278
14118111.734567901235122.5-10.76543209876546.26543209876543
1511199.1836419753086121.583333333333-22.399691358024711.8163580246914
1610495.9984567901235120.583333333333-24.58487654320998.00154320987654
17126120.359567901235119.4583333333330.9012345679012315.64043209876544
18131144.396604938272118.525.8966049382716-13.3966049382716
19122126.655864197531117.7083333333338.94753086419753-4.65586419753086
20116123.929012345679116.757.179012345679-7.92901234567901
21115121.331790123457115.55.83179012345679-6.3317901234568
22115114.970679012346114.1250.8456790123456820.0293209876543159
23113115.8179012345681132.81790123456790-2.8179012345679
24122116.822530864198112.1254.697530864197545.17746913580248
25114112.091049382716111.4583333333330.6327160493827161.90895061728395
26106100.401234567901111.166666666667-10.76543209876545.59876543209877
279388.9753086419753111.375-22.39969135802474.0246913580247
288987.2067901234568111.791666666667-24.58487654320991.79320987654320
29114113.192901234568112.2916666666670.9012345679012310.807098765432116
30122138.438271604938112.54166666666725.8966049382716-16.4382716049383
31115121.614197530864112.6666666666678.94753086419753-6.6141975308642
32116120.262345679012113.0833333333337.179012345679-4.26234567901236
33120119.415123456790113.5833333333335.831790123456790.584876543209873
34120114.970679012346114.1250.8456790123456825.02932098765432
35120117.484567901235114.6666666666672.817901234567902.51543209876543
36121120.155864197531115.4583333333334.697530864197540.844135802469154
37118117.174382716049116.5416666666670.6327160493827160.82561728395062
38112107.067901234568117.833333333333-10.76543209876544.93209876543212
399996.766975308642119.166666666667-22.39969135802472.23302469135805
409695.6651234567901120.25-24.58487654320990.334876543209887
41120122.067901234568121.1666666666670.901234567901231-2.06790123456787
42135147.646604938272121.7525.8966049382716-12.6466049382716
43128131.114197530864122.1666666666678.94753086419753-3.11419753086419
44134129.679012345679122.57.1790123456794.32098765432099
45134128.498456790123122.6666666666675.831790123456795.50154320987654
46132123.804012345679122.9583333333330.8456790123456828.19598765432099
47130126.109567901235123.2916666666672.817901234567903.89043209876543
48125128.447530864198123.754.69753086419754-3.44753086419755
49124124.924382716049124.2916666666670.632716049382716-0.924382716049394
50114113.817901234568124.583333333333-10.76543209876540.182098765432102
51101102.391975308642124.791666666667-22.3996913580247-1.39197530864196
52101100.456790123457125.041666666667-24.58487654320990.543209876543216
53123126.526234567901125.6250.901234567901231-3.52623456790124
54143152.438271604938126.54166666666725.8966049382716-9.43827160493827
55133136.322530864198127.3758.94753086419753-3.32253086419755
56136135.345679012346128.1666666666677.1790123456790.654320987654302
57137134.790123456790128.9583333333335.831790123456792.20987654320987
58135130.304012345679129.4583333333330.8456790123456824.69598765432099
59141132.692901234568129.8752.817901234567908.3070987654321
60136135.572530864198130.8754.697530864197540.427469135802482
61133132.591049382716131.9583333333330.6327160493827160.408950617283978
62124121.817901234568132.583333333333-10.76543209876542.1820987654321
63110110.433641975309132.833333333333-22.3996913580247-0.433641975308632
64104108.248456790123132.833333333333-24.5848765432099-4.24845679012344
65130133.651234567901132.750.901234567901231-3.65123456790121
66160158.521604938272132.62525.89660493827161.47839506172843
67142141.572530864197132.6258.947530864197530.427469135802511
68142139.679012345679132.57.1790123456792.32098765432099
69137137.873456790123132.0416666666675.83179012345679-0.873456790123441
70135132.470679012346131.6250.8456790123456822.52932098765436
71139134.192901234568131.3752.817901234567904.80709876543213
72135135.905864197531131.2083333333334.69753086419754-0.90586419753086
73134131.757716049383131.1250.6327160493827162.24228395061729
74120120.234567901235131-10.7654320987654-0.234567901234584
75103108.433641975309130.833333333333-22.3996913580247-5.43364197530865
76101105.831790123457130.416666666667-24.5848765432099-4.83179012345678
77127130.609567901235129.7083333333330.901234567901231-3.60956790123457
78159154.938271604938129.04166666666725.89660493827164.06172839506175
79141137.364197530864128.4166666666678.947530864197533.63580246913583
80140134.845679012346127.6666666666677.1790123456795.15432098765433
81135132.998456790123127.1666666666675.831790123456792.00154320987654
82127127.970679012346127.1250.845679012345682-0.97067901234567
83130130.067901234568127.252.81790123456790-0.0679012345678984
84128132.447530864198127.754.69753086419754-4.44753086419752
85126129.007716049383128.3750.632716049382716-3.00771604938272
86110118.026234567901128.791666666667-10.7654320987654-8.02623456790123
87101106.725308641975129.125-22.3996913580247-5.7253086419753
88102104.498456790123129.083333333333-24.5848765432099-2.49845679012347
89129129.567901234568128.6666666666670.901234567901231-0.567901234567927
90169154.688271604938128.79166666666725.896604938271614.3117283950617
91146138.364197530864129.4166666666678.947530864197537.6358024691358
92145136.929012345679129.757.1790123456798.07098765432099
93138135.8317901234571305.831790123456792.16820987654322
94123131.179012345679130.3333333333330.845679012345682-8.179012345679
95124133.651234567901130.8333333333332.81790123456790-9.65123456790121
96137136.114197530864131.4166666666674.697530864197540.885802469135797
97132132.507716049383131.8750.632716049382716-0.507716049382708
98112121.192901234568131.958333333333-10.7654320987654-9.19290123456788
99105109.516975308642131.916666666667-22.3996913580247-4.51697530864196
100106107.373456790123131.958333333333-24.5848765432099-1.37345679012344
101137132.942901234568132.0416666666670.9012345679012314.0570987654321
102175157.979938271605132.08333333333325.896604938271617.0200617283951
103151140.780864197531131.8333333333338.9475308641975310.2191358024692
104142139.054012345679131.8757.1790123456792.94598765432102
105140137.998456790123132.1666666666675.831790123456792.00154320987659
106122133.179012345679132.3333333333330.845679012345682-11.179012345679
107127135.109567901235132.2916666666672.81790123456790-8.10956790123456
108135136.6975308641981324.69753086419754-1.69753086419755
109128132.591049382716131.9583333333330.632716049382716-4.59104938271604
110117121.484567901235132.25-10.7654320987654-4.48456790123457
111107110.350308641975132.75-22.3996913580247-3.35030864197532
112108108.498456790123133.083333333333-24.5848765432099-0.49845679012347
113134133.859567901235132.9583333333330.9012345679012310.140432098765416
114171158.729938271605132.83333333333325.896604938271612.2700617283951
115154NANA8.94753086419753NA
116146NANA7.179012345679NA
117148NANA5.83179012345679NA
118122NANA0.845679012345682NA
119124NANA2.81790123456790NA
120135NANA4.69753086419754NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327107uvsqtueo2s35dyf/1wnxw1280326996.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327107uvsqtueo2s35dyf/1wnxw1280326996.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327107uvsqtueo2s35dyf/2wnxw1280326996.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327107uvsqtueo2s35dyf/2wnxw1280326996.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327107uvsqtueo2s35dyf/37weh1280326996.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327107uvsqtueo2s35dyf/37weh1280326996.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327107uvsqtueo2s35dyf/4znek1280326996.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jul/28/t1280327107uvsqtueo2s35dyf/4znek1280326996.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