Home » date » 2009 » Dec » 11 »

Klassieke decompositie van de tijdreeks met moving averages

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Fri, 11 Dec 2009 08:40:47 -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/Dec/11/t1260546397e6owozl2sumasc0.htm/, Retrieved Fri, 11 Dec 2009 16:46:43 +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/Dec/11/t1260546397e6owozl2sumasc0.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 «
8.3 8.2 8 7.9 7.6 7.6 8.3 8.4 8.4 8.4 8.4 8.6 8.9 8.8 8.3 7.5 7.2 7.4 8.8 9.3 9.3 8.7 8.2 8.3 8.5 8.6 8.5 8.2 8.1 7.9 8.6 8.7 8.7 8.5 8.4 8.5 8.7 8.7 8.6 8.5 8.3 8 8.2 8.1 8.1 8 7.9 7.9 8 8 7.9 8 7.7 7.2 7.5 7.3 7 7 7 7.2 7.3 7.1 6.8 6.4 6.1 6.5 7.7 7.9 7.5 6.9 6.6 6.9
 
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
18.3NANA1.03524932354549NA
28.2NANA1.03033694048115NA
38NANA1.00374983725856NA
47.9NANA0.96901694619278NA
57.6NANA0.941845105965402NA
67.6NANA0.936410597347787NA
78.38.354989302267548.21.018901134422870.99341838747147
88.48.498863910560498.251.030165322492180.988367396913175
98.48.490542467861968.28751.024499845292540.98933607973758
108.48.33220358303978.283333333333331.005899828938391.00813667312430
118.48.189805125657968.250.9927036515949041.02566543050988
128.68.317296561698738.2251.011221466467931.03398982303975
138.98.527866302706018.23751.035249323545491.04363737470602
148.88.547503535408228.295833333333331.030336940481151.02954037556648
158.38.402222596051868.370833333333331.003749837258560.98783386242351
167.58.159930201065048.420833333333330.969016946192780.919125509066376
177.27.935045017758518.4250.9418451059654020.907367252975441
187.47.86975072854378.404166666666670.9364105973477870.940309325574964
198.88.533297000791548.3751.018901134422871.03125439079218
209.38.60188044280978.351.030165322492181.08115894679446
219.38.554573708192758.351.024499845292541.08713774844132
228.78.436984815220788.38751.005899828938391.03117407350369
238.28.392482121191928.454166666666670.9927036515949040.977064935210778
248.38.608022733308268.51251.011221466467930.964216784405508
258.58.825500483225348.5251.035249323545490.963118184193177
268.68.749277852919118.491666666666671.030336940481150.982938265828499
278.58.473321542857678.441666666666661.003749837258561.00314852410680
288.28.147817489237638.408333333333330.969016946192781.00640447712916
298.17.919347599325768.408333333333330.9418451059654021.02281152562234
307.97.88925928265518.4250.9364105973477871.00136143546055
318.68.60122374308648.441666666666661.018901134422870.999857724537467
328.78.709189330569318.454166666666671.030165322492180.99894486958309
338.78.669829940788168.46251.024499845292541.00347989054202
348.58.529192299540138.479166666666671.005899828938390.99657736647095
358.48.437981038556698.50.9927036515949040.995498800200767
368.58.608022733308268.51251.011221466467930.987450923788773
378.78.79961925013678.51.035249323545490.988679140846332
388.78.71493328823648.458333333333331.030336940481150.998286471308213
398.68.439863214949068.408333333333331.003749837258561.01897386023595
408.58.103404212537128.36250.969016946192781.04894187394099
418.37.836936152553788.320833333333330.9418451059654021.05908735741012
4287.748797693052948.2750.9364105973477871.03241823014327
438.28.376216409234688.220833333333331.018901134422870.978962290296081
448.18.408724444842438.16251.030165322492180.963285222762677
458.18.3027174962258.104166666666671.024499845292540.975584199231497
4688.101684872241318.054166666666671.005899828938390.98744892280497
477.97.949901743189198.008333333333330.9927036515949040.993722973591222
487.98.039210658420057.951.011221466467930.98268354141532
4988.165529039465097.88751.035249323545490.979728314152694
5088.062386559265017.8251.030336940481150.992262023309547
517.97.774878947765267.745833333333331.003749837258561.01609299039578
5287.421054779593047.658333333333330.969016946192781.07801387236744
537.77.138401032296117.579166666666670.9418451059654021.07867293602069
547.27.034784612575257.51250.9364105973477871.02348549337664
557.57.595058872843817.454166666666671.018901134422870.987484116392607
567.37.610346319910987.38751.030165322492180.959220473436403
5777.483117619990967.304166666666671.024499845292540.935438991537388
5877.234096269781957.191666666666671.005899828938390.967639873585895
5977.006833274174037.058333333333330.9927036515949040.999024769977157
607.27.040629460282966.96251.011221466467931.02263583684045
617.37.186355720944986.941666666666671.035249323545491.01581389559159
627.17.186600159856036.9751.030336940481150.987949773477064
636.87.04716031575287.020833333333331.003749837258560.964927672327772
646.46.819456758831697.03750.969016946192780.93849117698584
656.16.608613160190577.016666666666670.9418451059654020.92303783746121
666.56.543169048967666.98750.9364105973477870.993402424934371
677.7NANA1.01890113442287NA
687.9NANA1.03016532249218NA
697.5NANA1.02449984529254NA
706.9NANA1.00589982893839NA
716.6NANA0.992703651594904NA
726.9NANA1.01122146646793NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546397e6owozl2sumasc0/1ha3o1260546045.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546397e6owozl2sumasc0/1ha3o1260546045.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546397e6owozl2sumasc0/2302j1260546045.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546397e6owozl2sumasc0/2302j1260546045.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546397e6owozl2sumasc0/3yro71260546045.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546397e6owozl2sumasc0/3yro71260546045.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546397e6owozl2sumasc0/4ecn51260546045.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/11/t1260546397e6owozl2sumasc0/4ecn51260546045.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 12 ;
 
Parameters (R input):
par1 = multiplicative ; 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