Home » date » 2010 » Aug » 11 »

Tijdreeks B - Stap 24

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 11 Aug 2010 12:03:36 +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/Aug/11/t1281528344e44gcn8b6q9x6b2.htm/, Retrieved Wed, 11 Aug 2010 14:05:45 +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/2010/Aug/11/t1281528344e44gcn8b6q9x6b2.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:
Platini Olivier
 
Dataseries X:
» Textbox « » Textfile « » CSV «
335 334 333 331 329 328 329 331 332 332 333 335 335 333 325 322 322 315 321 324 329 332 322 324 324 323 309 306 305 300 301 302 308 311 301 301 308 302 290 286 286 275 284 289 292 293 285 280 281 280 265 260 254 238 247 246 247 237 222 216 212 209 185 186 178 158 166 162 164 147 132 124 117 120 89 81 71 52 63 62 74 67 53 42
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1335NANA6.06076388888888NA
2334NANA8.10937499999999NA
3333NANA-5.56423611111112NA
4331NANA-5.59895833333332NA
5329NANA-5.98090277777779NA
6328NANA-15.0017361111111NA
7329329.116319444444331.833333333333-2.71701388888887-0.1163194444444
8331333.074652777778331.7916666666671.28298611111112-2.07465277777783
9332338.880208333333331.4166666666677.46354166666668-6.88020833333331
10332338.269097222222330.7083333333337.56076388888888-6.26909722222217
11333331.630208333333330.0416666666671.588541666666671.36979166666669
12335332.005208333333329.2083333333332.7968752.99479166666669
13335334.394097222222328.3333333333336.060763888888880.605902777777828
14333335.817708333333327.7083333333338.10937499999999-2.81770833333337
15325321.727430555556327.291666666667-5.564236111111123.27256944444446
16322321.567708333333327.166666666667-5.598958333333320.432291666666629
17322320.727430555556326.708333333333-5.980902777777791.2725694444444
18315310.789930555556325.791666666667-15.00173611111114.21006944444446
19321322.157986111111324.875-2.71701388888887-1.15798611111109
20324325.2829861111113241.28298611111112-1.28298611111109
21329330.380208333333322.9166666666677.46354166666668-1.38020833333331
22332329.144097222222321.5833333333337.560763888888882.85590277777783
23322321.796875320.2083333333331.588541666666670.203125
24324321.671875318.8752.7968752.328125
25324323.477430555556317.4166666666676.060763888888880.522569444444457
26323323.776041666667315.6666666666678.10937499999999-0.776041666666686
27309308.310763888889313.875-5.564236111111120.689236111111143
28306306.526041666667312.125-5.59895833333332-0.526041666666629
29305304.394097222222310.375-5.980902777777790.605902777777771
30300293.539930555556308.541666666667-15.00173611111116.46006944444446
31301304.199652777778306.916666666667-2.71701388888887-3.19965277777783
32302306.657986111111305.3751.28298611111112-4.65798611111109
33308311.171875303.7083333333337.46354166666668-3.171875
34311309.644097222222302.0833333333337.560763888888881.35590277777783
35301302.046875300.4583333333331.58854166666667-1.046875
36301301.421875298.6252.796875-0.421874999999943
37308302.935763888889296.8756.060763888888885.06423611111114
38302303.734375295.6258.10937499999999-1.734375
39290288.852430555555294.416666666667-5.564236111111121.14756944444451
40286287.401041666667293-5.59895833333332-1.40104166666663
41286285.602430555556291.583333333333-5.980902777777790.397569444444457
42275275.039930555556290.041666666667-15.0017361111111-0.0399305555555429
43284285.324652777778288.041666666667-2.71701388888887-1.32465277777777
44289287.2829861111112861.282986111111121.71701388888886
45292291.505208333333284.0416666666677.463541666666680.494791666666686
46293289.477430555556281.9166666666677.560763888888883.52256944444446
47285281.088541666667279.51.588541666666673.91145833333331
48280279.421875276.6252.7968750.578125
49281279.602430555555273.5416666666676.060763888888881.39756944444451
50280278.317708333333270.2083333333338.109374999999991.68229166666669
51265260.977430555556266.541666666667-5.564236111111124.02256944444446
52260256.734375262.333333333333-5.598958333333323.265625
53254251.394097222222257.375-5.980902777777792.60590277777777
54238237.081597222222252.083333333333-15.00173611111110.9184027777778
55247243.824652777778246.541666666667-2.717013888888873.17534722222223
56246241.991319444444240.7083333333331.282986111111124.00868055555557
57247241.880208333333234.4166666666677.463541666666685.11979166666666
58237235.5607638888892287.560763888888881.43923611111109
59222223.338541666667221.751.58854166666667-1.33854166666669
60216218.046875215.252.796875-2.046875
61212214.602430555556208.5416666666676.06076388888888-2.60243055555554
62209209.776041666667201.6666666666678.10937499999999-0.776041666666657
63185189.144097222222194.708333333333-5.56423611111112-4.1440972222222
64186181.901041666667187.5-5.598958333333324.09895833333331
65178174.019097222222180-5.980902777777793.9809027777778
66158157.414930555556172.416666666667-15.00173611111110.585069444444485
67166161.907986111111164.625-2.717013888888874.09201388888889
68162158.241319444444156.9583333333331.282986111111123.75868055555557
69164156.713541666667149.257.463541666666687.28645833333331
70147148.435763888889140.8757.56076388888888-1.43576388888889
71132133.630208333333132.0416666666671.58854166666667-1.63020833333331
72124125.963541666667123.1666666666672.796875-1.96354166666666
73117120.519097222222114.4583333333336.06076388888888-3.51909722222223
74120114.1093751068.109374999999995.89062500000001
758992.519097222222298.0833333333333-5.56423611111112-3.51909722222221
768185.401041666666791-5.59895833333332-4.40104166666667
777178.394097222222284.375-5.98090277777779-7.3940972222222
785262.664930555555677.6666666666667-15.0017361111111-10.6649305555556
7963NANA-2.71701388888887NA
8062NANA1.28298611111112NA
8174NANA7.46354166666668NA
8267NANA7.56076388888888NA
8353NANA1.58854166666667NA
8442NANA2.796875NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Aug/11/t1281528344e44gcn8b6q9x6b2/14j351281528212.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/11/t1281528344e44gcn8b6q9x6b2/14j351281528212.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/11/t1281528344e44gcn8b6q9x6b2/24j351281528212.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/11/t1281528344e44gcn8b6q9x6b2/24j351281528212.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/11/t1281528344e44gcn8b6q9x6b2/3xskq1281528212.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/11/t1281528344e44gcn8b6q9x6b2/3xskq1281528212.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Aug/11/t1281528344e44gcn8b6q9x6b2/4xskq1281528212.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Aug/11/t1281528344e44gcn8b6q9x6b2/4xskq1281528212.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