Home » date » 2010 » Jan » 27 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 26 Jan 2010 17:55:46 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Jan/27/t1264553774rt3hjefcqyosr2a.htm/, Retrieved Wed, 27 Jan 2010 01:56:20 +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/Jan/27/t1264553774rt3hjefcqyosr2a.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:
KDGP2W52
 
Dataseries X:
» Textbox « » Textfile « » CSV «
2,46 2,46 2,45 2,45 2,46 2,43 2,44 2,44 2,43 2,43 2,42 2,43 2,43 2,42 2,41 2,42 2,39 2,4 2,39 2,4 2,41 2,41 2,41 2,41 2,42 2,43 2,43 2,43 2,44 2,42 2,44 2,42 2,42 2,42 2,43 2,44 2,43 2,44 2,44 2,45 2,45 2,43 2,44 2,45 2,46 2,44 2,43 2,42 2,41 2,43 2,41 2,43 2,43 2,44 2,43 2,44 2,43 2,44 2,44 2,43 2,43 2,43 2,43 2,44 2,47 2,48 2,49 2,5 2,51 2,49 2,49 2,48 2,48 2,48 2,5 2,5 2,5 2,5 2,5 2,48 2,49 2,48 2,5 2,5 2,49 2,48 2,47 2,46 2,43 2,42 2,43 2,45 2,45 2,46 2,44 2,45 2,45 2,42 2,41 2,39 2,39 2,38 2,37 2,37 2,38 2,39 2,41 2,42 2,48 2,53 2,56 2,56 2,53 2,57 2,56 2,57 2,58 2,57 2,6 2,63 2,72 2,83 2,9 2,92 2,94 2,95 2,98 3,02 3,16 3,2 3,18 3,17
 
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
12.46NANA0.000315972222222368NA
22.46NANA0.0106493055555556NA
32.45NANA0.0121909722222222NA
42.45NANA0.00994097222222223NA
52.46NANA0.000565972222222274NA
62.43NANA-0.00368402777777786NA
72.442.438149305555562.44041666666667-0.002267361111111060.0018506944444443
82.442.435607638888892.4375-0.001892361111111180.00439236111111097
92.432.432857638888892.43416666666667-0.00130902777777771-0.00285763888888901
102.432.423107638888892.43125-0.008142361111111180.00689236111111091
112.422.418982638888892.42708333333333-0.008100694444444460.00101736111111039
122.432.414649305555552.42291666666667-0.008267361111111240.0153506944444453
132.432.419899305555562.419583333333330.0003159722222223680.0101006944444442
142.422.426482638888892.415833333333330.0106493055555556-0.006482638888889
152.412.425524305555562.413333333333330.0121909722222222-0.0155243055555556
162.422.421607638888892.411666666666670.00994097222222223-0.00160763888888882
172.392.410982638888892.410416666666670.000565972222222274-0.0209826388888885
182.42.405482638888892.40916666666667-0.00368402777777786-0.00548263888888911
192.392.405649305555562.40791666666667-0.00226736111111106-0.0156493055555553
202.42.406024305555562.40791666666667-0.00189236111111118-0.006024305555556
212.412.407857638888892.40916666666667-0.001309027777777710.00214236111111132
222.412.402274305555562.41041666666667-0.008142361111111180.00772569444444393
232.412.404815972222222.41291666666667-0.008100694444444460.00518402777777727
242.412.407565972222222.41583333333333-0.008267361111111240.00243402777777746
252.422.419065972222222.418750.0003159722222223680.000934027777776958
262.432.432315972222222.421666666666670.0106493055555556-0.00231597222222213
272.432.435107638888892.422916666666670.0121909722222222-0.0051076388888891
282.432.433690972222222.423750.00994097222222223-0.00369097222222203
292.442.425565972222222.4250.0005659722222222740.0144340277777775
302.422.423399305555562.42708333333333-0.00368402777777786-0.00339930555555634
312.442.426482638888892.42875-0.002267361111111060.013517361111111
322.422.427690972222222.42958333333333-0.00189236111111118-0.00769097222222248
332.422.429107638888892.43041666666667-0.00130902777777771-0.00910763888888866
342.422.423524305555562.43166666666667-0.00814236111111118-0.00352430555555516
352.432.424815972222222.43291666666667-0.008100694444444460.00518402777777816
362.442.425482638888892.43375-0.008267361111111240.0145173611111113
372.432.434482638888892.434166666666670.000315972222222368-0.00448263888888878
382.442.446065972222222.435416666666670.0106493055555556-0.00606597222222227
392.442.450524305555562.438333333333330.0121909722222222-0.0105243055555557
402.452.450774305555562.440833333333330.00994097222222223-0.00077430555555491
412.452.442232638888892.441666666666670.0005659722222222740.00776736111111154
422.432.437149305555562.44083333333333-0.00368402777777786-0.0071493055555556
432.442.436899305555562.43916666666667-0.002267361111111060.00310069444444494
442.452.436024305555562.43791666666667-0.001892361111111180.0139756944444449
452.462.434940972222222.43625-0.001309027777777710.025059027777778
462.442.426024305555562.43416666666667-0.008142361111111180.0139756944444445
472.432.424399305555562.4325-0.008100694444444460.00560069444444444
482.422.423815972222222.43208333333333-0.00826736111111124-0.00381597222222219
492.412.432399305555562.432083333333330.000315972222222368-0.0223993055555551
502.432.441899305555562.431250.0106493055555556-0.0118993055555552
512.412.441774305555562.429583333333330.0121909722222222-0.0317743055555555
522.432.438274305555562.428333333333330.00994097222222223-0.0082743055555552
532.432.429315972222222.428750.0005659722222222740.000684027777778429
542.442.425899305555562.42958333333333-0.003684027777777860.0141006944444442
552.432.428565972222222.43083333333333-0.002267361111111060.00143402777777757
562.442.429774305555562.43166666666667-0.001892361111111180.0102256944444443
572.432.431190972222222.4325-0.00130902777777771-0.00119097222222209
582.442.425607638888892.43375-0.008142361111111180.0143923611111112
592.442.427732638888892.43583333333333-0.008100694444444460.0122673611111113
602.432.430899305555562.43916666666667-0.00826736111111124-0.000899305555555507
612.432.443649305555562.443333333333330.000315972222222368-0.0136493055555555
622.432.458982638888892.448333333333330.0106493055555556-0.0289826388888890
632.432.466357638888892.454166666666670.0121909722222222-0.0363576388888887
642.442.469524305555562.459583333333330.00994097222222223-0.0295243055555559
652.472.464315972222222.463750.0005659722222222740.00568402777777743
662.482.464232638888892.46791666666667-0.003684027777777860.0157673611111107
672.492.469815972222222.47208333333333-0.002267361111111060.0201840277777778
682.52.474357638888892.47625-0.001892361111111180.0256423611111112
692.512.479940972222222.48125-0.001309027777777710.0300590277777779
702.492.478524305555562.48666666666667-0.008142361111111180.0114756944444445
712.492.482315972222222.49041666666667-0.008100694444444460.0076840277777781
722.482.484232638888892.4925-0.00826736111111124-0.00423263888888892
732.482.494065972222222.493750.000315972222222368-0.0140659722222218
742.482.503982638888892.493333333333330.0106493055555556-0.0239826388888882
752.52.503857638888892.491666666666670.0121909722222222-0.00385763888888846
762.52.500357638888892.490416666666670.00994097222222223-0.000357638888888623
772.52.490982638888892.490416666666670.0005659722222222740.00901736111111129
782.52.487982638888892.49166666666667-0.003684027777777860.0120173611111114
792.52.490649305555562.49291666666667-0.002267361111111060.00935069444444458
802.482.491440972222222.49333333333333-0.00189236111111118-0.0114409722222222
812.492.490774305555562.49208333333333-0.00130902777777771-0.00077430555555491
822.482.481024305555562.48916666666667-0.00814236111111118-0.00102430555555522
832.52.476482638888892.48458333333333-0.008100694444444460.0235173611111112
842.52.470065972222222.47833333333333-0.008267361111111240.0299340277777782
852.492.472399305555562.472083333333330.0003159722222223680.0176006944444449
862.482.478565972222222.467916666666670.01064930555555560.00143402777777801
872.472.477190972222222.4650.0121909722222222-0.00719097222222187
882.462.472440972222222.46250.00994097222222223-0.0124409722222225
892.432.459732638888892.459166666666670.000565972222222274-0.029732638888889
902.422.450899305555562.45458333333333-0.00368402777777786-0.0308993055555558
912.432.448565972222222.45083333333333-0.00226736111111106-0.0185659722222224
922.452.444774305555562.44666666666667-0.001892361111111180.00522569444444398
932.452.440357638888892.44166666666667-0.001309027777777710.00964236111111116
942.462.428107638888892.43625-0.008142361111111180.0318923611111108
952.442.423565972222222.43166666666667-0.008100694444444460.0164340277777781
962.452.420065972222222.42833333333333-0.008267361111111240.0299340277777778
972.452.424482638888892.424166666666670.0003159722222223680.0255173611111115
982.422.428982638888892.418333333333330.0106493055555556-0.0089826388888885
992.412.424274305555562.412083333333330.0121909722222222-0.0142743055555554
1002.392.416190972222222.406250.00994097222222223-0.026190972222222
1012.392.402649305555562.402083333333330.000565972222222274-0.0126493055555552
1022.382.395899305555562.39958333333333-0.00368402777777786-0.0158993055555556
1032.372.397315972222222.39958333333333-0.00226736111111106-0.0273159722222220
1042.372.403524305555562.40541666666667-0.00189236111111118-0.0335243055555554
1052.382.414940972222222.41625-0.00130902777777771-0.034940972222222
1062.392.421440972222222.42958333333333-0.00814236111111118-0.0314409722222222
1072.412.434399305555562.4425-0.00810069444444446-0.0243993055555554
1082.422.447982638888892.45625-0.00826736111111124-0.0279826388888891
1092.482.472399305555562.472083333333330.0003159722222223680.00760069444444467
1102.532.498982638888892.488333333333330.01064930555555560.0310173611111115
1112.562.517190972222222.5050.01219097222222220.0428090277777784
1122.562.530774305555562.520833333333330.009940972222222230.0292256944444449
1132.532.536815972222222.536250.000565972222222274-0.0068159722222223
1142.572.549232638888892.55291666666667-0.003684027777777860.020767361111111
1152.562.569399305555562.57166666666667-0.00226736111111106-0.00939930555555568
1162.572.592274305555562.59416666666667-0.00189236111111118-0.0222743055555559
1172.582.619524305555562.62083333333333-0.00130902777777771-0.0395243055555552
1182.572.641857638888892.65-0.00814236111111118-0.071857638888889
1192.62.673982638888892.68208333333333-0.00810069444444446-0.0739826388888893
1202.632.706732638888892.715-0.00826736111111124-0.0767326388888891
1212.722.748649305555562.748333333333330.000315972222222368-0.0286493055555557
1222.832.795232638888892.784583333333330.01064930555555560.0347673611111112
1232.92.839690972222222.82750.01219097222222220.0603090277777771
1242.922.887857638888892.877916666666670.009940972222222230.0321423611111111
1252.942.928899305555562.928333333333330.0005659722222222740.0111006944444445
1262.952.971315972222222.975-0.00368402777777786-0.0213159722222218
1272.98NANA-0.00226736111111106NA
1283.02NANA-0.00189236111111118NA
1293.16NANA-0.00130902777777771NA
1303.2NANA-0.00814236111111118NA
1313.18NANA-0.00810069444444446NA
1323.17NANA-0.00826736111111124NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264553774rt3hjefcqyosr2a/111271264553743.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264553774rt3hjefcqyosr2a/111271264553743.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t1264553774rt3hjefcqyosr2a/25uel1264553743.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264553774rt3hjefcqyosr2a/25uel1264553743.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t1264553774rt3hjefcqyosr2a/38ot21264553743.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264553774rt3hjefcqyosr2a/38ot21264553743.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jan/27/t1264553774rt3hjefcqyosr2a/436dg1264553743.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jan/27/t1264553774rt3hjefcqyosr2a/436dg1264553743.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