Home » date » 2010 » Jan » 08 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 08 Jan 2010 03:40:23 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947258opr3d17xkkj7f6w.htm/, Retrieved Fri, 08 Jan 2010 11:41:03 +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/2010/Jan/08/t1262947258opr3d17xkkj7f6w.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
112 118 132 129 121 135 148 148 136 119 104 118 115 126 141 135 125 149 170 170 158 133 114 140 145 150 178 163 172 178 199 199 184 162 146 166 171 180 193 181 183 218 230 242 209 191 172 194 196 196 236 235 229 243 264 272 237 211 180 201 204 188 235 227 234 264 302 293 259 229 203 229 242 233 267 269 270 315 364 347 312 274 237 278 284 277 317 313 318 374 413 405 355 306 271 306 315 301 356 348 355 422 465 467 404 347 305 336 340 318 362 348 363 435 491 505 404 359 310 337 360 342 406 396 420 472 548 559 463 407 362 405 417 391 419 461 472 535 622 606 508 461 390 432
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1112NANA0.9102303673722NA
2118NANA0.883625320694376NA
3132NANA1.00736628760355NA
4129NANA0.975906012322847NA
5121NANA0.98137802749513NA
6135NANA1.11277582667927NA
7148155.517021547485126.7916666666671.22655554293120.951664316402883
8148155.233670861956127.251.219910969445620.953401405624245
9136135.698780214932127.9583333333331.060491932646821.00221976781656
10119118.522618496116128.5833333333330.9217572404104981.00402776710421
11104103.3519726313381290.8011780824134741.00627010159713
12118116.622464600555129.750.8988243899850111.01181192152098
13115119.467735717601131.250.91023036737220.962602993262028
14126117.595803095743133.0833333333330.8836253206943761.07146680989469
15141135.910501635845134.9166666666671.007366287603551.03744742534901
16135133.129845181042136.4166666666670.9759060123228471.01404760004351
17125134.857697278289137.4166666666670.981378027495130.926902969001859
18149154.397645951749138.751.112775826679270.965040620156632
19170172.842118591388140.9166666666671.22655554293120.983556562401856
20170174.650587125632143.1666666666671.219910969445620.973372049861552
21158154.522512019413145.7083333333331.060491932646821.02250473368016
22133136.804137097591148.4166666666670.9217572404104980.972192821223838
23114121.411861905742151.5416666666670.8011780824134740.938952736665087
24140139.055623333931154.7083333333330.8988243899850111.00679135905062
25145143.019946473357157.1250.91023036737221.01384459703327
26150140.975056372449159.5416666666670.8836253206943761.06401801751161
27178163.025444210507161.8333333333331.007366287603551.09185410205144
28163160.170574272487164.1250.9759060123228471.01766507824776
29172163.563004582522166.6666666666670.981378027495131.05158254116824
30178188.151846027687169.0833333333331.112775826679270.946044398489754
31199210.047636726968171.251.22655554293120.947404136989513
32199211.756212446270173.5833333333331.219910969445620.939759914011937
33184186.072147015656175.4583333333331.060491932646820.988863744257855
34162162.997405345923176.8333333333330.9217572404104980.993880851392657
35146142.643081089699178.0416666666670.8011780824134741.02353369602406
36166161.938194262300180.1666666666670.8988243899850111.02508244430046
37171166.685936025034183.1250.91023036737221.02588139154294
38180164.538398257632186.2083333333330.8836253206943761.09396956519632
39193190.434201952387189.0416666666671.007366287603551.01347340982506
40181186.682687607258191.2916666666670.9759060123228470.96955964326369
41183189.978429822599193.5833333333330.981378027495130.963267251818455
42218217.918599391358195.8333333333331.112775826679271.00037353676497
43230242.909103981333198.0416666666671.22655554293120.946856236469732
44242243.677216146764199.751.219910969445620.993117057994649
45209214.440306213959202.2083333333331.060491932646820.97463020683933
46191190.112430834665206.250.9217572404104981.00466865402456
47172168.581221507835210.4166666666670.8011780824134741.02027971123703
48194191.786654213052213.3750.8988243899850111.01154066635153
49196196.458054291167215.8333333333330.91023036737220.997668437199893
50196193.072132571721218.50.8836253206943761.01516462986802
51236222.54400236975220.9166666666671.007366287603551.06046443618774
52235217.545715246968222.9166666666670.9759060123228471.08023272135338
53229219.910459661200224.0833333333330.981378027495131.04133291500915
54243250.050001386722224.7083333333331.112775826679270.971805633482808
55264276.383849007164225.3333333333331.22655554293120.955193297106
56272274.886605115081225.3333333333331.219910969445620.989498924060442
57237238.566497681674224.9583333333331.060491932646820.99343370633808
58211207.011313575524224.5833333333330.9217572404104981.0192679634537
59180179.831097081724224.4583333333330.8011780824134741.00093923087284
60201202.722350957869225.5416666666670.8988243899850110.991503892147406
61204207.5325237608622280.91023036737220.982978457078215
62188203.638818698358230.4583333333330.8836253206943760.92320315547733
63235233.960820295923232.251.007366287603551.00444168259781
64227228.280681382519233.9166666666670.9759060123228470.99438988277605
65234231.237197728540235.6250.981378027495131.01194791451635
66264264.562452792997237.751.112775826679270.997874026389386
67302294.986608074954240.51.22655554293121.02377528922691
68293297.607446921006243.9583333333331.219910969445620.98451837489729
69259262.118256019205247.1666666666671.060491932646820.988103629001039
70229230.669749412727250.250.9217572404104980.992761298709613
71203203.098643891816253.50.8011780824134740.99951430551221
72229231.110221274896257.1250.8988243899850110.990869199712348
73242238.328651190288261.8333333333330.91023036737221.01540456336817
74233235.633418851833266.6666666666670.8836253206943760.988824085884484
75267273.122184726511271.1251.007366287603550.977584447295478
76269268.57746714135275.2083333333330.9759060123228471.00157322527145
77270273.313780657393278.50.981378027495130.987875544916093
78315313.75641746411281.9583333333331.112775826679271.00396352860586
79364350.488246392591285.751.22655554293121.03855123173595
80347352.960907159601289.3333333333331.219910969445620.983111707164484
81312310.989259248679293.251.060491932646821.00325008250691
82274273.915526608653297.1666666666670.9217572404104981.00030839212509
83237241.1546028064563010.8011780824134740.982772036037852
84278274.553400124172305.4583333333330.8988243899850111.01255347729902
85284282.133487620075309.9583333333330.91023036737221.00661570661345
86277277.82652791499314.4166666666670.8836253206943760.997025021616212
87317320.97208338768318.6251.007366287603550.987624832210463
88313313.997759464876321.750.9759060123228470.996822399412733
89318318.457169922169324.50.981378027495130.998564422580653
90374363.970426643012327.0833333333331.112775826679271.02755601176033
91413404.201157876786329.5416666666671.22655554293121.02176847332510
92405404.80712336104331.8333333333331.219910969445621.00047646552600
93355354.690364306500334.4583333333331.060491932646821.00087297464115
94306311.131475190227337.5416666666670.9217572404104980.983507052164718
95271272.834519481889340.5416666666670.8011780824134740.993276072670818
96306309.270492187343344.0833333333330.8988243899850110.98942513990193
97315316.987725437369348.250.91023036737220.993729329946053
98301311.9197382051153530.8836253206943760.964991833258292
99356360.259368604218357.6251.007366287603550.988176938685258
100348352.668035203169361.3750.9759060123228470.986763656648157
101355357.712291021975364.50.981378027495130.992417674510916
102422408.574191029073367.1666666666671.112775826679271.03286014943115
103465453.161166632123369.4583333333331.22655554293121.02612499534296
104467452.841117782961371.2083333333331.219910969445621.03126677693571
105404394.679747600057372.1666666666671.060491932646821.02361472169934
106347343.277758949543372.4166666666670.9217572404104981.01084323395098
107305298.639130219623372.750.8011780824134741.02129951883968
108336335.82326270815373.6250.8988243899850111.00052628067045
109340341.563945356418375.250.91023036737220.995421222357686
110318333.936735779083377.9166666666670.8836253206943760.95227618266705
111362382.295506145545379.51.007366287603550.946911470788206
112348370.8442846826823800.9759060123228470.938399253740073
113363373.618793217625380.7083333333330.981378027495130.971578535634744
114435423.921224305358380.9583333333331.112775826679271.02613404344827
115491468.339791475897381.8333333333331.22655554293121.04838411968518
116505468.039175277305383.6666666666671.219910969445621.07896951083378
117404409.880131967995386.51.060491932646820.985654020506526
118359359.792576173564390.3333333333330.9217572404104980.997797130274356
119310316.231665612618394.7083333333330.8011780824134740.98029398605435
120337358.293872457775398.6250.8988243899850110.9405686948769
121360366.405649132618402.5416666666670.91023036737220.98251760269586
122342359.782776409393407.1666666666670.8836253206943760.950573575014168
123406414.90898970671411.8751.007366287603550.978527846039181
124396406.302203130412416.3333333333330.9759060123228470.97464398900366
125420412.669460561702420.50.981378027495131.01776370712851
126472473.48611425203425.51.112775826679270.996861335090305
127548528.287693636659430.7083333333331.22655554293121.03731358235442
128559530.813760580028435.1251.219910969445621.05310005413042
129463464.186156352284437.7083333333331.060491932646820.99744465375356
130407406.456536469346440.9583333333330.9217572404104981.00133707661679
131362357.191895076007445.8333333333330.8011780824134741.01346084552946
132405405.032740736996450.6250.8988243899850110.999919165208876
133417415.368457644181456.3333333333330.91023036737221.00392793994294
134391407.682632335368461.3750.8836253206943760.959079364652345
135419468.635191712233465.2083333333331.007366287603550.894085650010869
136461458.025221783523469.3333333333330.9759060123228471.00649479128004
137472463.946462498322472.750.981378027495131.01735876475555
138535528.6148833321475.0416666666671.112775826679271.01207895742105
139622NANA1.2265555429312NA
140606NANA1.21991096944562NA
141508NANA1.06049193264682NA
142461NANA0.921757240410498NA
143390NANA0.801178082413474NA
144432NANA0.898824389985011NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947258opr3d17xkkj7f6w/12qp81262947218.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947258opr3d17xkkj7f6w/12qp81262947218.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947258opr3d17xkkj7f6w/200981262947218.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947258opr3d17xkkj7f6w/200981262947218.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947258opr3d17xkkj7f6w/3nqby1262947218.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947258opr3d17xkkj7f6w/3nqby1262947218.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947258opr3d17xkkj7f6w/42a741262947218.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/08/t1262947258opr3d17xkkj7f6w/42a741262947218.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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