Home » date » 2008 » May » 25 »

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 25 May 2008 08:55:09 -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/May/25/t1211727432roi74m59v9h9tky.htm/, Retrieved Sun, 25 May 2008 16:57:16 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
138463 138529 138421 138674 138848 139174 139565 139585 139500 139756 140245 140138 140224 140354 140563 141244 141597 141708 142055 142457 142429 142613 142564 142778 143086 143362 143619 143791 144088 144369 144295 144671 144846 145395 145583 145949 145915 145888 146145 145713 145913 146087 146045 145753 146260 146016 146647 146211 146248
 
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 time6 seconds
R Server'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1138463NANA-192.779513888897NA
2138529NANA-194.279513888897NA
3138421NANA-178.612847222210NA
4138674NANA19.032986111118NA
5138848NANA115.345486111133NA
6139174NANA79.074652777775NA
7139565139290.824652778139314.875-24.0503472222105274.175347222219
8139585139595.387152778139464.291666667131.095486111103-10.3871527777519
9139500139602.595486111139629.583333333-26.9878472222250-102.595486111095
10139756139956.032986111139825.916666667130.116319444432-200.032986111095
11140245140064.137152778140047.54166666716.5954861111034180.862847222248
12140138140393.116319444140267.666666667125.449652777775-255.116319444409
13140224140284.220486111140477-192.779513888897-60.2204861110949
14140354140506.137152778140700.416666667-194.279513888897-152.137152777752
15140563140763.512152778140942.125-178.612847222210-200.512152777781
16141244141202.241319444141183.20833333319.03298611111841.758680555562
17141597141514.220486111141398.875115.34548611113382.779513888905
18141708141684.574652778141605.579.07465277777523.425347222219
19142055141810.699652778141834.75-24.0503472222105244.300347222248
20142457142210.428819444142079.333333333131.095486111103246.571180555562
21142429142305.012152778142332-26.9878472222250123.987847222219
22142613142695.574652778142565.458333333130.116319444432-82.574652777781
23142564142791.970486111142775.37516.5954861111034-227.970486111095
24142778143115.491319444142990.041666667125.449652777775-337.491319444438
25143086143001.470486111143194.25-192.77951388889784.529513888905
26143362143185.553819444143379.833333333-194.279513888897176.446180555562
27143619143394.178819444143572.791666667-178.612847222210224.821180555591
28143791143808.449652778143789.41666666719.032986111118-17.449652777781
29144088144146.470486111144031.125115.345486111133-58.4704861110949
30144369144368.116319444144289.04166666779.0746527777750.883680555562023
31144295144514.991319444144539.041666667-24.0503472222105-219.991319444438
32144671144893.262152778144762.166666667131.095486111103-222.262152777752
33144846144945.678819444144972.666666667-26.9878472222250-99.678819444438
34145395145288.116319444145158130.116319444432106.883680555562
35145583145330.720486111145314.12516.5954861111034252.279513888905
36145949145587.199652778145461.75125.449652777775361.800347222219
37145915145413.470486111145606.25-192.779513888897501.529513888905
38145888145529.970486111145724.25-194.279513888897358.029513888905
39146145145649.637152778145828.25-178.612847222210495.362847222219
40145713145932.074652778145913.04166666719.032986111118-219.074652777781
41145913146098.595486111145983.25115.345486111133-185.595486111124
42146087146117.574652778146038.579.074652777775-30.5746527778101
43146045146039.241319444146063.291666667-24.05034722221055.75868055556202
44145753NANA131.095486111103NA
45146260NANA-26.9878472222250NA
46146016NANA130.116319444432NA
47146647NANA16.5954861111034NA
48146211NANA125.449652777775NA
49146248NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211727432roi74m59v9h9tky/1vh7e1211727303.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211727432roi74m59v9h9tky/1vh7e1211727303.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211727432roi74m59v9h9tky/213hd1211727303.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211727432roi74m59v9h9tky/213hd1211727303.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211727432roi74m59v9h9tky/38ryv1211727303.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211727432roi74m59v9h9tky/38ryv1211727303.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211727432roi74m59v9h9tky/4vrqy1211727303.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211727432roi74m59v9h9tky/4vrqy1211727303.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