Home » date » 2009 » Aug » 18 »

GuyVanHasseltOpgave9

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 18 Aug 2009 10:45:20 -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/Aug/18/t1250613978lv6yz2o015os5cf.htm/, Retrieved Tue, 18 Aug 2009 18:46:18 +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/Aug/18/t1250613978lv6yz2o015os5cf.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 «
0.8800 1.0300 0.6900 0.7100 1.1100 1.0500 1.0300 0.6500 0.5900 0.7700 0.9000 1.2600 0.9600 0.8300 0.8700 0.7900 1.1200 0.8800 0.6400 0.6400 0.5800 0.5000 0.9900 1.0700 0.8900 0.8900 0.8300 0.8600 0.9000 1.1200 0.8800 0.8800 0.8900 0.8200 0.8800 0.8100 0.8800 0.7600 1.1300 0.8500 1.4500 1.5500 0.7100 0.8100 0.8300 0.7300 0.9000 0.9400 1.7800 0.8800 1.0400 0.8300 1.4100 0.9600 1.3000 0.8300 1.4000 0.9100 0.8700 0.9700 1.1900 1.2300 1.3300 1.1700 1.0900 0.6300 0.8900 0.6300 1.5100 0.9700 0.8400 0.9200 0.9500 0.7300 1.0200 0.7900 1.2700 0.9500 0.7500 0.5200 0.9500 0.8200 0.7600 1.2400 0.9400 1.0400 1.8100 0.9500 1.3900 0.8600 1.1500 1.5100 0.6000 0.7200 1.1000 1.6200 1.8400 1.7300 1.3600 1.0700 1.0000 1.4900 0.9000 1.4300 1.5400 0.8100 1.6100 1.3000 1.4000 1.0300 0.7900 1.1100 1.1500 1.0300 1.5900 1.1100 1.3300 0.9300 1.0700 1.1400 1.1200 0.8600 0.8200 1.0200 1.0700 1.3100 0.9800 0.8900 etc...
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
10.88NANA0.167350694444444NA
21.03NANA-0.0304409722222222NA
30.69NANA0.0696840277777778NA
40.71NANA-0.0873159722222222NA
51.11NANA0.154059027777778NA
61.05NANA0.0487673611111112NA
71.030.8537256944444440.8925-0.03877430555555550.176274305555556
80.650.7654340277777780.8875-0.122065972222222-0.115434027777778
90.590.8857673611111110.886666666666667-0.000899305555555584-0.295767361111111
100.770.6707673611111110.8975-0.2267326388888890.099232638888889
110.90.8673923611111110.90125-0.03385763888888900.0326076388888890
121.260.9948090277777780.8945833333333330.1002256944444440.265190972222222
130.961.038600694444440.871250.167350694444444-0.0786006944444446
140.830.8241423611111110.854583333333333-0.03044097222222220.0058576388888888
150.870.9234340277777780.853750.0696840277777778-0.0534340277777776
160.790.7547673611111110.842083333333333-0.08731597222222220.0352326388888889
171.120.9886423611111110.8345833333333330.1540590277777780.131357638888889
180.880.8791840277777780.8304166666666670.04876736111111120.000815972222222183
190.640.7808090277777780.819583333333333-0.0387743055555555-0.140809027777778
200.640.6971006944444440.819166666666667-0.122065972222222-0.0571006944444444
210.580.8191006944444440.82-0.000899305555555584-0.239100694444444
220.50.5945173611111110.82125-0.226732638888889-0.094517361111111
230.990.7811423611111110.815-0.03385763888888900.208857638888889
241.070.9160590277777780.8158333333333330.1002256944444440.153940972222222
250.891.003184027777780.8358333333333330.167350694444444-0.113184027777778
260.890.8253923611111110.855833333333333-0.03044097222222220.0646076388888891
270.830.9484340277777780.878750.0696840277777778-0.118434027777778
280.860.8176840277777780.905-0.08731597222222220.0423159722222221
290.91.067809027777780.913750.154059027777778-0.167809027777778
301.120.9471006944444440.8983333333333330.04876736111111120.172899305555556
310.880.8483090277777780.887083333333333-0.03877430555555550.0316909722222221
320.880.7591840277777780.88125-0.1220659722222220.120815972222222
330.890.8874340277777780.888333333333333-0.0008993055555555840.00256597222222232
340.820.6736840277777780.900416666666667-0.2267326388888890.146315972222222
350.880.8890590277777780.922916666666667-0.0338576388888890-0.0090590277777779
360.811.063975694444440.963750.100225694444444-0.253975694444444
370.881.141934027777780.9745833333333330.167350694444444-0.261934027777778
380.760.9341423611111110.964583333333333-0.0304409722222222-0.174142361111111
391.131.028850694444440.9591666666666670.06968402777777780.101149305555555
400.850.8656006944444440.952916666666667-0.0873159722222222-0.0156006944444445
411.451.104059027777780.950.1540590277777780.345940972222222
421.551.005017361111110.956250.04876736111111120.544982638888889
430.710.9603923611111110.999166666666667-0.0387743055555555-0.250392361111111
440.810.9196006944444441.04166666666667-0.122065972222222-0.109600694444444
450.831.042017361111111.04291666666667-0.000899305555555584-0.212017361111111
460.730.8116006944444441.03833333333333-0.226732638888889-0.0816006944444444
470.91.001975694444441.03583333333333-0.0338576388888890-0.101975694444444
480.941.109809027777781.009583333333330.100225694444444-0.169809027777778
491.781.176934027777781.009583333333330.1673506944444440.603065972222222
500.881.004559027777781.035-0.0304409722222222-0.124559027777778
511.041.129267361111111.059583333333330.0696840277777778-0.0892673611111111
520.831.003517361111111.09083333333333-0.0873159722222222-0.173517361111111
531.411.251142361111111.097083333333330.1540590277777780.158857638888889
540.961.145850694444441.097083333333330.0487673611111112-0.185850694444444
551.31.034975694444441.07375-0.03877430555555550.265024305555556
560.830.9416840277777771.06375-0.122065972222222-0.111684027777778
571.41.089517361111111.09041666666667-0.0008993055555555840.310482638888889
580.910.8899340277777781.11666666666667-0.2267326388888890.0200659722222223
590.871.083642361111111.1175-0.0338576388888890-0.213642361111111
600.971.190642361111111.090416666666670.100225694444444-0.220642361111111
611.191.226934027777781.059583333333330.167350694444444-0.0369340277777779
621.231.003725694444441.03416666666667-0.03044097222222220.226274305555556
631.331.100100694444441.030416666666670.06968402777777780.229899305555556
641.170.9501840277777781.0375-0.08731597222222220.219815972222222
651.091.192809027777781.038750.154059027777778-0.102809027777778
660.631.084184027777781.035416666666670.0487673611111112-0.454184027777778
670.890.9845590277777781.02333333333333-0.0387743055555555-0.094559027777778
680.630.8704340277777780.9925-0.122065972222222-0.240434027777778
691.510.9578506944444440.95875-0.0008993055555555840.552149305555556
700.970.7032673611111110.93-0.2267326388888890.266732638888889
710.840.8878090277777780.921666666666667-0.0338576388888890-0.0478090277777777
720.921.042725694444440.94250.100225694444444-0.122725694444444
730.951.117350694444440.950.167350694444444-0.167350694444445
740.730.9091423611111110.939583333333333-0.0304409722222222-0.179142361111111
751.020.9813506944444440.9116666666666660.06968402777777780.0386493055555558
760.790.7947673611111110.882083333333333-0.0873159722222222-0.00476736111111087
771.271.026559027777780.87250.1540590277777780.243440972222222
780.950.9312673611111110.88250.04876736111111120.018732638888889
790.750.8566423611111110.895416666666667-0.0387743055555555-0.106642361111111
800.520.7858506944444440.907916666666667-0.122065972222222-0.265850694444444
810.950.9528506944444440.95375-0.000899305555555584-0.00285069444444452
820.820.7666006944444450.993333333333334-0.2267326388888890.0533993055555554
830.760.9711423611111111.005-0.0338576388888890-0.211142361111111
841.241.106475694444441.006250.1002256944444440.133524305555556
850.941.186517361111111.019166666666670.167350694444444-0.246517361111111
861.041.046642361111111.07708333333333-0.0304409722222222-0.00664236111111105
871.811.173434027777781.103750.06968402777777780.636565972222222
880.950.9976840277777781.085-0.0873159722222222-0.0476840277777777
891.391.249059027777781.0950.1540590277777780.140940972222222
900.861.173767361111111.1250.0487673611111112-0.313767361111111
911.151.139559027777781.17833333333333-0.03877430555555550.0104409722222223
921.511.122517361111111.24458333333333-0.1220659722222220.387482638888889
930.61.253684027777781.25458333333333-0.000899305555555584-0.653684027777778
940.721.014100694444441.24083333333333-0.226732638888889-0.294100694444444
951.11.195725694444441.22958333333333-0.0338576388888890-0.0957256944444445
961.621.339809027777781.239583333333330.1002256944444440.280190972222222
971.841.422767361111111.255416666666670.1673506944444440.417232638888889
981.731.211225694444441.24166666666667-0.03044097222222220.518774305555555
991.361.347184027777781.27750.06968402777777780.0128159722222223
1001.071.233100694444441.32041666666667-0.0873159722222222-0.163100694444444
10111.499475694444441.345416666666670.154059027777778-0.499475694444445
1021.491.402100694444441.353333333333330.04876736111111120.0878993055555557
1030.91.282892361111111.32166666666667-0.0387743055555555-0.382892361111111
1041.431.152100694444441.27416666666667-0.1220659722222220.277899305555556
1051.541.220350694444441.22125-0.0008993055555555840.319649305555556
1060.810.9724340277777781.19916666666667-0.226732638888889-0.162434027777778
1071.611.173225694444441.20708333333333-0.03385763888888900.436774305555556
1081.31.294392361111111.194166666666670.1002256944444440.00560763888888904
1091.41.371100694444441.203750.1673506944444440.0288993055555553
1101.031.188725694444441.21916666666667-0.0304409722222222-0.158725694444444
1110.791.266767361111111.197083333333330.0696840277777778-0.476767361111111
1121.111.106017361111111.19333333333333-0.08731597222222220.00398263888888906
1131.151.329892361111111.175833333333330.154059027777778-0.179892361111111
1141.031.195434027777781.146666666666670.0487673611111112-0.165434027777778
1151.591.089559027777781.12833333333333-0.03877430555555550.500440972222222
1161.110.9875173611111111.10958333333333-0.1220659722222220.122482638888889
1171.331.102850694444441.10375-0.0008993055555555840.227149305555556
1180.930.8745173611111111.10125-0.2267326388888890.0554826388888892
1191.071.060309027777781.09416666666667-0.03385763888888900.00969097222222226
1201.141.202725694444441.10250.100225694444444-0.0627256944444445
1211.121.256100694444441.088750.167350694444444-0.136100694444444
1220.861.023725694444441.05416666666667-0.0304409722222222-0.163725694444444
1230.821.092600694444441.022916666666670.0696840277777778-0.272600694444445
1241.020.9081006944444450.995416666666667-0.08731597222222220.111899305555555
1251.071.131975694444440.9779166666666670.154059027777778-0.0619756944444444
1261.311.007517361111110.958750.04876736111111120.302482638888889
1270.98NANA-0.0387743055555555NA
1280.89NANA-0.122065972222222NA
1290.8NANA-0.000899305555555584NA
1300.8NANA-0.226732638888889NA
1310.78NANA-0.0338576388888890NA
1320.97NANA0.100225694444444NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250613978lv6yz2o015os5cf/1vtd21250613916.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250613978lv6yz2o015os5cf/1vtd21250613916.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250613978lv6yz2o015os5cf/2x5df1250613916.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250613978lv6yz2o015os5cf/2x5df1250613916.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250613978lv6yz2o015os5cf/3h89b1250613916.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250613978lv6yz2o015os5cf/3h89b1250613916.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250613978lv6yz2o015os5cf/4i0ow1250613916.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Aug/18/t1250613978lv6yz2o015os5cf/4i0ow1250613916.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