Home » date » 2009 » Dec » 04 »

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 04 Dec 2009 05:29:37 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929841v98mjmzzuj5dwcc.htm/, Retrieved Fri, 04 Dec 2009 13:30:46 +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/2009/Dec/04/t1259929841v98mjmzzuj5dwcc.htm/},
    year = {2009},
}
@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 = {2009},
    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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
89.1 82.6 102.7 91.8 94.1 103.1 93.2 91 94.3 99.4 115.7 116.8 99.8 96 115.9 109.1 117.3 109.8 112.8 110.7 100 113.3 122.4 112.5 104.2 92.5 117.2 109.3 106.1 118.8 105.3 106 102 112.9 116.5 114.8 100.5 85.4 114.6 109.9 100.7 115.5 100.7 99 102.3 108.8 105.9 113.2 95.7 80.9 113.9 98.1 102.8 104.7 95.9 94.6 101.6 103.9 110.3 114.1
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
189.1NANA-6.05234375NA
282.6NANA-17.46796875NA
3102.7NANA9.11848958333334NA
491.8NANA0.195572916666671NA
594.1NANA0.329947916666666NA
6103.1NANA5.88932291666667NA
793.295.8007812598.2625-2.46171875000001-2.60078125000001
89195.4289062599.2666666666667-3.83776041666667-4.42890625
994.394.41328125100.375-5.96171875-0.11328125
1099.4104.451822916667101.6458333333332.80598958333333-5.05182291666665
11115.7112.508072916667103.3333333333339.174739583333343.19192708333334
12116.8112.846614583333104.5791666666678.267447916666673.95338541666668
1399.899.62265625105.675-6.052343750.177343749999991
149689.84453125107.3125-17.467968756.15546875
15115.9117.489322916667108.3708333333339.11848958333334-1.58932291666665
16109.1109.383072916667109.18750.195572916666671-0.283072916666669
17117.3110.37578125110.0458333333330.3299479166666666.92421875000001
18109.8116.03515625110.1458333333335.88932291666667-6.23515624999999
19112.8107.68828125110.15-2.461718750000015.11171874999999
20110.7106.349739583333110.1875-3.837760416666674.35026041666667
21100104.134114583333110.095833333333-5.96171875-4.13411458333331
22113.3112.964322916667110.1583333333332.805989583333330.335677083333351
23122.4118.874739583333109.79.174739583333343.52526041666667
24112.5117.87578125109.6083333333338.26744791666667-5.37578125
25104.2103.618489583333109.670833333333-6.052343750.581510416666674
2692.591.69453125109.1625-17.467968750.805468750000017
27117.2118.168489583333109.059.11848958333334-0.968489583333337
28109.3109.312239583333109.1166666666670.195572916666671-0.0122395833333400
29106.1109.184114583333108.8541666666670.329947916666666-3.08411458333333
30118.8114.593489583333108.7041666666675.889322916666674.20651041666666
31105.3106.184114583333108.645833333333-2.46171875000001-0.884114583333329
32106104.358072916667108.195833333333-3.837760416666671.64192708333333
33102101.829947916667107.791666666667-5.961718750.170052083333317
34112.9110.514322916667107.7083333333332.805989583333332.38567708333335
35116.5116.683072916667107.5083333333339.17473958333334-0.183072916666646
36114.8115.41328125107.1458333333338.26744791666667-0.61328125
37100.5100.764322916667106.816666666667-6.05234375-0.264322916666657
3885.488.8653645833333106.333333333333-17.46796875-3.46536458333331
39114.6115.17265625106.0541666666679.11848958333334-0.572656250000009
40109.9106.09140625105.8958333333330.1955729166666713.80859375000001
41100.7105.61328125105.2833333333330.329947916666666-4.91328124999998
42115.5110.664322916667104.7755.889322916666674.83567708333335
43100.7102.046614583333104.508333333333-2.46171875000001-1.34661458333332
4499100.283072916667104.120833333333-3.83776041666667-1.28307291666667
45102.397.9424479166667103.904166666667-5.961718754.35755208333335
46108.8106.189322916667103.3833333333332.805989583333332.61067708333333
47105.9112.15390625102.9791666666679.17473958333334-6.25390624999999
48113.2110.884114583333102.6166666666678.267447916666672.31588541666667
4995.795.9143229166667101.966666666667-6.05234375-0.214322916666674
5080.984.1153645833333101.583333333333-17.46796875-3.21536458333334
51113.9110.489322916667101.3708333333339.118489583333343.41067708333333
5298.1101.333072916667101.13750.195572916666671-3.23307291666667
53102.8101.446614583333101.1166666666670.3299479166666661.35338541666665
54104.7107.226822916667101.33755.88932291666667-2.52682291666667
5595.9NANA-2.46171875000001NA
5694.6NANA-3.83776041666667NA
57101.6NANA-5.96171875NA
58103.9NANA2.80598958333333NA
59110.3NANA9.17473958333334NA
60114.1NANA8.26744791666667NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929841v98mjmzzuj5dwcc/117wm1259929771.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929841v98mjmzzuj5dwcc/117wm1259929771.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929841v98mjmzzuj5dwcc/2lqm51259929771.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929841v98mjmzzuj5dwcc/2lqm51259929771.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929841v98mjmzzuj5dwcc/372001259929771.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929841v98mjmzzuj5dwcc/372001259929771.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929841v98mjmzzuj5dwcc/491fc1259929771.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259929841v98mjmzzuj5dwcc/491fc1259929771.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