Home » date » 2010 » Jan » 13 »

KDGP2W52

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 13 Jan 2010 15:25:04 -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/13/t1263421551fcjc4l3dolape8w.htm/, Retrieved Wed, 13 Jan 2010 23:25:56 +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/13/t1263421551fcjc4l3dolape8w.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 «
1 4 -3 -3 0 6 -1 0 -1 1 -4 -1 -1 0 3 0 8 8 8 8 11 13 5 12 13 9 11 7 12 11 10 13 14 10 13 12 13 17 15 6 9 6 11 12 13 11 16 16 19 14 15 12 14 16 13 13 15 12 13 12 15 10 8 11 8 13 9 8 8 6 8 6 12 16
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1-331NANA0.214409722222223NA
23NANA-0.00434027777777812NA
30NANA-3.15017361111111NA
48NANA-1.35850694444444NA
58NANA-0.577256944444445NA
68NANA-1.25434027777778NA
78-6.56684027777778-6-0.56684027777777714.5668402777778
81112.74565972222228.54.24565972222222-1.74565972222222
9138.235243055555569.125-0.8897569444444444.76475694444444
10511.28732638888899.583333333333331.70399305555556-6.28732638888889
11128.985243055555559.875-0.8897569444444453.01475694444445
121312.610243055555610.08333333333332.526909722222220.389756944444446
13910.589409722222210.3750.214409722222223-1.58940972222222
141110.703993055555610.7083333333333-0.004340277777778120.296006944444445
1577.5581597222222210.7083333333333-3.15017361111111-0.558159722222221
16129.5581597222222210.9166666666667-1.358506944444442.44184027777778
171110.672743055555611.25-0.5772569444444450.327256944444445
18109.9956597222222211.25-1.254340277777780.00434027777777857
191311.016493055555611.5833333333333-0.5668402777777771.98350694444444
201416.328993055555612.08333333333334.24565972222222-2.32899305555556
211011.318576388888912.2083333333333-0.889756944444444-1.31857638888889
221313.745659722222212.04166666666671.70399305555556-0.745659722222221
231210.818576388888911.7083333333333-0.8897569444444451.18142361111111
241314.068576388888911.54166666666672.52690972222222-1.06857638888889
251711.756076388888911.54166666666670.2144097222222235.24392361111111
261511.453993055555611.4583333333333-0.004340277777778123.54600694444444
2768.3081597222222211.4583333333333-3.15017361111111-2.30815972222222
28910.266493055555611.625-1.35850694444444-1.26649305555556
29611.339409722222211.9166666666667-0.577256944444445-5.33940972222222
301111.078993055555612.3333333333333-1.25434027777778-0.0789930555555554
311211.891493055555612.4583333333333-0.5668402777777770.108506944444443
321316.578993055555612.33333333333334.24565972222222-3.57899305555555
331111.693576388888912.5833333333333-0.889756944444444-0.693576388888888
341614.745659722222213.04166666666671.703993055555561.25434027777778
351612.776909722222213.6666666666667-0.8897569444444453.22309027777778
361916.693576388888914.16666666666672.526909722222222.30642361111111
371414.506076388888914.29166666666670.214409722222223-0.506076388888891
381514.412326388888914.4166666666667-0.004340277777778120.587673611111112
391211.391493055555614.5416666666667-3.150173611111110.608506944444443
401413.099826388888914.4583333333333-1.358506944444440.900173611111112
411613.589409722222214.1666666666667-0.5772569444444452.41059027777778
421312.578993055555613.8333333333333-1.254340277777780.421006944444446
431312.933159722222213.5-0.5668402777777770.0668402777777768
441517.287326388888913.04166666666674.24565972222222-2.28732638888889
451211.818576388888912.7083333333333-0.8897569444444440.181423611111111
461314.120659722222212.41666666666671.70399305555556-1.12065972222222
471211.151909722222212.0416666666667-0.8897569444444450.848090277777779
481514.276909722222211.752.526909722222220.723090277777779
491011.589409722222211.3750.214409722222223-1.58940972222222
50810.870659722222210.875-0.00434027777777812-2.87065972222222
51117.1831597222222210.3333333333333-3.150173611111113.81684027777778
5288.516493055555569.875-1.35850694444444-0.516493055555555
53138.839409722222229.41666666666667-0.5772569444444454.16059027777778
5497.787326388888899.04166666666667-1.254340277777781.21267361111111
5588.599826388888899.16666666666666-0.566840277777777-0.599826388888888
568NANA4.24565972222222NA
576NANA-0.889756944444444NA
588NANA1.70399305555556NA
596NANA-0.889756944444445NA
6012NANA2.52690972222222NA
6116NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263421551fcjc4l3dolape8w/1uvcu1263421501.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263421551fcjc4l3dolape8w/1uvcu1263421501.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t1263421551fcjc4l3dolape8w/2iebb1263421501.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263421551fcjc4l3dolape8w/2iebb1263421501.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/13/t1263421551fcjc4l3dolape8w/3lsia1263421501.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/13/t1263421551fcjc4l3dolape8w/3lsia1263421501.ps (open in new window)


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