Home » date » 2010 » Dec » 15 »

Opdracht 9 oef 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 15 Dec 2010 17:46:44 +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/15/t1292435401c13slq4l6el096x.htm/, Retrieved Wed, 15 Dec 2010 18:50:06 +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/15/t1292435401c13slq4l6el096x.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 «
78.1 66.7 79 65.2 66.5 77.2 80.2 77.9 78 86.8 92.9 185.8 91 79.1 84.2 70.1 71.3 79.6 92.3 78.7 82.5 98.2 115.4 205.6 94 83.2 80.3 70.4 71.1 78.8 86.3 77.5 80.1 89.8 99.9 218 85.4 77.5 78.6 68.8 64.8 79.8 94.3 79.9 87.5 99.1 109.9 273.6 91.3 80.6 80.4 71.8 75.5 86.6 91.5 86.8 84.6 88.6 102.1 260.3 79 70.6 79.3 66.8 61.2 72.5 83.5 75.8 83.4 89.4 104.9 251.6 80 76.3 81.1 63.1 63.5 78.8 91.7 83.8 83.8 95.8 108.9 258.2 88.7 79.5 74.3 70.5 59.1 73.2 81.2 75 74.6 89.5 107 246.4 83.6 72.1 68.7 60.1 61.1 72.7 85.3 71.4 75.2 89.8 100.9 222.7
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
178.1NANA-8.08424479166667NA
266.7NANA-17.339453125NA
379NANA-16.291015625NA
465.2NANA-26.9545572916667NA
566.5NANA-28.7618489583333NA
677.2NANA-17.195703125NA
780.279.492838541666786.7291666666667-7.2363281250.707161458333331
877.972.29023437587.7833333333333-15.49309895833335.60976562499999
97875.436588541666788.5166666666667-13.0800781252.56341145833331
1086.886.275130208333488.9375-2.662369791666670.524869791666646
1192.999.70898437589.341666666666710.3673177083333-6.80898437500001
12185.8232.37304687589.6416666666667142.731380208333-46.573046875
139182.161588541666790.2458333333333-8.084244791666678.83841145833333
1479.173.443880208333390.7833333333333-17.3394531255.65611979166665
1584.274.713151041666791.0041666666667-16.2910156259.48684895833334
1670.164.71210937591.6666666666667-26.95455729166675.38789062499998
1771.364.317317708333393.0791666666667-28.76184895833336.98268229166665
1879.677.645963541666794.8416666666667-17.1957031251.95403645833332
1992.388.555338541666795.7916666666667-7.2363281253.74466145833334
2078.780.594401041666796.0875-15.4930989583333-1.89440104166667
2182.583.015755208333396.0958333333333-13.080078125-0.515755208333346
2298.293.283463541666795.9458333333333-2.662369791666674.91653645833333
23115.4106.31731770833395.9510.36731770833339.08268229166669
24205.6238.63971354166795.9083333333333142.731380208333-33.0397135416667
259487.540755208333395.625-8.084244791666676.45924479166666
2683.277.98554687595.325-17.3394531255.21445312499999
2780.378.88398437595.175-16.2910156251.416015625
2870.467.770442708333394.725-26.95455729166672.62955729166667
2971.164.967317708333393.7291666666667-28.76184895833336.13268229166667
3078.876.40429687593.6-17.1957031252.39570312500001
3186.386.522005208333393.7583333333333-7.236328125-0.222005208333343
3277.577.669401041666793.1625-15.4930989583333-0.16940104166666
3380.179.774088541666792.8541666666667-13.0800781250.325911458333337
3489.890.05429687592.7166666666667-2.66236979166667-0.254296874999994
3599.9102.75481770833392.387510.3673177083333-2.85481770833331
36218234.89804687592.1666666666666142.731380208333-16.8980468750000
3785.484.45742187592.5416666666667-8.084244791666670.942578125000011
3877.575.63554687592.975-17.3394531251.86445312500001
3978.677.092317708333393.3833333333333-16.2910156251.50768229166665
4068.867.12460937594.0791666666667-26.95455729166671.67539062500001
4164.866.12148437594.8833333333333-28.7618489583333-1.32148437499998
4279.880.420963541666797.6166666666667-17.195703125-0.620963541666654
4394.392.9428385416667100.179166666667-7.2363281251.35716145833332
4479.985.0610677083333100.554166666667-15.4930989583333-5.16106770833333
4587.587.6782552083333100.758333333333-13.080078125-0.17825520833334
4699.198.2959635416667100.958333333333-2.662369791666670.804036458333329
47109.9111.896484375101.52916666666710.3673177083333-1.99648437500001
48273.6244.989713541667102.258333333333142.73138020833328.6102864583334
4991.394.3407552083333102.425-8.08424479166667-3.04075520833332
5080.685.2563802083333102.595833333333-17.339453125-4.65638020833333
5180.486.471484375102.7625-16.291015625-6.071484375
5271.875.249609375102.204166666667-26.9545572916667-3.44960937499999
5375.572.6798177083333101.441666666667-28.76184895833332.82018229166667
5486.683.366796875100.5625-17.1957031253.23320312499999
5591.592.259505208333399.4958333333333-7.236328125-0.759505208333337
5686.883.073567708333398.5666666666667-15.49309895833333.72643229166667
5784.685.024088541666798.1041666666667-13.080078125-0.424088541666663
5888.695.187630208333397.85-2.66236979166667-6.58763020833334
59102.1107.41315104166797.045833333333310.3673177083333-5.31315104166667
60260.3238.59388020833395.8625142.73138020833321.7061197916667
617986.85742187594.9416666666667-8.08424479166667-7.857421875
6270.676.81054687594.15-17.339453125-6.21054687499998
6379.377.350651041666793.6416666666667-16.2910156251.94934895833336
6466.866.670442708333393.625-26.95455729166670.129557291666657
6561.265.013151041666793.775-28.7618489583333-3.81315104166667
6672.576.333463541666693.5291666666667-17.195703125-3.83346354166666
6783.585.972005208333393.2083333333333-7.236328125-2.47200520833333
6875.877.994401041666693.4875-15.4930989583333-2.19440104166665
6983.480.71992187593.8-13.0800781252.68007812500002
7089.491.058463541666793.7208333333333-2.66236979166667-1.65846354166665
71104.9104.02981770833393.662510.36731770833330.870182291666694
72251.6236.75221354166794.0208333333333142.73138020833314.8477864583334
738086.540755208333494.625-8.08424479166667-6.54075520833335
7476.377.96054687595.3-17.339453125-1.66054687500001
7581.179.35898437595.65-16.2910156251.74101562500000
7663.168.978776041666695.9333333333333-26.9545572916667-5.87877604166664
7763.567.604817708333396.3666666666667-28.7618489583333-4.10481770833333
7878.879.612630208333396.8083333333333-17.195703125-0.812630208333317
7991.790.209505208333397.4458333333333-7.2363281251.49049479166668
8083.882.448567708333397.9416666666666-15.49309895833331.35143229166668
8183.884.711588541666797.7916666666667-13.080078125-0.91158854166666
8295.895.15429687597.8166666666667-2.662369791666670.645703124999997
83108.9108.30898437597.941666666666710.36731770833330.591015625000011
84258.2240.25638020833397.525142.73138020833317.9436197916667
8588.788.76992187596.8541666666667-8.08424479166667-0.0699218750000057
8679.578.71054687596.05-17.3394531250.789453125000009
8774.379.00898437595.3-16.291015625-4.70898437499999
8870.567.69960937594.6541666666667-26.95455729166672.80039062500001
8959.165.550651041666794.3125-28.7618489583333-6.45065104166666
9073.276.545963541666793.7416666666666-17.195703125-3.34596354166663
9181.285.80117187593.0375-7.236328125-4.60117187499999
927577.023567708333392.5166666666667-15.4930989583333-2.02356770833332
9374.678.89492187591.975-13.080078125-4.294921875
9489.588.645963541666791.3083333333333-2.662369791666670.85403645833334
95107101.32565104166790.958333333333310.36731770833335.67434895833334
96246.4233.75221354166791.0208333333333142.73138020833312.6477864583334
9783.683.086588541666791.1708333333333-8.084244791666670.513411458333323
9872.173.852213541666791.1916666666667-17.339453125-1.75221354166666
9968.774.775651041666791.0666666666667-16.291015625-6.07565104166666
10060.164.14960937591.1041666666667-26.9545572916667-4.049609375
10161.162.100651041666790.8625-28.7618489583333-1.00065104166666
10272.772.425130208333389.6208333333334-17.1957031250.27486979166666
10385.3NANA-7.236328125NA
10471.4NANA-15.4930989583333NA
10575.2NANA-13.080078125NA
10689.8NANA-2.66236979166667NA
107100.9NANA10.3673177083333NA
108222.7NANA142.731380208333NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292435401c13slq4l6el096x/1go961292435201.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292435401c13slq4l6el096x/1go961292435201.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292435401c13slq4l6el096x/2go961292435201.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292435401c13slq4l6el096x/2go961292435201.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292435401c13slq4l6el096x/38f891292435201.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292435401c13slq4l6el096x/38f891292435201.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292435401c13slq4l6el096x/48f891292435201.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292435401c13slq4l6el096x/48f891292435201.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