Home » date » 2008 » Apr » 28 » attachments

test ed

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 28 Apr 2008 12:58:57 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Apr/28/t1209409168ipiiju291odhncd.htm/, Retrieved Mon, 28 Apr 2008 20:59:28 +0200
 
User-defined keywords:
 
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
 
Text written by user:
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1112NANA-24.1350694444445NA
2118NANA-33.6142361111111NA
3132NANA1.31076388888889NA
4129NANA-8.8517361111111NA
5121NANA-5.72673611111111NA
6135NANA32.1024305555556NA
7148194.039930555556126.79166666666767.2482638888889-46.0399305555555
8148193.435763888889127.2566.1857638888889-45.4357638888889
9136144.481597222222127.95833333333316.5232638888889-8.48159722222222
10119105.989930555556128.583333333333-22.593402777777813.0100694444445
1110471.7024305555555129-57.297569444444432.2975694444445
1211898.5982638888889129.75-31.151736111111119.4017361111111
13115107.114930555556131.25-24.13506944444457.88506944444447
1412699.4690972222222133.083333333333-33.614236111111126.5309027777778
15141136.227430555556134.9166666666671.310763888888894.77256944444446
16135127.564930555556136.416666666667-8.85173611111117.43506944444445
17125131.689930555556137.416666666667-5.72673611111111-6.68993055555558
18149170.852430555556138.7532.1024305555556-21.8524305555556
19170208.164930555556140.91666666666767.2482638888889-38.1649305555555
20170209.352430555556143.16666666666766.1857638888889-39.3524305555556
21158162.231597222222145.70833333333316.5232638888889-4.23159722222223
22133125.823263888889148.416666666667-22.59340277777787.17673611111113
2311494.2440972222222151.541666666667-57.297569444444419.7559027777778
24140123.556597222222154.708333333333-31.151736111111116.4434027777778
25145132.989930555556157.125-24.135069444444512.0100694444445
26150125.927430555556159.541666666667-33.614236111111124.0725694444444
27178163.144097222222161.8333333333331.3107638888888914.8559027777778
28163155.273263888889164.125-8.85173611111117.72673611111114
29172160.939930555556166.666666666667-5.7267361111111111.0600694444445
30178201.185763888889169.08333333333332.1024305555556-23.1857638888889
31199238.498263888889171.2567.2482638888889-39.4982638888889
32199239.769097222222173.58333333333366.1857638888889-40.7690972222222
33184191.981597222222175.45833333333316.5232638888889-7.9815972222222
34162154.239930555556176.833333333333-22.59340277777787.76006944444444
35146120.744097222222178.041666666667-57.297569444444425.2559027777778
36166149.014930555556180.166666666667-31.151736111111116.9850694444444
37171158.989930555556183.125-24.135069444444512.0100694444445
38180152.594097222222186.208333333333-33.614236111111127.4059027777778
39193190.352430555556189.0416666666671.310763888888892.64756944444449
40181182.439930555556191.291666666667-8.8517361111111-1.43993055555552
41183187.856597222222193.583333333333-5.72673611111111-4.85659722222226
42218227.935763888889195.83333333333332.1024305555556-9.93576388888886
43230265.289930555556198.04166666666767.2482638888889-35.2899305555555
44242265.935763888889199.7566.1857638888889-23.9357638888889
45209218.731597222222202.20833333333316.5232638888889-9.7315972222222
46191183.656597222222206.25-22.59340277777787.34340277777784
47172153.119097222222210.416666666667-57.297569444444418.8809027777778
48194182.223263888889213.375-31.151736111111111.7767361111111
49196191.698263888889215.833333333333-24.13506944444454.30173611111118
50196184.885763888889218.5-33.614236111111111.1142361111111
51236222.227430555556220.9166666666671.3107638888888913.7725694444445
52235214.064930555556222.916666666667-8.851736111111120.9350694444444
53229218.356597222222224.083333333333-5.7267361111111110.6434027777778
54243256.810763888889224.70833333333332.1024305555556-13.8107638888889
55264292.581597222222225.33333333333367.2482638888889-28.5815972222222
56272291.519097222222225.33333333333366.1857638888889-19.5190972222222
57237241.481597222222224.95833333333316.5232638888889-4.48159722222223
58211201.989930555556224.583333333333-22.59340277777789.01006944444447
59180167.160763888889224.458333333333-57.297569444444412.8392361111111
60201194.389930555556225.541666666667-31.15173611111116.61006944444443
61204203.864930555556228-24.13506944444450.135069444444468
62188196.844097222222230.458333333333-33.6142361111111-8.84409722222225
63235233.560763888889232.251.310763888888891.43923611111111
64227225.064930555556233.916666666667-8.85173611111111.93506944444445
65234229.898263888889235.625-5.726736111111114.10173611111114
66264269.852430555556237.7532.1024305555556-5.85243055555551
67302307.748263888889240.567.2482638888889-5.74826388888886
68293310.144097222222243.95833333333366.1857638888889-17.1440972222222
69259263.689930555556247.16666666666716.5232638888889-4.68993055555549
70229227.656597222222250.25-22.59340277777781.34340277777778
71203196.202430555556253.5-57.29756944444446.79756944444443
72229225.973263888889257.125-31.15173611111113.02673611111112
73242237.698263888889261.833333333333-24.13506944444454.30173611111115
74233233.052430555556266.666666666667-33.6142361111111-0.0524305555555316
75267272.435763888889271.1251.31076388888889-5.43576388888891
76269266.356597222222275.208333333333-8.85173611111112.64340277777779
77270272.773263888889278.5-5.72673611111111-2.77326388888883
78315314.060763888889281.95833333333332.10243055555560.939236111111143
79364352.998263888889285.7567.248263888888911.0017361111111
80347355.519097222222289.33333333333366.1857638888889-8.51909722222223
81312309.773263888889293.2516.52326388888892.22673611111111
82274274.573263888889297.166666666667-22.5934027777778-0.573263888888846
83237243.702430555556301-57.2975694444444-6.70243055555557
84278274.306597222222305.458333333333-31.15173611111113.69340277777781
85284285.823263888889309.958333333333-24.1350694444445-1.82326388888890
86277280.802430555556314.416666666667-33.6142361111111-3.80243055555553
87317319.935763888889318.6251.31076388888889-2.93576388888891
88313312.898263888889321.75-8.85173611111110.101736111111052
89318318.773263888889324.5-5.72673611111111-0.773263888888891
90374359.185763888889327.08333333333332.102430555555614.8142361111111
91413396.789930555556329.54166666666767.248263888888916.2100694444445
92405398.019097222222331.83333333333366.18576388888896.98090277777777
93355350.981597222222334.45833333333316.52326388888894.01840277777779
94306314.948263888889337.541666666667-22.5934027777778-8.94826388888896
95271283.244097222222340.541666666667-57.2975694444444-12.2440972222223
96306312.931597222222344.083333333333-31.1517361111111-6.9315972222222
97315324.114930555556348.25-24.1350694444445-9.11493055555553
98301319.385763888889353-33.6142361111111-18.3857638888888
99356358.935763888889357.6251.31076388888889-2.93576388888891
100348352.523263888889361.375-8.8517361111111-4.52326388888883
101355358.773263888889364.5-5.72673611111111-3.77326388888889
102422399.269097222222367.16666666666732.102430555555622.7309027777778
103465436.706597222222369.45833333333367.248263888888928.2934027777778
104467437.394097222222371.20833333333366.185763888888929.6059027777778
105404388.689930555555372.16666666666716.523263888888915.3100694444445
106347349.823263888889372.416666666667-22.5934027777778-2.82326388888885
107305315.452430555556372.75-57.2975694444444-10.4524305555556
108336342.473263888889373.625-31.1517361111111-6.47326388888888
109340351.114930555556375.25-24.1350694444445-11.1149305555556
110318344.302430555556377.916666666667-33.6142361111111-26.3024305555556
111362380.810763888889379.51.31076388888889-18.8107638888889
112348371.148263888889380-8.8517361111111-23.1482638888889
113363374.981597222222380.708333333333-5.72673611111111-11.9815972222222
114435413.060763888889380.95833333333332.102430555555621.9392361111112
115491449.081597222222381.83333333333367.248263888888941.9184027777777
116505449.852430555556383.66666666666766.185763888888955.1475694444444
117404403.023263888889386.516.52326388888890.976736111111165
118359367.739930555556390.333333333333-22.5934027777778-8.73993055555553
119310337.410763888889394.708333333333-57.2975694444444-27.4107638888889
120337367.473263888889398.625-31.1517361111111-30.4732638888889
121360378.406597222222402.541666666667-24.1350694444445-18.4065972222222
122342373.552430555556407.166666666667-33.6142361111111-31.5524305555556
123406413.185763888889411.8751.31076388888889-7.18576388888886
124396407.481597222222416.333333333333-8.8517361111111-11.4815972222221
125420414.773263888889420.5-5.726736111111115.22673611111117
126472457.602430555556425.532.102430555555614.3975694444445
127548497.956597222222430.70833333333367.248263888888950.0434027777778
128559501.310763888889435.12566.185763888888957.6892361111111
129463454.231597222222437.70833333333316.52326388888898.7684027777778
130407418.364930555555440.958333333333-22.5934027777778-11.3649305555555
131362388.535763888889445.833333333333-57.2975694444444-26.5357638888888
132405419.473263888889450.625-31.1517361111111-14.4732638888889
133417432.198263888889456.333333333333-24.1350694444445-15.1982638888888
134391427.760763888889461.375-33.6142361111111-36.7607638888889
135419466.519097222222465.2083333333331.31076388888889-47.5190972222222
136461460.481597222222469.333333333333-8.85173611111110.518402777777794
137472467.023263888889472.75-5.726736111111114.97673611111117
138535507.144097222222475.04166666666732.102430555555627.8559027777778
139622NANA67.2482638888889NA
140606NANA66.1857638888889NA
141508NANA16.5232638888889NA
142461NANA-22.5934027777778NA
143390NANA-57.2975694444444NA
144432NANA-31.1517361111111NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/28/t1209409168ipiiju291odhncd/1u5s31209409131.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/28/t1209409168ipiiju291odhncd/1u5s31209409131.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/28/t1209409168ipiiju291odhncd/2sz0i1209409131.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/28/t1209409168ipiiju291odhncd/2sz0i1209409131.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/28/t1209409168ipiiju291odhncd/3j9j91209409131.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/28/t1209409168ipiiju291odhncd/3j9j91209409131.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/28/t1209409168ipiiju291odhncd/4q7ac1209409131.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Apr/28/t1209409168ipiiju291odhncd/4q7ac1209409131.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])
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