Home » date » 2009 » Jan » 14 »

opgave , oef 2 - Sandy Dorekens

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 14 Jan 2009 08:53:43 -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/Jan/14/t1231948461kbatavtoqf8mcab.htm/, Retrieved Wed, 14 Jan 2009 16:54: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/Jan/14/t1231948461kbatavtoqf8mcab.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 «
9,026 9,787 9,536 9,49 9,736 9,694 9,647 9,753 10,07 10,137 9,984 9,732 9,103 9,155 9,308 9,394 9,948 10,177 10,002 9,728 10,002 10,063 10,018 9,96 10,236 10,893 10,756 10,94 10,997 10,827 10,166 10,186 10,457 10,368 10,244 10,511 10,812 10,738 10,171 9,721 9,897 9,828 9,924 10,371 10,846 10,413 10,709 10,662 10,57 10,297 10,635 10,872 10,296 10,383 10,431 10,574 10,653 10,805 10,872 10,625 10,407 10,463 10,556 10,646 10,702 11,353 11,346 11,451 11,964 12,574 13,031 13,812 14,544 14,931 14,886 16,005 17,064 15,168 16,05 15,839 15,137 14,954 15,648 15,305
 
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
19.026NANA-0.0057436342592588NA
29.787NANA0.0416938657407400NA
39.536NANA-0.0632575231481491NA
49.49NANA0.0791035879629625NA
59.736NANA0.227318865740741NA
69.694NANA-0.0453825231481485NA
79.6479.51762442129639.71920833333333-0.2015839120370370.129375578703705
89.7539.51162442129639.69608333333333-0.1844589120370370.241375578703703
910.079.724416087962969.660250.0641660879629630.345583912037036
1010.1379.689853587962969.646750.04310358796296380.447146412037037
119.9849.681554976851859.651583333333330.02997164351851860.302445023148149
129.7329.69561053240749.680541666666670.01506886574074110.036389467592592
139.1039.709714699074079.71545833333333-0.0057436342592588-0.606714699074073
149.1559.770902199074079.729208333333330.0416938657407400-0.615902199074075
159.3089.662075810185189.72533333333333-0.0632575231481491-0.354075810185185
169.3949.798520254629639.719416666666670.0791035879629625-0.404520254629629
179.9489.945068865740749.717750.2273188657407410.00293113425925817
1810.1779.683284143518529.72866666666667-0.04538252314814850.493715856481481
1910.0029.583791087962969.785375-0.2015839120370370.418208912037038
209.7289.720541087962969.905-0.1844589120370370.00745891203703941
2110.00210.101916087963010.037750.064166087962963-0.0999160879629617
2210.06310.205603587963010.16250.0431035879629638-0.142603587962965
2310.01810.300596643518510.2706250.0299716435185186-0.282596643518518
249.9610.356485532407410.34141666666670.0150688657407411-0.396485532407407
2510.23610.369589699074110.3753333333333-0.0057436342592588-0.133589699074074
2610.89310.442943865740710.401250.04169386574074000.45005613425926
2710.75610.376034143518510.4392916666667-0.06325752314814910.37996585648148
2810.9410.550061921296310.47095833333330.07910358796296250.389938078703702
2910.99710.720402199074110.49308333333330.2273188657407410.276597800925925
3010.82710.480075810185210.5254583333333-0.04538252314814850.346924189814816
3110.16610.370832754629610.5724166666667-0.201583912037037-0.204832754629630
3210.18610.405499421296310.5899583333333-0.184458912037037-0.219499421296295
3310.45710.623291087963010.5591250.064166087962963-0.166291087962962
3410.36810.527061921296310.48395833333330.0431035879629638-0.159061921296296
3510.24410.417304976851910.38733333333330.0299716435185186-0.173304976851851
3610.51110.314943865740710.2998750.01506886574074110.19605613425926
3710.81210.242423032407410.2481666666667-0.00574363425925880.569576967592592
3810.73810.287485532407410.24579166666670.04169386574074000.450514467592591
3910.17110.206450810185210.2697083333333-0.0632575231481491-0.0354508101851856
409.72110.366895254629610.28779166666670.0791035879629625-0.64589525462963
419.89710.536360532407410.30904166666670.227318865740741-0.639360532407407
429.82810.289325810185210.3347083333333-0.0453825231481485-0.461325810185183
439.92410.129332754629610.3309166666667-0.201583912037037-0.205332754629628
4410.37110.117999421296310.3024583333333-0.1844589120370370.253000578703704
4510.84610.367582754629610.30341666666670.0641660879629630.47841724537037
4610.41310.413811921296310.37070833333330.0431035879629638-0.000811921296296703
4710.70910.465263310185210.43529166666670.02997164351851860.243736689814813
4810.66210.490110532407410.47504166666670.01506886574074110.171889467592594
4910.5710.513548032407410.5192916666667-0.00574363425925880.0564519675925919
5010.29710.590568865740710.5488750.0416938657407400-0.29356886574074
5110.63510.486034143518510.5492916666667-0.06325752314814910.148965856481482
5210.87210.636686921296310.55758333333330.07910358796296250.235313078703705
5310.29610.808027199074110.58070833333330.227318865740741-0.512027199074074
5410.38310.540575810185210.5859583333333-0.0453825231481485-0.157575810185184
5510.43110.376041087963010.577625-0.2015839120370370.0549589120370353
5610.57410.393291087963010.57775-0.1844589120370370.180708912037037
5710.65310.645541087963010.5813750.0641660879629630.00745891203703586
5810.80510.611770254629610.56866666666670.04310358796296380.193229745370370
5910.87210.606138310185210.57616666666670.02997164351851860.265861689814816
6010.62510.648568865740710.63350.0150688657407411-0.0235688657407405
6110.40710.706298032407410.7120416666667-0.0057436342592588-0.299298032407407
6210.46310.828402199074110.78670833333330.0416938657407400-0.365402199074074
6310.55610.814617476851910.877875-0.0632575231481491-0.258617476851853
6410.64611.085311921296311.00620833333330.0791035879629625-0.439311921296294
6510.70211.397193865740711.1698750.227318865740741-0.695193865740741
6611.35311.347242476851911.392625-0.04538252314814850.00575752314814615
6711.34611.496207754629611.6977916666667-0.201583912037037-0.15020775462963
6811.45111.871874421296312.0563333333333-0.184458912037037-0.420874421296297
6911.96412.487082754629612.42291666666670.064166087962963-0.523082754629629
7012.57412.869728587963012.8266250.0431035879629638-0.295728587962962
7113.03113.344971643518513.3150.0299716435185186-0.313971643518517
7213.81213.754110532407413.73904166666670.01506886574074110.0578894675925934
7314.54414.088256365740714.094-0.00574363425925880.455743634259262
7414.93114.514527199074114.47283333333330.04169386574074000.416472800925929
7514.88614.724617476851814.787875-0.06325752314814910.161382523148150
7616.00515.098353587963015.019250.07910358796296250.906646412037041
7717.06415.454777199074115.22745833333330.2273188657407411.60922280092593
7815.16815.353325810185215.3987083333333-0.0453825231481485-0.185325810185184
7916.05NANA-0.201583912037037NA
8015.839NANA-0.184458912037037NA
8115.137NANA0.064166087962963NA
8214.954NANA0.0431035879629638NA
8315.648NANA0.0299716435185186NA
8415.305NANA0.0150688657407411NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t1231948461kbatavtoqf8mcab/1j5dm1231948421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t1231948461kbatavtoqf8mcab/1j5dm1231948421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t1231948461kbatavtoqf8mcab/28mrg1231948421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t1231948461kbatavtoqf8mcab/28mrg1231948421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t1231948461kbatavtoqf8mcab/3n3hc1231948421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t1231948461kbatavtoqf8mcab/3n3hc1231948421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t1231948461kbatavtoqf8mcab/40jk91231948421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/14/t1231948461kbatavtoqf8mcab/40jk91231948421.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