Home » date » 2010 » May » 24 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 24 May 2010 09:39:59 +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/May/24/t1274694043nseohavkka7603z.htm/, Retrieved Mon, 24 May 2010 11:40:49 +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/2010/May/24/t1274694043nseohavkka7603z.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 «
1954 2302 3054 2414 2226 2725 2589 3470 2400 3180 4009 3924 2072 2434 2956 2828 2687 2629 3150 4119 3030 3055 3821 4001 2529 2472 3134 2789 2758 2993 3282 3437 2804 3076 3782 3889 2271 2452 3084 2522 2769 3438 2839 3746 2632 2851 3871 3618 2389 2344 2678 2492 2858 2246 2800 3869 3007 3023 3907 4209 2353 2570 2903 2910 3782 2759 2931 3641 2794 3070 3576 4106 2452 2206 2488 2416 2534 2521 3093 3903 2907 3025 3812 4209 2138 2419 2622 2912 2708 2798 3254 2895 3263 3736 4077 4097 2175 3138 2823 2498 2822 2738 4137 3515 3785 3632 4504 4451 2550 2867 3458 2961 3163 2880 3331 3062 3534 3622 4464 5411 2564 2820 3508 3088 3299 2939 3320 3418 3604 3495 4163 4882 2211 3260 2992 2425 2707 3244 3965 3315 3333 3583 4021 4904 2252 2952 3573 3048 3059 2731 3563 3092 3478 3478 4308 5029 2075 3264 3308 3688 3136 2824 3644 4694 2914 3686 4358 5587 2265 3685 3754 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' @ 72.249.127.135


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11954NANA0.718700102822397NA
22302NANA0.855581831860718NA
33054NANA0.953000820181369NA
42414NANA0.884350570550937NA
52226NANA0.912840027781935NA
62725NANA0.883024428752407NA
725892948.324652008032858.833333333331.031303440333950.878125819094142
834703174.007538272862869.251.106215052112171.09325512247781
924002827.363901141232870.666666666670.9849154323529610.848847224452171
1031802986.004656621312883.833333333331.035428997267981.06496819854199
1140093657.733432202192920.291666666671.252523326335161.09603394405544
1239244057.201428901742935.51.382115969648010.967169135859789
1320722123.668966327332954.8750.7187001028223970.975669952734353
1424342571.272949442423005.291666666670.8555818318607180.946612844244255
1529562914.832425259733058.583333333330.9530008201813691.01412347906642
1628282723.468125832933079.6250.8843505705509371.03838189739603
1726872799.300015195623066.583333333330.9128400277819350.959882822639226
1826292703.784008155343061.958333333330.8830244287524070.972340982885552
1931503180.754664873293084.208333333331.031303440333950.990331016342464
2041193434.613367632953104.833333333331.106215052112171.19926162252106
2130303066.862503775063113.833333333330.9849154323529610.987980385905893
2230553230.150185602123119.6251.035428997267980.945776457583048
2338213909.073113020113120.958333333331.252523326335160.977469566192876
2440014338.577205055923139.083333333331.382115969648010.922191725743055
2525292270.912649893073159.750.7187001028223971.11364917541812
2624722683.817609575093136.833333333330.8555818318607180.921076004263707
2731342953.3495417420630990.9530008201813691.06116799102330
2827892733.048590347233090.458333333330.8843505705509371.02047216059399
2927582820.409440838083089.708333333330.9128400277819350.977872205384643
3029932722.732240688983083.416666666670.8830244287524071.09926343665825
3132823164.0389549445430681.031303440333951.03728179290306
3234373381.054122193193056.416666666671.106215052112171.01654687437258
3328043007.439272689773053.50.9849154323529610.932354653163847
3430763148.006151818863040.291666666671.035428997267980.977126425951468
3537823794.675982548163029.6251.252523326335160.996659534936195
3638894213.553297968183048.6251.382115969648010.922973966384932
3722712191.106992642173048.708333333330.7187001028223971.03646239440891
3824522603.642462081153043.1250.8555818318607180.941757570676607
3930842905.540667262963048.833333333330.9530008201813691.06142035275835
4025222681.608865493523032.291666666670.8843505705509370.940480184285136
4127692762.82444908553026.6250.9128400277819351.00223523102112
4234382665.887543088053019.041666666670.8830244287524071.28962679199047
4328393106.973497912733012.666666666671.031303440333950.913750954717587
4437463333.118136601663013.083333333331.106215052112171.12387255611027
4526322946.538668455942991.666666666670.9849154323529610.893251471014711
4628513078.848123376342973.51.035428997267980.925995659985178
4738713727.457230701512975.958333333331.252523326335161.03850956843078
4836184049.5997910686829301.382115969648010.893421618595357
4923892068.927975162362878.708333333330.7187001028223971.15470428583311
5023442465.965085637562882.208333333330.8555818318607180.950540627542573
5126782766.521672619012902.958333333330.9530008201813690.968002537809435
5224922587.388681789402925.750.8843505705509370.963133222905097
5328582678.652991523772934.416666666670.9128400277819351.06695417773177
5422462614.230614006032960.541666666670.8830244287524070.85914379089848
5528003077.065698143052983.666666666671.031303440333950.909957821729236
5638693309.334512981252991.583333333331.106215052112171.16911723031425
5730072964.964794669553010.3750.9849154323529611.01417730335484
5830233144.77043620243037.166666666671.035428997267980.961278433935722
5939073874.159025298523093.083333333331.252523326335161.00847692995745
6042094357.754064134793152.958333333331.382115969648010.965864511409888
6123532285.316597787133179.791666666670.7187001028223971.0296166414222
6225702717.114002531673175.750.8555818318607180.945856521885132
6329033008.980964620153157.3750.9530008201813690.96477845294926
6429102786.109624580293150.458333333330.8843505705509371.04446715747532
6537822865.062532197083138.6250.9128400277819351.32004099648735
6627592755.514522606423120.541666666670.8830244287524071.00126490982537
6729313218.053472632043120.3751.031303440333950.91079903579189
6836413439.591335367463109.333333333331.106215052112171.05855598674225
6927943030.461670921023076.8750.9849154323529610.921971733485363
7030703146.6687226973930391.035428997267980.975634955740854
7135763715.506070629392966.416666666671.252523326335160.962453009636514
7241064014.355833842662904.51.382115969648011.02282910881610
7324522085.188564988712901.333333333330.7187001028223971.17591283645528
7422062497.4433672014329190.8555818318607180.883303312888325
7524882796.700031924752934.6250.9530008201813690.889619899023531
7624162597.742953052942937.458333333330.8843505705509370.93003813066287
7725342688.694231829382945.416666666670.9128400277819350.942464922192316
7825212613.347589577282959.541666666670.8830244287524070.964663104921218
7930933043.118626565392950.751.031303440333951.01639153104291
8039033259.508743342362946.541666666671.106215052112171.19741970564490
8129072916.3345951971229610.9849154323529610.9967992029404
8230253093.085272088772987.251.035428997267980.97798790977308
8338123776.566582788243015.166666666671.252523326335161.00938244207669
8442094193.282263746673033.958333333331.382115969648011.00374831343676
8521382193.622443002043052.208333333330.7187001028223970.974643565860895
8624192581.219088237803016.916666666670.8555818318607180.93715408003257
8726222849.234202137252989.750.9530008201813690.920247271366181
8829122683.303870753743034.208333333330.8843505705509371.08522930695211
8927082806.868980425983074.8750.9128400277819350.964776061470823
9027982720.819021093353081.250.8830244287524071.02836681833973
9132543174.480902277933078.1251.031303440333951.02504948058280
9228953439.913981424323109.6251.106215052112170.841590811756666
9332633100.472742904113147.958333333330.9849154323529611.05242015349687
9437363250.297908173963139.083333333331.035428997267981.14943309984127
9540773916.118556730743126.583333333331.252523326335161.04108186229264
9640974324.410516367033128.833333333331.382115969648010.947412366262101
9721752273.338262740103163.1250.7187001028223970.956742793471674
9831382759.893094124713225.750.8555818318607181.13700056233345
9928233119.489351393683273.333333333330.9530008201813690.904955805904188
10024982910.17664004053290.750.8843505705509370.858367140203984
10128223016.21362679733304.208333333330.9128400277819350.935610122216866
10227382946.431762639593336.750.8830244287524070.929259599600275
10341373472.527596534443367.1251.031303440333951.1913512232786
10435153729.557955902363371.458333333331.106215052112170.942470942015313
10537853335.539226092353386.6250.9849154323529611.13474905957985
10636323553.980604497683432.3751.035428997267981.02195267903364
10745044341.089283661883465.8751.252523326335161.03752761247073
10844514818.0562701929834861.382115969648010.923816524837251
10925502485.504522260793458.333333333330.7187001028223971.02594864630564
11028672914.004771588623405.8750.8555818318607180.983869356685028
11134583217.84697770993376.541666666670.9530008201813691.07463158563898
11229612976.429236950943365.666666666670.8843505705509370.994816192248285
11331633070.413503446853363.583333333330.9128400277819351.03015440638507
11428803003.975521246623401.916666666670.8830244287524070.95872951681205
11533313550.262093349613442.51.031303440333950.93824058968482
11630623806.624271199513441.1251.106215052112170.804387242304618
11735343389.340231584633441.250.9849154323529611.04268080467913
11836223570.806325703293448.6251.035428997267981.01433672667381
11944644333.208824400353459.583333333331.252523326335161.03018344624038
12054114792.77506558153467.708333333331.382115969648011.12899101792992
12125642493.679735930393469.708333333330.7187001028223971.02819939668129
12228202980.918400688733484.083333333330.8555818318607180.946017173549082
12335083337.250038805123501.833333333330.9530008201813691.05116486904170
12430883094.747973702563499.458333333330.8843505705509370.997819540149988
12532993178.166661726283481.6250.9128400277819351.03801982436254
12629393043.821998594083447.041666666670.8830244287524070.965562375644011
12733203517.045528375523410.291666666671.031303440333950.943974132041864
12834183776.526003323293413.916666666671.106215052112170.905064600903637
12936043359.300310897863410.750.9849154323529611.07284245719512
13034953480.724002940973361.6251.035428997267981.00410144471293
13141634145.017194618493309.333333333331.252523326335161.00433841514695
13248824557.354645418123297.3751.382115969648011.07123548194966
13322112398.272297280723336.958333333330.7187001028223970.921913663643173
13432602874.362813379073359.541666666670.8555818318607181.13416440848244
13529923186.795034318993343.958333333330.9530008201813690.938874313465028
13624252950.488286881443336.333333333330.8843505705509370.821897856969002
13727073043.484722627293334.083333333330.9128400277819350.889440968727184
13832442939.661908685823329.083333333330.8830244287524071.10352826303424
13939653436.002266355943331.708333333331.031303440333951.15395732966297
14033153673.279265126153320.583333333331.106215052112170.90246337420418
14133333281.697182457053331.958333333330.9849154323529611.01563301386161
14235833501.950297384973382.1251.035428997267981.02314416131935
14340214287.074215213673422.751.252523326335160.937935710497045
14449044721.365740483023416.041666666671.382115969648011.03868250619752
14522522427.709055658823377.916666666670.7187001028223970.92762351186636
14629522867.803352668143351.8750.8555818318607181.02935928199314
14735733191.242371479843348.6250.9530008201813691.11962664820821
14830482962.832346928723350.291666666670.8843505705509371.02874535009028
14930593065.202708288273357.8750.9128400277819350.997976411716102
15027312980.24423972393375.041666666670.8830244287524070.916367847842231
15135633478.457591316363372.8751.031303440333951.02430456789086
15230923737.347553560983378.51.106215052112170.82732471510548
15334783329.465580926173380.458333333330.9849154323529611.04461209027802
15434783516.403160471833396.083333333331.035428997267980.989078851679032
15543084291.092727552333425.958333333331.252523326335161.00394008554956
15650294744.861711967033433.041666666671.382115969648011.05988336547646
15720752472.537974572373440.291666666670.7187001028223970.83921865764625
15832643003.448722261063510.416666666670.8555818318607181.08675069955674
15933083386.647247984523553.666666666670.9530008201813690.976777254250106
16036883129.569277418013538.833333333330.8843505705509371.17843692632448
16131363240.201748614293549.583333333330.9128400277819350.967840968958536
16228243156.738747420793574.916666666670.8830244287524070.894594144766445
16336443718.966147797573606.083333333331.031303440333950.979842207533412
16446944017.26605403923631.541666666671.106215052112171.16845634241237
16529143612.341500726553667.666666666670.9849154323529610.806678991843355
16636863817.712998676823687.083333333331.035428997267980.965499502261572
16743584623.0635975030836911.252523326335160.942664946758197
16855875145.560166834153722.958333333331.382115969648011.08579043269403
16922652704.258866057363762.708333333330.7187001028223970.837567744874303
17036853192.104516186353730.916666666670.8555818318607181.15441082248852
17137543566.804111366313742.708333333330.9530008201813691.05248280611687
17237083384.483329379323827.083333333330.8843505705509371.09558820036499
17332103548.513467997643887.333333333330.9128400277819350.904604147328019
17435173464.472760841003923.416666666670.8830244287524071.01516168340323
17539054056.546140600213933.416666666671.031303440333950.962641583419093
17636704362.082504241333943.251.106215052112170.841341262213998
17742213902.111828553393961.8750.9849154323529611.08172194582256
17844044129.2908411047139881.035428997267981.06652695813061
17950865049.391224704414031.3751.252523326335161.00725013643555
18057255662.5291276479140971.382115969648011.01103232688854
1812367NA4148.375NANA
1823819NANANANA
1834067NANANANA
1844022NANANANA
1853937NANANANA
1864365NANANANA
1874290NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/24/t1274694043nseohavkka7603z/1obh81274693996.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/24/t1274694043nseohavkka7603z/1obh81274693996.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/24/t1274694043nseohavkka7603z/2h2gb1274693996.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/24/t1274694043nseohavkka7603z/2h2gb1274693996.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/24/t1274694043nseohavkka7603z/3h2gb1274693996.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/24/t1274694043nseohavkka7603z/3h2gb1274693996.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/24/t1274694043nseohavkka7603z/4atfe1274693996.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/24/t1274694043nseohavkka7603z/4atfe1274693996.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