Home » date » 2010 » Jan » 12 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 12 Jan 2010 08:11:41 -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/12/t1263309188o5yu30x89hd3tjz.htm/, Retrieved Tue, 12 Jan 2010 16:13:16 +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/12/t1263309188o5yu30x89hd3tjz.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 «
100,7 105,9 115,4 113,9 121,5 119,5 115,8 116,3 113,5 110,7 116,9 141,1 101,8 102,9 119 112,8 120,9 123,1 121,9 119,4 110,9 116,8 120,6 143,3 106,4 106,9 125,6 110,9 127 124,3 121,3 124,4 113,2 120,2 122,6 143,3 106,5 105,9 114 121,6 119,7 122,5 126,5 118,2 115,5 120,1 115,3 146,5 107,7 106,3 121,8 115,8 115,4 124,3 121,7 118,7 113,5 113,4 115,1 144,2 100,9 103,2 121,3 111,9 117,3 124,2 122 119,6 114,9 112,2 115,3 143 104 105,3 124,3 114,1 124,8 131,9 125,8 125,2 119,8 116,2 120,2 148,6 109,4 109,6 135,2 115,2 129,1 138,8 126 130,7 120,5 126,5 128 151,7 114,8 118,9 131,5 124,8 137 137,1 137 131,3 126 129,7 125,1 157,8
 
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
1100.7NANA0.882039447959413NA
2105.9NANA0.888255135787721NA
3115.4NANA1.02545098625144NA
4113.9NANA0.956832102834369NA
5121.5NANA1.02100544232997NA
6119.5NANA1.05614625476188NA
7115.8118.827281261172115.9791666666671.024557122424340.974523684889174
8116.3117.532281109365115.91.014083529847840.989515381665928
9113.5111.331553653311115.9250.9603757054415421.01947737434296
10110.7112.988467347364116.0291666666670.973793664070360.979746009472557
11116.9114.971084110623115.9583333333330.9914861727110871.01677740019848
12141.1139.993532396916116.0833333333331.205974435580041.00790370515080
13101.8102.746570194172116.48750.8820394479594130.990787330493044
14102.9103.811117932124116.8708333333330.8882551357877210.99122331066004
15119119.866674867908116.8916666666671.025450986251440.992769676235177
16112.8111.985237235477117.03750.9568321028343691.00727562654361
17120.9119.912835012312117.4458333333331.021005442329971.00823235467318
18123.1124.299612966684117.6916666666671.056146254761880.990349020901574
19121.9120.872126518011117.9751.024557122424341.00850380903852
20119.4119.999884365328118.3333333333331.014083529847840.995000958805082
21110.9114.068624413819118.7750.9603757054415420.972221770621833
22116.8115.853043709171118.9708333333330.973793664070361.00817377136164
23120.6118.131446286140119.1458333333330.9914861727110871.0208966688504
24143.3144.053646330035119.451.205974435580040.994768293970784
25106.4105.381663044951119.4750.8820394479594131.00966332211530
26106.9106.287129123132119.6583333333330.8882551357877211.00576618149275
27125.6123.015663938188119.96251.025450986251441.02100818691765
28110.9115.011218760691120.20.9568321028343690.96425375885073
29127122.954580392587120.4251.021005442329971.03290173976843
30124.3127.274424917597120.5083333333331.056146254761880.97662983023084
31121.3123.471940216163120.51251.024557122424340.982409442887507
32124.4122.171713258418120.4751.014083529847841.0182389743268
33113.2115.197065867713119.950.9603757054415420.98266391723895
34120.2116.770032742837119.91250.973793664070361.02937369440254
35122.6119.032046226352120.0541666666670.9914861727110871.02997473274435
36143.3144.324990578041119.6751.205974435580040.99289803814339
37106.5105.683026523004119.8166666666670.8820394479594131.00773041333008
38105.9106.390758888974119.7750.8882551357877210.995387203793833
39114122.656756093000119.61251.025450986251440.929422916692526
40121.6114.536789509702119.7041666666670.9568321028343691.06166761370327
41119.7121.903795624856119.3958333333331.021005442329970.981921845718096
42122.5125.919037223985119.2251.056146254761880.972847336674727
43126.5122.340658393486119.4083333333331.024557122424341.03399803189825
44118.2121.157629728571119.4751.014083529847840.97558858046995
45115.5115.069015773654119.8166666666670.9603757054415421.00374544114633
46120.1116.757860322036119.90.973793664070361.02862453687268
47115.3118.461941677043119.4791666666670.9914861727110870.973308375396516
48146.5143.963198247367119.3751.205974435580041.01762118224322
49107.7105.18320416916119.250.8820394479594131.02392773495274
50106.3105.765279230857119.0708333333330.8882551357877211.00505573069945
51121.8122.037212788807119.0083333333331.025450986251440.998056225774206
52115.8113.524142200869118.6458333333330.9568321028343691.02004734636183
53115.4120.844502478439118.3583333333331.021005442329970.954946212969763
54124.3124.893695234987118.2541666666671.056146254761880.995246395473603
55121.7120.769670805769117.8751.024557122424341.0077033346868
56118.7119.116786624752117.46251.014083529847840.996501025283155
57113.5112.664074944611117.31250.9603757054415421.00741962383129
58113.4114.059640377841117.1291666666670.973793664070360.994216706490955
59115.1116.049325323446117.0458333333330.9914861727110870.991819639443826
60144.2141.244730873830117.1208333333331.205974435580041.02092303980394
61100.9103.312545506613117.1291666666670.8820394479594130.976648087656902
62103.2104.084996598992117.1791666666670.8882551357877210.991497366307253
63121.3120.259764412637117.2751.025450986251441.00864990541469
64111.9112.220458460758117.2833333333330.9568321028343690.997144384676796
65117.3119.704379734503117.2416666666671.021005442329970.979914020357182
66124.2123.780341058093117.21.056146254761881.00339035212151
67122120.159205520324117.2791666666671.024557122424341.01531962925108
68119.6119.15058940908117.4958333333331.014083529847841.00377178655304
69114.9113.044223661348117.7083333333330.9603757054415421.01641637474738
70112.2114.834617835497117.9250.973793664070360.97705728564124
71115.3117.321732578426118.3291666666670.9914861727110870.982767620849153
72143143.465733792690118.96251.205974435580040.99675369316158
73104105.352261730019119.4416666666670.8820394479594130.9871643787441
74105.3106.442573771895119.8333333333330.8882551357877210.989265819761707
75124.3123.331844658949120.2708333333331.025450986251441.00785000292283
76114.1115.433819606110120.6416666666670.9568321028343690.988445157487979
77124.8123.554421089956121.01251.021005442329971.01008121683592
78131.9128.268962640831121.451.056146254761881.02830799660660
79125.8124.902051199547121.9083333333331.024557122424341.00718922381041
80125.2124.035091744514122.31251.014083529847841.00939176356547
81119.8118.074191418598122.9458333333330.9603757054415421.01461630658374
82116.2120.210770355886123.4458333333330.973793664070360.966635515736138
83120.2122.617921217657123.6708333333330.9914861727110870.980280849702505
84148.6149.706651496817124.13751.205974435580040.99260786687998
85109.4109.755108641083124.4333333333330.8820394479594130.996764536562537
86109.6110.739507991268124.6708333333330.8882551357877210.989710013960345
87135.2128.108737169904124.9291666666671.025450986251441.05535346758349
88115.2119.974785294144125.38750.9568321028343690.960201760041179
89129.1128.791328171240126.1416666666671.021005442329971.00239668177309
90138.8133.703715243459126.5958333333331.056146254761881.03811625389213
91126130.067526691769126.951.024557122424340.968727577165294
92130.7129.359030276215127.56251.014083529847841.01036626295761
93120.5122.732013589990127.7958333333330.9603757054415420.98181392511455
94126.5124.686163737009128.0416666666670.973793664070361.01454721364928
95128127.674500698484128.7708333333330.9914861727110871.00254944644181
96151.7155.605876444196129.0291666666671.205974435580040.974898914273352
97114.8114.150605223414129.4166666666670.8820394479594131.00568892977234
98118.9115.384342138825129.90.8882551357877211.03046910695166
99131.5133.466718573067130.1541666666671.025450986251440.985264352086466
100124.8124.882536621599130.5166666666670.9568321028343690.999339085961642
101137133.270989549463130.5291666666671.021005442329971.02798066153139
102137.1137.998710012824130.66251.056146254761880.993487547726055
103137NANA1.02455712242434NA
104131.3NANA1.01408352984784NA
105126NANA0.960375705441542NA
106129.7NANA0.97379366407036NA
107125.1NANA0.991486172711087NA
108157.8NANA1.20597443558004NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263309188o5yu30x89hd3tjz/1de0y1263309098.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263309188o5yu30x89hd3tjz/1de0y1263309098.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263309188o5yu30x89hd3tjz/21bi31263309098.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263309188o5yu30x89hd3tjz/21bi31263309098.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263309188o5yu30x89hd3tjz/3lta01263309098.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263309188o5yu30x89hd3tjz/3lta01263309098.ps (open in new window)


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