Home » date » 2010 » Jan » 12 »

KDGP2W52

*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 09:57: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/t1263315578i8wqo482cqqyrjh.htm/, Retrieved Tue, 12 Jan 2010 17:59:44 +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/t1263315578i8wqo482cqqyrjh.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:
oef 9 2
 
Dataseries X:
» Textbox « » Textfile « » CSV «
104,65 109,2 103,93 101,93 101,58 102,63 106,83 105,57 105 104,16 106,93 106,5 106,47 112,33 106,81 103,49 104,13 103,2 105,55 102,8 106,68 105,43 109,01 112,24 112,87 110,98 112,85 112,08 110,72 109,69 112,53 112,99 111,74 111,15 114,82 117,38 117,81 122,85 116,96 119,16 117,74 118,84 123,81 120,33 119,2 117,32 128,58 129,2 126,19 132,1 128,12 122,28 122,36 123,13 125,97 126,14 122,7 122,67 129,19 133,01 123,96 128,96 127,32 131,38 125,25 127,91 130,42 128,44 125,86 125,71 130,63 131,78 125,61 131,84 122,14 127,13 124,49 125,48 129,86 126,32 125,56 125,64 128,26 125,47 134,4 134,5 131,22 121,62 124,16 127,5 132,86 127,87 124,07 124,25 131,16 129,24 129,24 135,51 128,97 126,89 127,52 130,31 132,39 132,69 128,73 129,66 127,72 132,63 129,74 138,46 134,31 128,8 129,95 134,15 136,01 135,1 132,27 132,49 130,06 136,11 131,47 140,61 141,65 126,75 133,9 138,75 141,86 141,13 138,76 138,65 1 etc...
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1104.65NANA0.313829861111111NA
2109.2NANA5.05770486111112NA
3103.93NANA0.989871527777777NA
4101.93NANA-2.37150347222222NA
5101.58NANA-2.58312847222222NA
6102.63NANA-1.01017013888889NA
7106.83106.895288194444104.9851.91028819444445-0.0652881944444346
8105.57105.049246527778105.19125-0.1420034722222270.520753472222225
9105103.153746527778105.441666666667-2.287920138888891.84625347222223
10104.16102.773454861111105.626666666667-2.853211805555561.38654513888889
11106.93106.145413194444105.7979166666670.3474965277777760.784586805555563
12106.5108.556663194444105.9279166666672.62874652777778-2.05666319444444
13106.47106.212163194444105.8983333333330.3138298611111110.25783680555557
14112.33110.787288194444105.7295833333335.057704861111121.54271180555556
15106.81106.674038194444105.6841666666670.9898715277777770.135961805555553
16103.49103.435579861111105.807083333333-2.371503472222220.0544201388888723
17104.13103.363538194444105.946666666667-2.583128472222220.76646180555555
18103.2105.262329861111106.2725-1.01017013888889-2.06232986111111
19105.55108.688621527778106.7783333333331.91028819444445-3.13862152777777
20102.8106.846746527778106.98875-0.142003472222227-4.04674652777776
21106.68104.896246527778107.184166666667-2.287920138888891.78375347222224
22105.43104.940538194444107.79375-2.853211805555560.489461805555578
23109.01108.773746527778108.426250.3474965277777760.236253472222231
24112.24111.599996527778108.971252.628746527777780.640003472222233
25112.87109.846329861111109.53250.3138298611111113.02367013888890
26110.98115.305621527778110.2479166666675.05770486111112-4.32562152777778
27112.85111.873204861111110.8833333333330.9898715277777770.976795138888889
28112.08108.960996527778111.3325-2.371503472222223.11900347222223
29110.72109.229788194444111.812916666667-2.583128472222221.49021180555557
30109.69111.258996527778112.269166666667-1.01017013888889-1.56899652777777
31112.53114.599454861111112.6891666666671.91028819444445-2.06945486111110
32112.99113.247579861111113.389583333333-0.142003472222227-0.257579861111125
33111.74111.767496527778114.055416666667-2.28792013888889-0.027496527777771
34111.15111.668454861111114.521666666667-2.85321180555556-0.518454861111096
35114.82115.456663194444115.1091666666670.347496527777776-0.636663194444438
36117.38118.411663194444115.7829166666672.62874652777778-1.03166319444442
37117.81116.947996527778116.6341666666670.3138298611111110.862003472222227
38122.85122.467704861111117.415.057704861111120.382295138888892
39116.96119.016538194444118.0266666666670.989871527777777-2.05653819444444
40119.16116.223079861111118.594583333333-2.371503472222222.93692013888889
41117.74116.841871527778119.425-2.583128472222220.898128472222226
42118.84119.480663194444120.490833333333-1.01017013888889-0.640663194444443
43123.81123.242788194444121.33251.910288194444450.567211805555559
44120.33121.925079861111122.067083333333-0.142003472222227-1.59507986111110
45119.2120.629579861111122.9175-2.28792013888889-1.42957986111109
46117.32120.659288194444123.5125-2.85321180555556-3.33928819444446
47128.58124.182496527778123.8350.3474965277777764.39750347222224
48129.2126.834996527778124.206252.628746527777782.36500347222221
49126.19124.788829861111124.4750.3138298611111111.40117013888887
50132.1129.864788194444124.8070833333335.057704861111122.23521180555555
51128.12126.184871527778125.1950.9898715277777771.93512847222223
52122.28123.192246527778125.56375-2.37150347222222-0.912246527777768
53122.36123.228954861111125.812083333333-2.58312847222222-0.868954861111092
54123.13124.986079861111125.99625-1.01017013888889-1.85607986111111
55125.97127.972371527778126.0620833333331.91028819444445-2.00237152777778
56126.14125.696329861111125.838333333333-0.1420034722222270.443670138888905
57122.7123.386246527778125.674166666667-2.28792013888889-0.686246527777783
58122.67123.166788194444126.02-2.85321180555556-0.49678819444442
59129.19126.867079861111126.5195833333330.3474965277777762.32292013888892
60133.01129.467913194444126.8391666666672.628746527777783.54208680555556
61123.96127.537579861111127.223750.313829861111111-3.5775798611111
62128.96132.562704861111127.5055.05770486111112-3.60270486111108
63127.32128.722371527778127.73250.989871527777777-1.40237152777777
64131.38125.619329861111127.990833333333-2.371503472222225.7606701388889
65125.25125.594371527778128.1775-2.58312847222222-0.344371527777753
66127.91127.176079861111128.18625-1.010170138888890.733920138888891
67130.42130.114038194444128.203751.910288194444450.305961805555540
68128.44128.250496527778128.3925-0.1420034722222270.189503472222214
69125.86126.008746527778128.296666666667-2.28792013888889-0.148746527777774
70125.71125.050538194444127.90375-2.853211805555560.659461805555566
71130.63128.042496527778127.6950.3474965277777762.58750347222224
72131.78130.190829861111127.5620833333332.628746527777781.58917013888889
73125.61127.751329861111127.43750.313829861111111-2.14132986111112
74131.84132.383538194444127.3258333333335.05770486111112-0.543538194444437
75122.14128.214871527778127.2250.989871527777777-6.07487152777777
76127.13124.838079861111127.209583333333-2.371503472222222.29192013888890
77124.49124.524788194444127.107916666667-2.58312847222222-0.0347881944444310
78125.48125.736079861111126.74625-1.01017013888889-0.256079861111076
79129.86128.759871527778126.8495833333331.910288194444451.10012847222225
80126.32127.184663194444127.326666666667-0.142003472222227-0.864663194444447
81125.56125.527913194444127.815833333333-2.287920138888890.0320868055555508
82125.64125.111371527778127.964583333333-2.853211805555560.528628472222209
83128.26128.068746527778127.721250.3474965277777760.191253472222201
84125.47130.420413194444127.7916666666672.62874652777778-4.95041319444447
85134.4128.314663194444128.0008333333330.3138298611111116.08533680555556
86134.5133.248121527778128.1904166666675.057704861111121.25187847222222
87131.22129.182788194444128.1929166666670.9898715277777772.03721180555556
88121.62125.701413194444128.072916666667-2.37150347222222-4.08141319444444
89124.16125.552704861111128.135833333333-2.58312847222222-1.3927048611111
90127.5127.403579861111128.41375-1.010170138888890.0964201388889023
91132.86130.266121527778128.3558333333331.910288194444452.59387847222226
92127.87128.040913194444128.182916666667-0.142003472222227-0.170913194444438
93124.07125.843329861111128.13125-2.28792013888889-1.77332986111111
94124.25125.403871527778128.257083333333-2.85321180555556-1.15387152777777
95131.16128.964163194444128.6166666666670.3474965277777762.19583680555556
96129.24131.502496527778128.873752.62874652777778-2.26249652777777
97129.24129.285079861111128.971250.313829861111111-0.0450798611111338
98135.51134.210204861111129.15255.057704861111121.29979513888887
99128.97130.537371527778129.54750.989871527777777-1.56737152777779
100126.89127.595579861111129.967083333333-2.37150347222222-0.705579861111119
101127.52127.466038194444130.049166666667-2.583128472222220.0539618055555593
102130.31129.036913194444130.047083333333-1.010170138888891.27308680555555
103132.39132.119454861111130.2091666666671.910288194444450.270545138888878
104132.69130.210913194444130.352916666667-0.1420034722222272.47908680555557
105128.73128.410413194444130.698333333333-2.287920138888890.319586805555559
106129.66128.147204861111131.000416666667-2.853211805555561.51279513888889
107127.72131.528746527778131.181250.347496527777776-3.80874652777776
108132.63134.071246527778131.44252.62874652777778-1.44124652777779
109129.74132.067163194444131.7533333333330.313829861111111-2.32716319444444
110138.46137.062288194444132.0045833333335.057704861111121.39771180555556
111134.31133.242371527778132.25250.9898715277777771.06762847222222
112128.8130.146413194444132.517916666667-2.37150347222222-1.34641319444441
113129.95130.150204861111132.733333333333-2.58312847222222-0.200204861111132
114134.15131.965663194444132.975833333333-1.010170138888892.18433680555557
115136.01135.103204861111133.1929166666671.910288194444450.906795138888896
116135.1133.212579861111133.354583333333-0.1420034722222271.8874201388889
117132.27131.462079861111133.75-2.287920138888890.807920138888932
118132.49131.117204861111133.970416666667-2.853211805555561.37279513888890
119130.06134.397079861111134.0495833333330.347496527777776-4.33707986111108
120136.11137.034579861111134.4058333333332.62874652777778-0.924579861111113
121131.47135.155079861111134.841250.313829861111111-3.68507986111112
122140.61140.393954861111135.336255.057704861111120.216045138888887
123141.65136.847788194444135.8579166666670.9898715277777774.80221180555557
124126.75134.013496527778136.385-2.37150347222222-7.26349652777776
125133.9134.413954861111136.997083333333-2.58312847222222-0.513954861111102
126138.75136.799829861111137.81-1.010170138888891.95017013888889
127141.86140.540288194444138.631.910288194444451.31971180555558
128141.13139.340913194444139.482916666667-0.1420034722222271.78908680555557
129138.76137.784163194444140.072083333333-2.287920138888890.97583680555553
130138.65137.850954861111140.704166666667-2.853211805555560.799045138888886
131138.59141.884996527778141.53750.347496527777776-3.29499652777778
132147.09144.762079861111142.1333333333332.628746527777782.32792013888889
133140.17NA142.68NANA
134152.38NA143.099166666667NANA
135144.02NANANANA
136139.55NANANANA
137141.1NANANANA
138145.85NANANANA
139147.88NANANANA
140145.17NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263315578i8wqo482cqqyrjh/1xwqb1263315458.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263315578i8wqo482cqqyrjh/1xwqb1263315458.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263315578i8wqo482cqqyrjh/2j5601263315458.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263315578i8wqo482cqqyrjh/2j5601263315458.ps (open in new window)


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


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