Home » date » 2009 » Jun » 02 »

Martin Horemans - Opgave 9: oef2

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 02 Jun 2009 02:12:48 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jun/02/t1243930724vucpwzu1yjt8l5m.htm/, Retrieved Tue, 02 Jun 2009 10:18:48 +0200
 
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/Jun/02/t1243930724vucpwzu1yjt8l5m.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 «
1746 1271 1363 1664 2179 2305 2098 2231 1407 1966 2293 2045 1532 1333 1583 1712 2641 2267 2126 2231 1517 2010 2628 2115 1829 1636 1787 2122 2620 2555 2337 2524 1801 2417 2389 2267 2135 1760 1905 2176 2344 2674 2766 2783 2000 2588 2736 2704 2466 1976 2171 2397 2942 2707 2861 2765 1814 2611 2606 2518 2267 1730 1901 2124 2448 2489 2521 2466 1827 2278 2373 2356 2075 1606 1699 2311 2093 2064 2180 2136
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11746NANA-180.19375NA
21271NANA-544.477083333333NA
31363NANA-367.535416666667NA
41664NANA-136.835416666667NA
52179NANA352.697916666667NA
62305NANA288.839583333334NA
720982137.272916666671871.75265.522916666667-39.2729166666666
822312155.739583333331865.41666666667290.32291666666775.260416666667
914071402.247916666671877.16666666667-474.918754.75208333333353
1019661996.456251888.33333333333108.122916666667-30.4562499999997
1122932182.881251909.58333333333273.297916666667110.11875
1220452052.406251927.25125.15625-7.40624999999977
1315321746.639583333331926.83333333333-180.19375-214.639583333333
1413331383.522916666671928-544.477083333333-50.5229166666663
1515831565.047916666671932.58333333333-367.53541666666717.9520833333336
1617121802.164583333331939-136.835416666667-90.1645833333334
1726412307.489583333331954.79166666667352.697916666667333.510416666667
1822672260.506251971.66666666667288.8395833333346.49374999999986
1921262252.481251986.95833333333265.522916666667-126.48125
2022312302.281252011.95833333333290.322916666667-71.2812500000002
2115171558.164583333332033.08333333333-474.91875-41.1645833333334
2220102166.789583333332058.66666666667108.122916666667-156.789583333334
2326282348.172916666672074.875273.297916666667279.827083333333
2421152211.156252086125.15625-96.15625
2518291926.597916666672106.79166666667-180.19375-97.597916666667
2616361583.314583333332127.79166666667-544.47708333333352.6854166666667
2717871784.297916666672151.83333333333-367.5354166666672.70208333333312
2821222043.789583333332180.625-136.83541666666778.2104166666668
2926202540.322916666672187.625352.69791666666779.6770833333335
3025552472.839583333332184288.83958333333482.1604166666671
3123372468.606252203.08333333333265.522916666667-131.606250000000
3225242511.322916666672221290.32291666666712.6770833333339
3318011756.164583333332231.08333333333-474.9187544.8354166666668
3424172346.372916666672238.25108.12291666666770.6270833333333
3523892502.297916666672229273.297916666667-113.297916666666
3622672347.614583333332222.45833333333125.15625-80.6145833333335
3721352065.097916666672245.29166666667-180.1937569.9020833333334
3817601729.481252273.95833333333-544.47708333333330.5187499999997
3919051925.506252293.04166666667-367.535416666667-20.5062499999999
4021762171.622916666672308.45833333333-136.8354166666674.3770833333333
4123442682.739583333332330.04166666667352.697916666667-338.739583333333
4226742651.547916666672362.70833333333288.83958333333422.4520833333336
4327662660.231252394.70833333333265.522916666667105.768750000000
4427832707.822916666672417.5290.32291666666775.1770833333335
4520001962.664583333332437.58333333333-474.9187537.3354166666668
4625882565.997916666672457.875108.12291666666722.0020833333333
4727362765.297916666672492273.297916666667-29.2979166666669
4827042643.447916666672518.29166666667125.1562560.5520833333335
4924662343.431252523.625-180.19375122.568750000000
5019761982.356252526.83333333333-544.477083333333-6.35625000000027
5121712150.797916666672518.33333333333-367.53541666666720.2020833333336
5223972374.706252511.54166666667-136.83541666666722.2937499999998
5329422859.781252507.08333333333352.69791666666782.21875
5427072782.756252493.91666666667288.839583333334-75.7562499999999
5528612743.397916666672477.875265.522916666667117.602083333334
5627652749.656252459.33333333333290.32291666666715.34375
5718141962.914583333332437.83333333333-474.91875-148.914583333333
5826112523.331252415.20833333333108.12291666666787.6687499999998
5926062656.547916666672383.25273.297916666667-50.5479166666673
6025182478.739583333332353.58333333333125.1562539.260416666667
6122672150.139583333332330.33333333333-180.19375116.860416666666
6217301759.231252303.70833333333-544.477083333333-29.2312500000003
6319011924.256252291.79166666667-367.535416666667-23.2562500000004
6421242141.622916666672278.45833333333-136.835416666667-17.6229166666662
6524482607.572916666672254.875352.697916666667-159.572916666667
6624892527.256252238.41666666667288.839583333334-38.2562499999999
6725212489.189583333332223.66666666667265.52291666666731.8104166666662
6824662500.822916666672210.5290.322916666667-34.8229166666665
6918271721.997916666672196.91666666667-474.91875105.002083333334
7022782304.414583333332196.29166666667108.122916666667-26.4145833333332
7123732462.589583333332189.29166666667273.297916666667-89.5895833333334
7223562281.947916666672156.79166666667125.1562574.0520833333335
732075NA2124.875NANA
741606NA2096.91666666667NANA
751699NANANANA
762311NANANANA
772093NANANANA
782064NANANANA
792180NANANANA
802136NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243930724vucpwzu1yjt8l5m/1woce1243930365.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243930724vucpwzu1yjt8l5m/1woce1243930365.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243930724vucpwzu1yjt8l5m/2anek1243930365.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243930724vucpwzu1yjt8l5m/2anek1243930365.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243930724vucpwzu1yjt8l5m/30lqm1243930365.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243930724vucpwzu1yjt8l5m/30lqm1243930365.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243930724vucpwzu1yjt8l5m/4sjai1243930365.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jun/02/t1243930724vucpwzu1yjt8l5m/4sjai1243930365.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