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 09:14: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/t1259943417rydtkyokoul3v3g.htm/, Retrieved Fri, 04 Dec 2009 17:17:03 +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/t1259943417rydtkyokoul3v3g.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 «
102.86 102.55 102.28 102.26 102.57 103.08 102.76 102.51 102.87 103.14 103.12 103.16 102.48 102.57 102.88 102.63 102.38 101.69 101.96 102.19 101.87 101.6 101.63 101.22 101.21 101.49 101.64 101.66 101.77 101.82 101.78 101.28 101.29 101.37 101.12 101.51 102.24 102.94 103.09 103.46 103.64 104.39 104.15 105.21 105.8 105.91 105.39 105.46 104.72 103.14 102.63 102.32 101.93 100.62 100.6 99.63 98.9 98.32 99.22 98.81
 
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
1102.86NANA-0.0528125000000005NA
2102.55NANA-0.127812500000003NA
3102.28NANA-0.0314583333333284NA
4102.26NANA0.0176041666666732NA
5102.57NANA0.0209375000000035NA
6103.08NANA-0.193125000000004NA
7102.76102.6478125102.7475-0.0996874999999970.112187500000019
8102.51102.742291666667102.73250.00979166666666605-0.23229166666664
9102.87102.918333333333102.7583333333330.160000000000001-0.0483333333333178
10103.14103.001979166667102.798750.2032291666666610.138020833333329
11103.12102.825520833333102.806250.01927083333333830.294479166666662
12103.16102.814479166667102.7404166666670.07406249999999070.345520833333339
13102.48102.596354166667102.649166666667-0.0528125000000005-0.116354166666667
14102.57102.4746875102.6025-0.1278125000000030.0953125000000057
15102.88102.516041666667102.5475-0.03145833333332840.363958333333343
16102.63102.459270833333102.4416666666670.01760416666667320.170729166666675
17102.38102.336354166667102.3154166666670.02093750000000350.0436458333333434
18101.69101.979375102.1725-0.193125000000004-0.289374999999993
19101.96101.9390625102.03875-0.0996874999999970.0209375000000165
20102.19101.950625101.9408333333330.009791666666666050.239374999999995
21101.87102.004166666667101.8441666666670.160000000000001-0.134166666666644
22101.6101.9553125101.7520833333330.203229166666661-0.355312499999997
23101.63101.705520833333101.686250.0192708333333383-0.0755208333333286
24101.22101.7403125101.666250.0740624999999907-0.520312500000003
25101.21101.611354166667101.664166666667-0.0528125000000005-0.401354166666664
26101.49101.4909375101.61875-0.127812500000003-0.000937500000006253
27101.64101.525208333333101.556666666667-0.03145833333332840.114791666666662
28101.66101.540520833333101.5229166666670.01760416666667320.119479166666665
29101.77101.513020833333101.4920833333330.02093750000000350.256979166666667
30101.82101.289791666667101.482916666667-0.1931250000000040.530208333333334
31101.78101.438229166667101.537916666667-0.0996874999999970.341770833333342
32101.28101.651041666667101.641250.00979166666666605-0.37104166666667
33101.29101.922083333333101.7620833333330.160000000000001-0.632083333333327
34101.37102.100729166667101.89750.203229166666661-0.730729166666649
35101.12102.0696875102.0504166666670.0192708333333383-0.949687499999996
36101.51102.309479166667102.2354166666670.0740624999999907-0.799479166666671
37102.24102.3884375102.44125-0.0528125000000005-0.148437499999986
38102.94102.5759375102.70375-0.1278125000000030.364062500000017
39103.09103.023958333333103.055416666667-0.03145833333332840.0660416666666777
40103.46103.450104166667103.43250.01760416666667320.00989583333333144
41103.64103.820520833333103.7995833333330.0209375000000035-0.180520833333333
42104.39103.948958333333104.142083333333-0.1931250000000040.441041666666678
43104.15104.3103125104.41-0.099687499999997-0.160312500000003
44105.21104.531458333333104.5216666666670.009791666666666050.678541666666646
45105.8104.670833333333104.5108333333330.1600000000000011.12916666666666
46105.91104.647395833333104.4441666666670.2032291666666611.26260416666668
47105.39104.3446875104.3254166666670.01927083333333831.04531250000002
48105.46104.171145833333104.0970833333330.07406249999999071.28885416666667
49104.72103.739270833333103.792083333333-0.05281250000000050.980729166666677
50103.14103.283854166667103.411666666667-0.127812500000003-0.143854166666657
51102.63102.860208333333102.891666666667-0.0314583333333284-0.230208333333309
52102.32102.305520833333102.2879166666670.01760416666667320.0144791666666890
53101.93101.735520833333101.7145833333330.02093750000000350.194479166666682
54100.62100.987291666667101.180416666667-0.193125000000004-0.367291666666645
55100.6NANA-0.099687499999997NA
5699.63NANA0.00979166666666605NA
5798.9NANA0.160000000000001NA
5898.32NANA0.203229166666661NA
5999.22NANA0.0192708333333383NA
6098.81NANA0.0740624999999907NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943417rydtkyokoul3v3g/1tqck1259943275.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/04/t1259943417rydtkyokoul3v3g/1tqck1259943275.ps (open in new window)


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


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


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