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:56:43 -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/t1263311832lz0q2cstcgdcgsf.htm/, Retrieved Tue, 12 Jan 2010 16:57:17 +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/t1263311832lz0q2cstcgdcgsf.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 «
91 87 82 89 91 90 87 89 95 85 94 94 97 99 97 96 94 100 96 98 98 94 93 94 94 97 98 95 89 89 89 90 86 92 91 95 99 98 95 96 94 98 98 98 98 102 101 92 99 101 99 102 102 101 99 98 98 99 92 96 94 97 97 93 91 89 87 89 91 83 78 75 80 76 76 78 81 82 83 89 89
 
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
191NANA1.04097222222222NA
287NANA2.84097222222223NA
382NANA1.67430555555557NA
489NANA0.924305555555556NA
591NANA-1.32569444444444NA
690NANA0.365972222222225NA
78788.815972222222289.75-0.934027777777781-1.81597222222221
88990.699305555555590.50.199305555555556-1.69930555555554
99591.790972222222291.6250.1659722222222223.20902777777778
108592.832638888888992.54166666666670.290972222222219-7.83263888888888
119490.507638888888992.9583333333333-2.450694444444453.49236111111111
129490.707638888888993.5-2.792361111111113.29236111111111
139795.332638888888994.29166666666671.040972222222221.66736111111111
149997.882638888888995.04166666666662.840972222222231.11736111111112
159797.215972222222295.54166666666661.67430555555557-0.215972222222206
169696.965972222222296.04166666666670.924305555555556-0.96597222222222
179495.049305555555696.375-1.32569444444444-1.04930555555556
1810096.699305555555696.33333333333330.3659722222222253.30069444444445
199695.274305555555596.2083333333333-0.9340277777777810.725694444444457
209896.1993055555555960.1993055555555561.80069444444446
219896.124305555555695.95833333333330.1659722222222221.87569444444445
229496.249305555555695.95833333333330.290972222222219-2.24930555555555
239393.257638888888995.7083333333333-2.45069444444445-0.257638888888891
249492.249305555555695.0416666666667-2.792361111111111.75069444444443
259495.332638888888994.29166666666671.04097222222222-1.33263888888889
269796.507638888888993.66666666666672.840972222222230.492361111111109
279894.507638888888992.83333333333331.674305555555573.49236111111114
289593.174305555555592.250.9243055555555561.82569444444445
298990.757638888888992.0833333333333-1.32569444444444-1.75763888888888
308992.407638888888992.04166666666670.365972222222225-3.40763888888888
318991.357638888888992.2916666666667-0.934027777777781-2.35763888888889
329092.740972222222292.54166666666670.199305555555556-2.74097222222224
338692.624305555555692.45833333333330.165972222222222-6.62430555555557
349292.665972222222292.3750.290972222222219-0.665972222222223
359190.174305555555592.625-2.450694444444450.825694444444451
369590.415972222222293.2083333333333-2.792361111111114.58402777777778
379994.999305555555693.95833333333331.040972222222224.00069444444445
389897.507638888888994.66666666666672.840972222222230.492361111111094
399597.174305555555695.51.67430555555557-2.17430555555556
409697.340972222222296.41666666666670.924305555555556-1.34097222222222
419495.924305555555697.25-1.32569444444444-1.92430555555558
429897.907638888888997.54166666666670.3659722222222250.0923611111111029
439896.482638888888997.4166666666667-0.9340277777777811.51736111111111
449897.740972222222297.54166666666670.1993055555555560.259027777777789
459897.999305555555597.83333333333330.1659722222222220.00069444444446276
4610298.540972222222298.250.2909722222222193.45902777777778
4710196.382638888888998.8333333333333-2.450694444444454.61736111111111
489296.499305555555699.2916666666667-2.79236111111111-4.49930555555557
4999100.49930555555699.45833333333331.04097222222222-1.49930555555555
50101102.34097222222299.52.84097222222223-1.34097222222223
5199101.17430555555699.51.67430555555557-2.17430555555556
52102100.29930555555699.3750.9243055555555561.70069444444442
5310297.549305555555698.875-1.325694444444444.45069444444444
5410199.032638888888998.66666666666670.3659722222222251.96736111111112
559997.690972222222298.625-0.9340277777777811.30902777777779
569898.449305555555598.250.199305555555556-0.44930555555554
579898.1659722222222980.165972222222222-0.165972222222223
589997.832638888888997.54166666666670.2909722222222191.16736111111111
599294.257638888888996.7083333333333-2.45069444444445-2.25763888888889
609692.957638888888995.75-2.792361111111113.04236111111111
619495.790972222222294.751.04097222222222-1.79097222222222
629796.715972222222293.8752.840972222222230.28402777777778
639794.882638888888993.20833333333331.674305555555572.11736111111111
649393.174305555555692.250.924305555555556-0.174305555555563
659189.674305555555591-1.325694444444441.32569444444445
668989.907638888888989.54166666666670.365972222222225-0.907638888888883
678787.149305555555588.0833333333333-0.934027777777781-0.149305555555543
688986.824305555555686.6250.1993055555555562.17569444444445
699185.040972222222284.8750.1659722222222225.95902777777778
708383.665972222222283.3750.290972222222219-0.665972222222223
717879.882638888888982.3333333333333-2.45069444444445-1.88263888888889
727578.832638888888981.625-2.79236111111111-3.83263888888888
7380NA81.1666666666667NANA
7476NA81NANA
7576NA80.9166666666667NANA
7678NANANANA
7781NANANANA
7882NANANANA
7983NANANANA
8089NANANANA
8189NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263311832lz0q2cstcgdcgsf/12npc1263311800.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263311832lz0q2cstcgdcgsf/12npc1263311800.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/12/t1263311832lz0q2cstcgdcgsf/26zgz1263311800.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/12/t1263311832lz0q2cstcgdcgsf/26zgz1263311800.ps (open in new window)


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


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