Home » date » 2009 » Dec » 04 »

workshop 9

*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:04:40 -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/t12599284393tzkzy5d1g8athx.htm/, Retrieved Fri, 04 Dec 2009 13:07:25 +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/t12599284393tzkzy5d1g8athx.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 «
283.042 276.687 277.915 277.128 277.103 275.037 270.150 267.140 264.993 287.259 291.186 292.300 288.186 281.477 282.656 280.190 280.408 276.836 275.216 274.352 271.311 289.802 290.726 292.300 278.506 269.826 265.861 269.034 264.176 255.198 253.353 246.057 235.372 258.556 260.993 254.663 250.643 243.422 247.105 248.541 245.039 237.080 237.085 225.554 226.839 247.934 248.333 246.969 245.098 246.263 255.765 264.319 268.347 273.046 273.963 267.430 271.993 292.710 295.881 293.299
 
Output produced by software:


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


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1283.042NANA1.01112979103349NA
2276.687NANA0.99084022032972NA
3277.915NANA1.00098477841217NA
4277.128NANA1.01098799963399NA
5277.103NANA1.00646333652994NA
6275.037NANA0.990726073753508NA
7270.15272.816853699805278.5426666666670.9794436772097330.990224747248425
8267.14267.679670971462278.9565833333330.9595746684766490.997983892577634
9264.993264.752532107580279.3537083333330.94773229855131.00090827419291
10287.259288.163595661712279.6788333333331.030337520459640.99686082601921
11291.186290.680796618511279.9441251.038352909240411.00173800053999
12292.3289.521516082251280.1567916666671.033426726369451.00959681323636
13288.186283.564103465173280.4428333333331.011129791033491.01629930050506
14281.477278.380936112608280.9544166666670.990840220329721.01112168071071
15282.656281.795399679833281.5181666666671.000984778412171.00305398995564
16280.19284.984753373325281.8873751.010987999633990.983175403888909
17280.408283.796660598584281.9741666666671.006463336529940.988059547313078
18276.836279.34017012517281.9550.9907260737535080.99103540989451
19275.216275.763999724529281.5516666666670.9794436772097330.998012794545059
20274.352269.316985231828280.6628750.9595746684766491.01869549654968
21271.311264.869971934908279.4776250.94773229855131.02431769829565
22289.802286.756326331685278.3131.030337520459641.01062112110054
23290.726287.802179501165277.1718333333331.038352909240411.01015913258163
24292.3284.806119108168275.5939166666671.033426726369451.02631221869565
25278.506276.828504492612273.7813751.011129791033491.00605969212044
26269.826269.202824436703271.6914583333330.990840220329721.00231489236638
27265.861269.279961872248269.0150416666671.000984778412170.987303318641027
28269.034269.140844314561266.2156666666671.010987999633990.99960301709377
29264.176265.379094451616263.6748751.006463336529940.995466506304492
30255.198258.448523006665260.8677916666670.9907260737535080.987422938352096
31253.353252.832244099864258.1386250.9794436772097331.00205968942763
32246.057245.533567233134255.87750.9595746684766491.00213181754643
33235.372240.720054947453253.9958333333330.94773229855130.977783093524881
34258.556260.016448901226252.3604583333331.030337520459640.994383244185523
35260.993260.324635846277250.7092083333331.038352909240411.00256742567429
36254.663257.485416743139249.1569166666671.033426726369450.989038537487525
37250.643250.481284875612247.7241666666671.011129791033491.00064561759362
38243.422243.936976808424246.1920416666670.990840220329720.997888894028444
39247.105245.223461523465244.9822083333331.000984778412171.00767275066116
40248.541246.867177951625244.1840833333331.010987999633991.00678025350419
41245.039244.785973930794243.2141.006463336529941.00103366244864
42237.08240.118233030836242.3659166666670.9907260737535080.987346929083697
43237.085236.843479031867241.8142916666670.9794436772097331.00101974928387
44225.554231.930756679642241.7016250.9595746684766490.972505773831237
45226.839229.522597840069242.1808333333330.94773229855130.988307914491542
46247.934250.577140499725243.1990833333331.030337520459640.989451789199711
47248.333254.217519945875244.8276666666671.038352909240410.976852421709064
48246.969255.563759745455247.2974166666671.033426726369450.966369411085455
49245.098253.118732674707250.3325833333331.011129791033490.968312370285865
50246.263251.290951638702253.6140.990840220329720.979991513399453
51255.765257.493574644940257.240251.000984778412170.993286921247165
52264.319263.855062056475260.9873333333331.010987999633991.00175830601812
53268.347266.545879010461264.8341666666671.006463336529941.00675726443877
54273.046266.253421735442268.745750.9907260737535081.02551170317468
55273.963NANA0.979443677209733NA
56267.43NANA0.959574668476649NA
57271.993NANA0.9477322985513NA
58292.71NANA1.03033752045964NA
59295.881NANA1.03835290924041NA
60293.299NANA1.03342672636945NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599284393tzkzy5d1g8athx/147971259928278.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t12599284393tzkzy5d1g8athx/147971259928278.ps (open in new window)


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


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


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


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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