Home » date » 2010 » Dec » 11 »

opgave 8 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: Sat, 11 Dec 2010 20:48:41 +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/11/t1292100528mle7igrd4kpyqkq.htm/, Retrieved Sat, 11 Dec 2010 21:48:53 +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/11/t1292100528mle7igrd4kpyqkq.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 «
24.3 29.4 31.8 36.7 37.1 37.7 39.4 43.3 39.6 34.3 32 29.6 22.3 28.9 31.7 34.2 38.6 37.2 38.8 43.4 38.8 36.3 33 29.2 22.64 28.44 30.14 34.39 36.82 36.74 38.9 42.8 39.09 37.49 33.17 30.98 21.2 27.8 29 35.4 37.5 34.7 38.4 39.9 35.9 34.7 30.4 29 21.5 28 29.3 34.3 36.6 36.2 37.5 41.6 39.4 37.3 32.7 30.7 22.9 29.1 29.5 37.1 37.7 38.4 39.4 40.6 39.7 36.6 32.8 31.6 24.1 30.3 31.8 38.7 37.8 38.4 40.7 43.8 41.5 39.3 35.9 33.4
 
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
124.3NANA-11.6793865740741NA
229.4NANA-5.37521990740741NA
331.8NANA-3.90855324074074NA
436.7NANA1.48519675925926NA
537.1NANA3.24505787037037NA
637.7NANA2.62825231481481NA
739.439.19797453703734.51666666666674.681307870370370.202025462962965
843.342.288946759259334.41257.876446759259261.01105324074074
939.639.072696759259334.38754.685196759259260.527303240740736
1034.336.317141203703734.27916666666672.03797453703704-2.01714120370371
113232.486724537037034.2375-1.75077546296296-0.486724537037041
1229.630.353668981481534.2791666666667-3.92549768518518-0.753668981481482
1322.322.553946759259334.2333333333333-11.6793865740741-0.253946759259257
1428.928.837280092592634.2125-5.375219907407410.0627199074074056
1531.730.274780092592634.1833333333333-3.908553240740741.42521990740741
1634.235.718530092592634.23333333333331.48519675925926-1.51853009259259
1738.637.603391203703734.35833333333333.245057870370370.996608796296293
1837.237.011585648148134.38333333333332.628252314814810.188414351851854
1938.839.062141203703734.38083333333334.68130787037037-0.262141203703706
2043.442.252280092592634.37583333333337.876446759259261.14771990740741
2138.838.976863425925934.29166666666674.68519675925926-0.17686342592593
2236.336.272557870370434.23458333333332.037974537037040.0274421296296268
233332.417557870370434.1683333333333-1.750775462962960.582442129629626
2429.230.149502314814834.075-3.92549768518518-0.949502314814815
2522.6422.380613425925934.06-11.67938657407410.259386574074078
2628.4428.663946759259234.0391666666667-5.37521990740741-0.223946759259249
2730.1430.117696759259334.02625-3.908553240740740.0223032407407331
2834.3935.573113425925934.08791666666671.48519675925926-1.18311342592593
2936.8237.389641203703734.14458333333333.24505787037037-0.56964120370371
3036.7436.854085648148234.22583333333332.62825231481481-0.114085648148155
3138.938.921307870370434.244.68130787037037-0.0213078703703715
3242.842.029780092592634.15333333333337.876446759259260.770219907407402
3339.0938.764363425925934.07916666666674.685196759259260.325636574074075
3437.4936.111724537037034.073752.037974537037041.37827546296297
3533.1732.393391203703734.1441666666667-1.750775462962960.776608796296301
3630.9830.162002314814834.0875-3.925497685185180.817997685185183
3721.222.302280092592633.9816666666667-11.6793865740741-1.10228009259259
3827.828.464780092592633.84-5.37521990740741-0.664780092592594
392929.677696759259333.58625-3.90855324074074-0.677696759259263
4035.434.822280092592633.33708333333331.485196759259260.577719907407406
4137.536.350474537037033.10541666666673.245057870370371.14952546296296
4234.735.535752314814832.90752.62825231481481-0.835752314814812
4338.437.518807870370432.83754.681307870370370.881192129629632
4439.940.734780092592632.85833333333337.87644675925926-0.834780092592595
4535.937.564363425925932.87916666666674.68519675925926-1.66436342592592
4634.734.883807870370432.84583333333332.03797453703704-0.183807870370366
4730.431.011724537037032.7625-1.75077546296296-0.611724537037034
482928.862002314814832.7875-3.925497685185180.137997685185191
4921.521.133113425925932.8125-11.67938657407410.366886574074073
502827.470613425925932.8458333333333-5.375219907407410.529386574074074
5129.329.153946759259333.0625-3.908553240740740.146053240740741
5234.334.801863425925933.31666666666671.48519675925926-0.501863425925933
5336.636.765891203703733.52083333333333.24505787037037-0.165891203703708
5436.236.315752314814833.68752.62825231481481-0.115752314814813
5537.538.497974537037033.81666666666674.68130787037037-0.997974537037038
5641.641.797280092592633.92083333333337.87644675925926-0.197280092592585
5739.438.660196759259333.9754.685196759259260.739803240740741
5837.336.137974537037034.12.037974537037041.16202546296297
5932.732.511724537037034.2625-1.750775462962960.188275462962963
6030.730.474502314814834.4-3.925497685185180.225497685185182
6122.922.891446759259334.5708333333333-11.67938657407410.00855324074073138
6229.129.233113425925934.6083333333333-5.37521990740741-0.133113425925927
6329.530.670613425925934.5791666666667-3.90855324074074-1.17061342592592
6437.136.047696759259334.56251.485196759259261.05230324074075
6537.737.782557870370434.53753.24505787037037-0.0825578703703584
6638.437.207418981481534.57916666666672.628252314814811.19258101851852
6739.439.34797453703734.66666666666674.681307870370370.0520254629629662
6840.642.643113425925934.76666666666677.87644675925926-2.04311342592592
6939.739.597696759259334.91254.685196759259260.102303240740753
7036.637.112974537037035.0752.03797453703704-0.512974537037039
7132.833.395057870370435.1458333333333-1.75077546296296-0.595057870370375
7231.631.224502314814835.15-3.925497685185180.375497685185181
7324.123.524780092592635.2041666666667-11.67938657407410.575219907407408
7430.330.016446759259335.3916666666667-5.375219907407410.283553240740737
7531.831.691446759259335.6-3.908553240740740.108553240740747
7638.737.272696759259335.78751.485196759259261.42730324074075
7737.839.27422453703736.02916666666673.24505787037037-1.47422453703704
7838.438.861585648148236.23333333333332.62825231481481-0.461585648148152
7940.7NANA4.68130787037037NA
8043.8NANA7.87644675925926NA
8141.5NANA4.68519675925926NA
8239.3NANA2.03797453703704NA
8335.9NANA-1.75077546296296NA
8433.4NANA-3.92549768518518NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100528mle7igrd4kpyqkq/1xye71292100517.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100528mle7igrd4kpyqkq/1xye71292100517.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100528mle7igrd4kpyqkq/2qpeb1292100517.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100528mle7igrd4kpyqkq/2qpeb1292100517.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100528mle7igrd4kpyqkq/3qpeb1292100517.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292100528mle7igrd4kpyqkq/3qpeb1292100517.ps (open in new window)


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