Home » date » 2010 » Dec » 14 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 14 Dec 2010 14:19:28 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/14/t1292336279lt09zbu0vo9prjw.htm/, Retrieved Tue, 14 Dec 2010 15:18:04 +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/Dec/14/t1292336279lt09zbu0vo9prjw.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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
47 19 52 136 80 42 54 66 81 63 137 72 107 58 36 52 79 77 54 84 48 96 83 66 61 53 30 74 69 59 42 65 70 100 63 105 82 81 75 102 121 98 76 77 63 37 35 23 40 29 37 51 20 28 13 22 25 13 16 13 16 17 9 17 25 14 8 7 10 7 10 3
 
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
147NANA5.00555555555555NA
219NANA-7.71944444444444NA
352NANA-16.8361111111111NA
4136NANA6.02222222222222NA
580NANA11.1472222222222NA
642NANA5.18055555555556NA
75460.097222222222273.25-13.1527777777778-6.09722222222221
86679.497222222222277.3752.12222222222222-13.4972222222222
98175.430555555555578.3333333333333-2.902777777777785.56944444444446
106377.013888888888974.16666666666672.84722222222222-14.0138888888889
1113779.922222222222270.6259.2972222222222357.0777777777778
127271.030555555555672.0416666666667-1.011111111111110.969444444444449
1310778.505555555555673.55.0055555555555528.4944444444444
145866.530555555555674.25-7.71944444444444-8.53055555555555
153656.788888888888973.625-16.8361111111111-20.7888888888889
165279.647222222222273.6256.02222222222222-27.6472222222222
177983.897222222222272.7511.1472222222222-4.89722222222223
187775.430555555555670.255.180555555555561.56944444444444
195454.930555555555668.0833333333333-13.1527777777778-0.930555555555557
208468.080555555555565.95833333333332.1222222222222215.9194444444445
214862.597222222222265.5-2.90277777777778-14.5972222222222
229669.013888888888966.16666666666672.8472222222222226.9861111111111
238375.963888888888966.66666666666679.297222222222237.03611111111111
246664.488888888888965.5-1.011111111111111.51111111111111
256169.255555555555664.255.00555555555555-8.25555555555555
265355.238888888888962.9583333333333-7.71944444444444-2.23888888888888
273046.247222222222263.0833333333333-16.8361111111111-16.2472222222222
287470.188888888888964.16666666666676.022222222222223.81111111111112
296974.647222222222263.511.1472222222222-5.64722222222222
305969.472222222222264.29166666666675.18055555555556-10.4722222222222
314253.638888888888966.7916666666667-13.1527777777778-11.6388888888889
326570.955555555555568.83333333333332.12222222222222-5.95555555555555
337068.972222222222271.875-2.902777777777781.02777777777779
3410077.763888888888974.91666666666672.8472222222222222.2361111111111
356387.547222222222278.259.29722222222223-24.5472222222222
3610581.030555555555682.0416666666667-1.0111111111111123.9694444444444
378290.088888888888985.08333333333335.00555555555555-8.08888888888889
388179.280555555555587-7.719444444444441.71944444444446
397570.372222222222287.2083333333333-16.83611111111114.62777777777777
4010290.313888888888984.29166666666676.0222222222222211.6861111111111
4112191.647222222222280.511.147222222222229.3527777777778
429881.097222222222275.91666666666675.1805555555555616.9027777777778
437657.597222222222270.75-13.152777777777818.4027777777778
447768.955555555555566.83333333333332.122222222222228.04444444444445
456360.180555555555663.0833333333333-2.902777777777782.81944444444446
463762.222222222222259.3752.84722222222222-25.2222222222222
473562.338888888888953.04166666666679.29722222222223-27.3388888888889
482344.905555555555645.9166666666667-1.01111111111111-21.9055555555556
494045.380555555555640.3755.00555555555555-5.38055555555555
502927.738888888888935.4583333333333-7.719444444444441.26111111111111
513714.747222222222231.5833333333333-16.836111111111122.2527777777778
525135.0222222222222296.0222222222222215.9777777777778
532038.355555555555627.208333333333311.1472222222222-18.3555555555556
542831.1805555555556265.18055555555556-3.18055555555555
551311.430555555555624.5833333333333-13.15277777777781.56944444444444
562225.205555555555623.08333333333332.12222222222222-3.20555555555555
572518.513888888888921.4166666666667-2.902777777777786.48611111111111
581321.680555555555618.83333333333332.84722222222222-8.68055555555555
591626.922222222222217.6259.29722222222223-10.9222222222222
601316.238888888888917.25-1.01111111111111-3.23888888888889
611621.463888888888916.45833333333335.00555555555555-5.46388888888889
62177.9055555555555615.625-7.719444444444449.09444444444444
639-2.4611111111111114.375-16.836111111111111.4611111111111
641719.522222222222213.56.02222222222222-2.52222222222222
652524.14722222222221311.14722222222220.852777777777778
661417.513888888888912.33333333333335.18055555555556-3.51388888888889
678NANA-13.1527777777778NA
687NANA2.12222222222222NA
6910NANA-2.90277777777778NA
707NANA2.84722222222222NA
7110NANA9.29722222222223NA
723NANA-1.01111111111111NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292336279lt09zbu0vo9prjw/1jyil1292336365.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292336279lt09zbu0vo9prjw/1jyil1292336365.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292336279lt09zbu0vo9prjw/2jyil1292336365.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292336279lt09zbu0vo9prjw/2jyil1292336365.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292336279lt09zbu0vo9prjw/3c7zo1292336365.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292336279lt09zbu0vo9prjw/3c7zo1292336365.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292336279lt09zbu0vo9prjw/4c7zo1292336365.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292336279lt09zbu0vo9prjw/4c7zo1292336365.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