Home » date » 2008 » May » 25 »

classical decomposition - hondenvoeding - Peter De Klerck

R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 25 May 2008 04:41:12 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/25/t1211713167n0cjnhpal669dgs.htm/, Retrieved Sun, 25 May 2008 12:59:31 +0200
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2,02 1,99 1,99 2,01 2,01 2,01 2 2,01 2,02 2,01 2 2,01 2,01 2,01 2 2 1,98 2,01 1,99 1,99 2 2 1,99 1,96 1,98 1,98 1,99 1,99 1,99 1,99 1,98 1,98 1,98 1,98 1,98 1,98 1,97 1,99 2 1,99 1,98 1,98 1,96 1,95 1,94 1,93 1,92 1,91 1,92 1,93 1,94 1,93 1,94 1,93 1,93 1,92 1,92 1,91 1,92 1,92 1,93 1,91 1,95 2,01 1,98 2,01 2 1,99 1,98 1,98 1,99 1,98 1,99
 
Text written by user:
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
12.02NANA-0.00533854166666672NA
21.99NANA0.00382812499999999NA
31.99NANA0.0108072916666668NA
42.01NANA0.00789062500000007NA
52.01NANA0.00476562499999997NA
62.01NANA0.0115364583333333NA
722.007057291666672.006250.000807291666666686-0.00705729166666624
82.012.004348958333332.00666666666667-0.002317708333333300.00565104166666686
92.022.007161458333332.00791666666667-0.000755208333333280.0128385416666665
102.012.0025781252.00791666666667-0.005338541666666720.00742187499999991
1121.998307291666672.00625-0.00794270833333340.00169270833333313
122.011.987057291666672.005-0.01794270833333340.0229427083333333
132.011.999244791666672.00458333333333-0.005338541666666720.0107552083333333
142.012.007161458333332.003333333333330.003828124999999990.00283854166666675
1522.012473958333332.001666666666670.0108072916666668-0.0124739583333333
1622.008307291666672.000416666666670.00789062500000007-0.00830729166666688
171.982.004348958333331.999583333333330.00476562499999997-0.0243489583333332
182.012.008619791666671.997083333333330.01153645833333330.00138020833333319
191.991.994557291666671.993750.000807291666666686-0.00455729166666652
201.991.988932291666671.99125-0.002317708333333300.00106770833333325
2121.9888281251.98958333333333-0.000755208333333280.0111718750000001
2221.983411458333331.98875-0.005338541666666720.0165885416666669
231.991.980807291666671.98875-0.00794270833333340.00919270833333341
241.961.9703906251.98833333333333-0.0179427083333334-0.0103906249999999
251.981.981744791666671.98708333333333-0.00533854166666672-0.00174479166666686
261.981.9900781251.986250.00382812499999999-0.0100781250000002
271.991.995807291666671.9850.0108072916666668-0.00580729166666671
281.991.991223958333331.983333333333330.00789062500000007-0.00122395833333311
291.991.986848958333331.982083333333330.004765624999999970.00315104166666691
301.991.994036458333331.98250.0115364583333333-0.00403645833333321
311.981.983723958333331.982916666666670.000807291666666686-0.00372395833333306
321.981.980598958333331.98291666666667-0.00231770833333330-0.000598958333333233
331.981.982994791666671.98375-0.00075520833333328-0.00299479166666683
341.981.9788281251.98416666666667-0.005338541666666720.00117187499999982
351.981.975807291666671.98375-0.00794270833333340.0041927083333333
361.981.964973958333331.98291666666667-0.01794270833333340.0150260416666665
371.971.9763281251.98166666666667-0.00533854166666672-0.00632812500000002
381.991.983411458333331.979583333333330.003828124999999990.00658854166666667
3921.987473958333331.976666666666670.01080729166666680.0125260416666666
401.991.980807291666671.972916666666670.007890625000000070.00919270833333319
411.981.973098958333331.968333333333330.004765624999999970.00690104166666683
421.981.9744531251.962916666666670.01153645833333330.00554687500000028
431.961.958723958333331.957916666666670.0008072916666666860.00127604166666684
441.951.9510156251.95333333333333-0.00231770833333330-0.00101562500000019
451.941.9475781251.94833333333333-0.00075520833333328-0.00757812499999977
461.931.937994791666671.94333333333333-0.00533854166666672-0.00799479166666694
471.921.931223958333331.93916666666667-0.0079427083333334-0.0112239583333333
481.911.917473958333331.93541666666667-0.0179427083333334-0.0074739583333332
491.921.926744791666671.93208333333333-0.00533854166666672-0.0067447916666663
501.931.933411458333331.929583333333330.00382812499999999-0.00341145833333334
511.941.938307291666671.92750.01080729166666680.00169270833333335
521.931.933723958333331.925833333333330.00789062500000007-0.00372395833333328
531.941.9297656251.9250.004765624999999970.0102343750000000
541.931.9369531251.925416666666670.0115364583333333-0.00695312499999989
551.931.927057291666671.926250.0008072916666666860.00294270833333332
561.921.9235156251.92583333333333-0.00231770833333330-0.00351562499999991
571.921.924661458333331.92541666666667-0.00075520833333328-0.00466145833333331
581.911.9238281251.92916666666667-0.00533854166666672-0.0138281249999996
591.921.926223958333331.93416666666667-0.0079427083333334-0.006223958333333
601.921.921223958333331.93916666666667-0.0179427083333334-0.00122395833333289
611.931.9400781251.94541666666667-0.00533854166666672-0.0100781249999995
621.911.9550781251.951250.00382812499999999-0.0450781249999999
631.951.967473958333331.956666666666670.0108072916666668-0.0174739583333337
642.011.969973958333331.962083333333330.007890625000000070.0400260416666669
651.981.972682291666671.967916666666670.004765624999999970.00731770833333356
662.011.984869791666671.973333333333330.01153645833333330.0251302083333331
6721.9791406251.978333333333330.0008072916666666860.0208593750000001
681.99NANA-0.00231770833333330NA
691.98NANA-0.00075520833333328NA
701.98NANA-0.00533854166666672NA
711.99NANA-0.0079427083333334NA
721.98NANA-0.0179427083333334NA
731.99NANANANA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211713167n0cjnhpal669dgs/10z9t1211712066.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211713167n0cjnhpal669dgs/10z9t1211712066.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211713167n0cjnhpal669dgs/2gh2w1211712066.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211713167n0cjnhpal669dgs/2gh2w1211712066.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211713167n0cjnhpal669dgs/360aw1211712066.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211713167n0cjnhpal669dgs/360aw1211712066.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211713167n0cjnhpal669dgs/42ctu1211712066.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/25/t1211713167n0cjnhpal669dgs/42ctu1211712066.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