Home » date » 2010 » Aug » 03 »

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: Tue, 03 Aug 2010 14:28:38 +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/03/t1280845790ri4qo52buokpgg8.htm/, Retrieved Tue, 03 Aug 2010 16:29:56 +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/03/t1280845790ri4qo52buokpgg8.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:
Lisa Bruggeman
 
Dataseries X:
» Textbox « » Textfile « » CSV «
95 94 93 91 111 110 95 85 86 86 87 89 93 96 99 92 109 110 97 88 93 93 89 89 91 97 99 85 101 105 88 80 87 84 87 87 85 96 102 93 111 117 101 88 98 89 93 93 95 105 109 94 113 125 106 95 109 100 94 94 94 103 103 80 106 117 99 95 116 118 100 100 105 121 131 108 136 149 131 137 164 169 154 160 166 186 197 166 191 207 187 191 222 230 210 224 234 251 258 227 254 281 261 264 286 293 276 292 299 319 329 293 318 346 327 329 353 355 332 346
 
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
195NANA-4.21682098765432NA
294NANA6.02391975308642NA
393NANA9.54706790123456NA
491NANA-13.9344135802469NA
5111NANA6.0192901234568NA
6110NANA16.8063271604938NA
79590.681327160493893.4166666666666-2.735339506172844.31867283950619
88584.02854938271693.4166666666667-9.388117283950620.971450617283963
98697.560956790123493.753.81095679012345-11.5609567901234
108695.935956790123594.04166666666671.89429012345679-9.93595679012346
118786.000771604938394-7.999228395061730.99922839506172
128988.088734567901293.9166666666667-5.827932098765430.911265432098773
139389.783179012345794-4.216820987654323.21682098765432
1496100.23225308642094.20833333333336.02391975308642-4.23225308641976
1599104.17206790123594.6259.54706790123456-5.17206790123454
169281.273919753086495.2083333333333-13.934413580246910.7260802469136
17109101.60262345679095.58333333333336.01929012345687.39737654320987
18110112.47299382716195.666666666666716.8063271604938-2.47299382716049
199792.847993827160595.5833333333333-2.735339506172844.15200617283949
208886.15354938271695.5416666666667-9.388117283950621.84645061728395
219399.394290123456895.58333333333333.81095679012345-6.39429012345678
229397.185956790123495.29166666666671.89429012345679-4.18595679012344
238986.66743827160594.6666666666667-7.999228395061732.33256172839506
248988.297067901234694.125-5.827932098765430.702932098765444
259189.324845679012493.5416666666667-4.216820987654321.67515432098764
269798.857253086419892.83333333333336.02391975308642-1.85725308641976
2799101.79706790123592.259.54706790123456-2.79706790123456
288577.690586419753191.625-13.93441358024697.30941358024691
2910197.185956790123591.16666666666676.01929012345683.81404320987654
30105107.8063271604949116.8063271604938-2.80632716049381
318887.931327160493890.6666666666667-2.735339506172840.0686728395061778
328080.986882716049490.375-9.38811728395062-0.98688271604938
338794.269290123456890.45833333333333.81095679012345-7.26929012345678
348492.810956790123590.91666666666671.89429012345679-8.81095679012346
358783.66743827160591.6666666666667-7.999228395061733.33256172839505
368786.755401234567992.5833333333333-5.827932098765430.244598765432087
378589.408179012345793.625-4.21682098765432-4.40817901234568
3896100.52391975308694.56.02391975308642-4.5239197530864
39102104.83873456790195.29166666666679.54706790123456-2.83873456790121
409382.023919753086495.9583333333333-13.934413580246910.9760802469136
41111102.43595679012396.41666666666676.01929012345688.56404320987654
42117113.72299382716096.916666666666716.80632716049383.27700617283952
4310194.847993827160597.5833333333333-2.735339506172846.15200617283951
448888.986882716049498.375-9.38811728395062-0.98688271604938
4598102.85262345679099.04166666666673.81095679012345-4.85262345679011
4689101.26929012345799.3751.89429012345679-12.2692901234568
479391.500771604938399.5-7.999228395061731.49922839506172
489394.088734567901299.9166666666667-5.82793209876543-1.08873456790124
499596.241512345679100.458333333333-4.21682098765432-1.24151234567903
50105106.982253086420100.9583333333336.02391975308642-1.98225308641976
51109111.255401234568101.7083333333339.54706790123456-2.25540123456788
529488.6905864197531102.625-13.93441358024695.30941358024691
53113109.144290123457103.1256.01929012345683.85570987654322
54125120.014660493827103.20833333333316.80632716049384.98533950617286
55106100.472993827160103.208333333333-2.735339506172845.52700617283951
569593.6952160493827103.083333333333-9.388117283950621.30478395061729
57109106.560956790123102.753.810956790123452.43904320987654
58100103.810956790123101.9166666666671.89429012345679-3.81095679012346
599493.042438271605101.041666666667-7.999228395061730.957561728395063
609494.5887345679012100.416666666667-5.82793209876543-0.588734567901227
619495.574845679012399.7916666666667-4.21682098765432-1.57484567901234
62103105.52391975308699.56.02391975308642-2.52391975308639
63103109.33873456790199.79166666666669.54706790123456-6.3387345679012
648086.8989197530864100.833333333333-13.9344135802469-6.8989197530864
65106107.852623456790101.8333333333336.0192901234568-1.85262345679011
66117119.139660493827102.33333333333316.8063271604938-2.13966049382714
6799100.306327160494103.041666666667-2.73533950617284-1.30632716049382
689594.8618827160494104.25-9.388117283950620.138117283950621
69116109.977623456790106.1666666666673.810956790123456.02237654320989
70118110.394290123457108.51.894290123456797.60570987654323
71100102.917438271605110.916666666667-7.99922839506173-2.91743827160495
72100107.672067901235113.5-5.82793209876543-7.67206790123456
73105111.949845679012116.166666666667-4.21682098765432-6.94984567901234
74121125.273919753086119.256.02391975308642-4.2739197530864
75131132.5470679012351239.54706790123456-1.54706790123453
76108113.190586419753127.125-13.9344135802469-5.19058641975307
77136137.519290123457131.56.0192901234568-1.51929012345676
78149153.056327160494136.2516.8063271604938-4.05632716049379
79131138.556327160494141.291666666667-2.73533950617284-7.55632716049382
80137137.153549382716146.541666666667-9.38811728395062-0.153549382716051
81164155.8109567901231523.810956790123458.18904320987653
82169159.060956790123157.1666666666671.894290123456799.93904320987656
83154153.875771604938161.875-7.999228395061730.124228395061778
84160160.755401234568166.583333333333-5.82793209876543-0.755401234567842
85166167.116512345679171.333333333333-4.21682098765432-1.11651234567896
86186181.940586419753175.9166666666676.023919753086424.05941358024694
87197190.130401234568180.5833333333339.547067901234566.86959876543207
88166171.607253086420185.541666666667-13.9344135802469-5.60725308641977
89191196.435956790123190.4166666666676.0192901234568-5.43595679012344
90207212.222993827160195.41666666666716.8063271604938-5.22299382716048
91187198.181327160494200.916666666667-2.73533950617284-11.1813271604938
92191197.070216049383206.458333333333-9.38811728395062-6.07021604938271
93222215.519290123457211.7083333333333.810956790123456.48070987654322
94230218.685956790123216.7916666666671.8942901234567911.3140432098766
95210213.959104938272221.958333333333-7.99922839506173-3.95910493827159
96224221.838734567901227.666666666667-5.827932098765432.16126543209882
97234229.616512345679233.833333333333-4.216820987654324.38348765432104
98251245.982253086420239.9583333333336.023919753086425.01774691358028
99258255.213734567901245.6666666666679.547067901234562.78626543209882
100227237.023919753086250.958333333333-13.9344135802469-10.0239197530864
101254262.35262345679256.3333333333336.0192901234568-8.35262345679004
102281278.722993827160261.91666666666716.80632716049382.27700617283955
103261264.722993827160267.458333333333-2.73533950617284-3.72299382716045
104264263.611882716049273-9.388117283950620.388117283950692
105286282.60262345679278.7916666666673.810956790123453.39737654320993
106293286.394290123457284.51.894290123456796.60570987654324
107276281.917438271605289.916666666667-7.99922839506173-5.91743827160491
108292289.463734567901295.291666666667-5.827932098765432.53626543209873
109299296.533179012346300.75-4.216820987654322.46682098765433
110319312.23225308642306.2083333333336.023919753086426.76774691358025
111329321.255401234568311.7083333333339.547067901234567.74459876543204
112293303.148919753086317.083333333333-13.9344135802469-10.1489197530864
113318328.0192901234573226.0192901234568-10.0192901234568
114346343.389660493827326.58333333333316.80632716049382.61033950617286
115327NANA-2.73533950617284NA
116329NANA-9.38811728395062NA
117353NANA3.81095679012345NA
118355NANA1.89429012345679NA
119332NANA-7.99922839506173NA
120346NANA-5.82793209876543NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/03/t1280845790ri4qo52buokpgg8/1wqec1280845715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/03/t1280845790ri4qo52buokpgg8/1wqec1280845715.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/03/t1280845790ri4qo52buokpgg8/2wqec1280845715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/03/t1280845790ri4qo52buokpgg8/2wqec1280845715.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/03/t1280845790ri4qo52buokpgg8/37hdx1280845715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/03/t1280845790ri4qo52buokpgg8/37hdx1280845715.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/03/t1280845790ri4qo52buokpgg8/47hdx1280845715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/03/t1280845790ri4qo52buokpgg8/47hdx1280845715.ps (open in new window)


 
Parameters (Session):
 
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