Home » date » 2010 » Dec » 29 »

CM 2

*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: Wed, 29 Dec 2010 17:28:06 +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/29/t1293643556lf6cd6bubr7v3qs.htm/, Retrieved Wed, 29 Dec 2010 18:26:00 +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/29/t1293643556lf6cd6bubr7v3qs.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
34420 34070 33978 34484 34645 34410 34534 35019 35508 35488 35709 36534 36066 35724 35727 36281 36017 35780 36003 36285 36419 36413 36663 37451 37063 36613 36564 37064 36817 36621 36798 36967 36926 36975 37324 38159 37776 37465 37451 37944 37737 37603 37813 37960 37934 37975 38241 39176 39137 38797 38730 39031 38851 38727 39291 39407 39326 39326 39617 40458 40425 40092 39939 40174 40065 39922 40107 40163 40116 40118 40416 41215 40852 40497 40430 40766 40626 40442 40590 40673 40660 40736 41082 41873 41507 41104 40963 41227 41063 40873 41016 41433 41345 41375 41597 42225 41937 41642 41551 41866 41744 41615 41764 41828 41786 41852 42183 42937 42635 42292 42202 42577 42600 42433 42584 42660 42659 42712 43039 43664 43397 43110 43005 43159 43066 42977 43139 43226 43242 43348 43605 44225 43983 43754 43632 43868 43864 43808 43954 44032 44090 44210 44435 44919 44785 44616 44 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'Gwilym Jenkins' @ www.wessa.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
134420NANA360.163194444447NA
234070NANA0.0928819444452906NA
333978NANA-142.097222222223NA
434484NANA90.2647569444462NA
534645NANA-84.4826388888877NA
634410NANA-281.258680555554NA
73453434791.876736111134968.5-176.62326388889-257.876736111102
83501934990.824652777835106-115.17534722222328.1753472222263
93550835086.337673611135247.7916666667-161.453993055557421.662326388891
103548835234.767361111135395.5416666667-160.774305555558253.232638888891
113570935576.204861111135527.583333333348.6215277777765132.795138888898
123653436264.556423611135641.8333333333622.723090277777269.443576388891
133606636120.288194444435760.125360.163194444447-54.288194444438
143572435874.176215277835874.08333333330.0928819444452906-150.176215277774
153572735822.694444444435964.7916666667-142.097222222223-95.6944444444453
163628136131.556423611136041.291666666790.2647569444462149.443576388891
173601736035.100694444436119.5833333333-84.4826388888877-18.1006944444453
183578035916.282986111136197.5416666667-281.258680555554-136.282986111117
193600336100.668402777836277.2916666667-176.62326388889-97.668402777781
203628536240.699652777836355.875-115.17534722222344.3003472222263
213641936266.337673611136427.7916666667-161.453993055557152.662326388883
223641336334.517361111136495.2916666667-160.77430555555878.4826388888832
233666336609.871527777836561.2548.621527777776553.128472222219
243745137252.348090277836629.625622.723090277777198.651909722212
253706337057.954861111136697.7916666667360.1631944444475.04513888888323
263661336759.426215277836759.33333333330.0928819444452906-146.426215277774
273656436666.777777777836808.875-142.097222222223-102.777777777781
283706436943.681423611136853.416666666790.2647569444462120.318576388891
293681736819.892361111136904.375-84.4826388888877-2.89236111110222
303662136680.157986111136961.4166666667-281.258680555554-59.1579861111095
313679836844.001736111137020.625-176.62326388889-46.0017361111095
323696736970.657986111137085.8333333333-115.175347222223-3.65798611110222
333692636996.837673611137158.2916666667-161.453993055557-70.8376736111095
343697537071.142361111137231.9166666667-160.774305555558-96.1423611111168
353732437355.538194444437306.916666666748.6215277777765-31.538194444438
363815938008.889756944437386.1666666667622.723090277777150.110243055555
373777637829.538194444437469.375360.163194444447-53.5381944444453
383746537553.134548611137553.04166666670.0928819444452906-88.1345486111022
393745137494.319444444537636.4166666667-142.097222222223-43.3194444444525
403794437810.348090277837720.083333333390.2647569444462133.651909722219
413773737715.475694444437799.9583333333-84.482638888887721.524305555562
423760337599.282986111137880.5416666667-281.2586805555543.71701388889051
433781337803.001736111137979.625-176.623263888899.9982638888905
443796037976.657986111138091.8333333333-115.175347222223-16.6579861111022
453793438039.171006944438200.625-161.453993055557-105.171006944445
463797538138.434027777838299.2083333333-160.774305555558-163.434027777774
473824138439.538194444438390.916666666748.6215277777765-198.538194444438
483917639106.889756944538484.1666666667622.72309027777769.1102430555475
493913738952.746527777838592.5833333333360.163194444447184.253472222219
503879738714.551215277838714.45833333330.092881944445290682.4487847222263
513873038690.652777777838832.75-142.09722222222339.347222222219
523903139037.306423611138947.041666666790.2647569444462-6.3064236111095
533885138976.184027777839060.6666666667-84.4826388888877-125.184027777766
543872738890.157986111139171.4166666667-281.258680555554-163.157986111109
553929139101.876736111139278.5-176.62326388889189.123263888891
563940739270.949652777839386.125-115.175347222223136.050347222226
573932639329.004340277839490.4583333333-161.453993055557-3.00434027778101
583932639427.684027777839588.4583333333-160.774305555558-101.684027777781
593961739735.288194444439686.666666666748.6215277777765-118.288194444438
604045840409.764756944539787.0416666667622.72309027777748.2352430555475
614042540230.996527777839870.8333333333360.163194444447194.003472222226
624009239936.426215277839936.33333333330.0928819444452906155.573784722219
633993939858.652777777840000.75-142.09722222222380.347222222219
644017440156.931423611140066.666666666790.264756944446217.0685763888905
654006540048.475694444440132.9583333333-84.482638888887716.5243055555547
663992239916.532986111140197.7916666667-281.2586805555545.46701388889051
674010740070.501736111140247.125-176.6232638888936.4982638888905
684016340166.616319444440281.7916666667-115.175347222223-3.61631944443798
694011640157.671006944540319.125-161.453993055557-41.6710069444525
704011840203.475694444440364.25-160.774305555558-85.4756944444453
714041640460.913194444440412.291666666748.6215277777765-44.913194444438
724121541080.056423611140457.3333333333622.723090277777134.943576388891
734085240859.288194444440499.125360.163194444447-7.28819444443798
744049740540.592881944440540.50.0928819444452906-43.5928819444453
754043040442.319444444440584.4166666667-142.097222222223-12.3194444444453
764076640723.098090277840632.833333333390.264756944446242.901909722219
774062640601.850694444440686.3333333333-84.482638888887724.1493055555547
784044240460.241319444440741.5-281.258680555554-18.2413194444453
794059040619.585069444440796.2083333333-176.62326388889-29.5850694444453
804067340733.616319444440848.7916666667-115.175347222223-60.616319444438
814066040734.837673611140896.2916666667-161.453993055557-74.8376736111168
824073640776.934027777840937.7083333333-160.774305555558-40.934027777781
834108241023.746527777840975.12548.621527777776558.2534722222335
844187341634.014756944541011.2916666667622.723090277777238.985243055547
854150741407.163194444441047360.16319444444799.8368055555547
864110441096.509548611141096.41666666670.09288194444529067.49045138888323
874096341014.527777777841156.625-142.097222222223-51.5277777777737
884122741302.056423611141211.791666666790.2647569444462-75.0564236111095
894106341175.392361111141259.875-84.4826388888877-112.392361111102
904087341014.741319444441296-281.258680555554-141.741319444445
914101641151.960069444441328.5833333333-176.62326388889-135.960069444445
924143341253.741319444441368.9166666667-115.175347222223179.258680555562
934134541254.379340277841415.8333333333-161.45399305555790.6206597222263
944137541306.184027777841466.9583333333-160.77430555555868.815972222219
954159741570.579861111141521.958333333348.621527777776526.4201388888832
964222542203.973090277841581.25622.72309027777721.0269097222263
974193742003.496527777841643.3333333333360.163194444447-66.4965277777737
984164241691.051215277841690.95833333330.0928819444452906-49.0512152777737
994155141583.694444444441725.7916666667-142.097222222223-32.6944444444453
1004186641854.306423611141764.041666666790.264756944446211.6935763888905
1014174441723.850694444441808.3333333333-84.482638888887720.1493055555547
1024161541581.157986111141862.4166666667-281.25868055555433.8420138888905
1034176441744.543402777841921.1666666667-176.6232638888919.4565972222263
1044182841862.157986111141977.3333333333-115.175347222223-34.1579861111168
1054178641870.087673611142031.5416666667-161.453993055557-84.0876736111095
1064185241927.517361111142088.2916666667-160.774305555558-75.5173611111095
1074218342202.204861111142153.583333333348.6215277777765-19.2048611111095
1084293742846.056423611142223.3333333333622.72309027777790.9435763888832
1094263542651.746527777842291.5833333333360.163194444447-16.7465277777665
1104229242360.509548611142360.41666666670.0928819444452906-68.5095486111095
1114220242289.361111111142431.4583333333-142.097222222223-87.3611111111095
1124257742593.931423611142503.666666666790.2647569444462-16.9314236111095
1134260042490.684027777842575.1666666667-84.4826388888877109.315972222226
1144243342359.866319444442641.125-281.25868055555473.133680555562
1154258442526.543402777842703.1666666667-176.6232638888957.456597222219
1164266042653.824652777842769-115.1753472222236.17534722222626
1174265942675.087673611142836.5416666667-161.453993055557-16.0876736111095
1184271242733.475694444442894.25-160.774305555558-21.4756944444453
1194303942986.538194444442937.916666666748.621527777776552.461805555562
1204366443602.723090277842980622.72309027777761.2769097222263
1214339743385.954861111143025.7916666667360.16319444444711.0451388888905
1224311043072.592881944443072.50.092881944445290637.4071180555547
1234300542978.277777777843120.375-142.09722222222326.7222222222117
1244315943261.431423611143171.166666666790.2647569444462-102.431423611102
1254306643136.767361111143221.25-84.4826388888877-70.7673611111022
1264297742986.949652777843268.2083333333-281.258680555554-9.94965277777374
1274313943139.376736111143316-176.62326388889-0.37673611111677
1284322643252.074652777843367.25-115.175347222223-26.074652777781
1294324243258.754340277843420.2083333333-161.453993055557-16.754340277781
1304334843315.100694444443475.875-160.77430555555832.8993055555547
1314360543587.288194444443538.666666666748.621527777776517.7118055555693
1324422544229.264756944443606.5416666667622.723090277777-4.26475694444525
1334398344035.288194444443675.125360.163194444447-52.2881944444453
1344375443742.759548611143742.66666666670.092881944445290611.2404513888832
1354363243669.486111111143811.5833333333-142.097222222223-37.4861111111168
1364386843973.098090277843882.833333333390.2647569444462-105.098090277774
1374386443868.850694444443953.3333333333-84.4826388888877-4.85069444443798
1384380843735.574652777844016.8333333333-281.25868055555472.4253472222263
1394395443902.543402777844079.1666666667-176.6232638888951.4565972222335
1404403244033.324652777844148.5-115.175347222223-1.32465277777374
1414409044058.962673611144220.4166666667-161.45399305555731.0373263888905
1424421044126.142361111144286.9166666667-160.77430555555883.8576388888832
1434443544390.996527777844342.37548.621527777776544.0034722222263
1444491945007.723090277844385622.723090277777-88.7230902777883
1454478544775.079861111144414.9166666667360.1631944444479.9201388888905
1464461644437.676215277844437.58333333330.0928819444452906178.323784722234
1474449644315.111111111144457.2083333333-142.097222222223180.888888888891
1484460044563.014756944444472.7590.264756944446236.9852430555547
1494446344402.184027777844486.6666666667-84.482638888887760.815972222219
1504423244217.282986111144498.5416666667-281.25868055555414.7170138888905
1514424844330.251736111144506.875-176.62326388889-82.2517361111022
1524428244394.824652777844510-115.175347222223-112.824652777766
1534431144347.879340277844509.3333333333-161.453993055557-36.8793402777665
1544436244355.142361111144515.9166666667-160.7743055555586.8576388888905
1554461744580.329861111144531.708333333348.621527777776536.6701388888978
1564502245176.431423611144553.7083333333622.723090277777-154.431423611109
1574488244941.246527777844581.0833333333360.163194444447-59.2465277777737
1584459444611.176215277844611.08333333330.0928819444452906-17.1762152777883
1594450244498.361111111144640.4583333333-142.0972222222233.63888888888323
1604475244759.764756944444669.590.2647569444462-7.76475694444525
1614469044612.809027777844697.2916666667-84.482638888887777.1909722222263
1624453344439.949652777844721.2083333333-281.25868055555493.0503472222335
1634460444568.085069444444744.7083333333-176.6232638888935.9149305555547
1644464644657.491319444444772.6666666667-115.175347222223-11.4913194444453
1654465244642.171006944444803.625-161.4539930555579.82899305555475
1664471844671.684027777844832.4583333333-160.77430555555846.3159722222263
1674492844906.663194444444858.041666666748.621527777776521.3368055555547
1684528545506.431423611144883.7083333333622.723090277777-221.431423611109
1694518345270.621527777844910.4583333333360.163194444447-87.6215277777737
1704496444937.426215277844937.33333333330.092881944445290626.5737847222263
1714487544823.694444444444965.7916666667-142.09722222222351.3055555555547
1724507145087.223090277844996.958333333390.2647569444462-16.2230902777737
1734498544944.434027777845028.9166666667-84.482638888887740.5659722222263
1744485444783.741319444445065-281.25868055555470.2586805555547
1754492544927.126736111145103.75-176.62326388889-2.12673611110949
1764497045024.782986111145139.9583333333-115.175347222223-54.7829861111022
1774501145015.046006944445176.5-161.453993055557-4.04600694444525
1784510745049.434027777845210.2083333333-160.77430555555857.5659722222117
1794530645287.788194444445239.166666666748.621527777776518.2118055555547
1804577345891.889756944445269.1666666667622.723090277777-118.889756944445
1814562545658.704861111145298.5416666667360.163194444447-33.7048611111022
1824539145324.967881944445324.8750.092881944445290666.032118055562
1834532545207.652777777845349.75-142.097222222223117.347222222226
1844543045462.014756944445371.7590.2647569444462-32.014756944438
1854532145306.934027777845391.4166666667-84.482638888887714.0659722222263
1864523845125.157986111145406.4166666667-281.258680555554112.842013888883
1874524645239.001736111145415.625-176.623263888896.9982638888905
1884528145305.407986111145420.5833333333-115.175347222223-24.4079861111095
1894529745256.629340277845418.0833333333-161.45399305555740.370659722219
1904534945250.267361111145411.0416666667-160.77430555555898.7326388888832
1914553645453.746527777845405.12548.621527777776582.2534722222263
1924590346021.181423611145398.4583333333622.723090277777-118.181423611109
1934571645750.663194444445390.5360.163194444447-34.6631944444453
1944541945382.801215277845382.70833333330.092881944445290636.198784722219
1954523745235.194444444545377.2916666667-142.0972222222231.80555555554747
1964534945461.014756944445370.7590.2647569444462-112.014756944438
1974526045271.892361111145356.375-84.4826388888877-11.8923611111095
1984513945051.699652777845332.9583333333-281.25868055555487.3003472222263
1994515445128.710069444445305.3333333333-176.6232638888925.289930555562
2004518645163.949652777845279.125-115.17534722222322.0503472222263
2014526245094.921006944445256.375-161.453993055557167.078993055555
2024522745077.642361111145238.4166666667-160.774305555558149.357638888891
2034531345272.746527777845224.12548.621527777776540.253472222219
2044556445833.139756944445210.4166666667622.723090277777-269.139756944445
20545392NA45196.875NANA
20645114NA45183.9166666667NANA
20744996NA45167.2916666667NANA
20845159NA45150.1666666667NANA
20945107NA45135.8333333333NANA
21044963NANANANA
21145005NANANANA
21245024NANANANA
21345025NANANANA
21445053NANANANA
21545143NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293643556lf6cd6bubr7v3qs/1kpe41293643683.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293643556lf6cd6bubr7v3qs/1kpe41293643683.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293643556lf6cd6bubr7v3qs/2vhe81293643683.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293643556lf6cd6bubr7v3qs/2vhe81293643683.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/29/t1293643556lf6cd6bubr7v3qs/3vhe81293643683.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/29/t1293643556lf6cd6bubr7v3qs/3vhe81293643683.ps (open in new window)


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