Home » date » 2010 » Jun » 06 »

OPGAVE 9 oef é STAP 1

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sun, 06 Jun 2010 13:32:18 +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/Jun/06/t1275831275awp5ncgruacfsvj.htm/, Retrieved Sun, 06 Jun 2010 15:34:35 +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/Jun/06/t1275831275awp5ncgruacfsvj.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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11954NANA-924.110615079365NA
22302NANA-458.12251984127NA
33054NANA-149.994543650794NA
42414NANA-373.057043650794NA
52226NANA-293.690972222222NA
62725NANA-390.470734126984NA
725892959.053075396822858.83333333333100.219742063492-370.053075396825
834703190.326884920632869.25321.076884920635279.673115079365
924002822.172123015872870.66666666667-48.4945436507935-422.172123015873
1031803002.050099206352883.83333333333118.216765873016177.949900793651
1140093746.520337301592920.29166666667826.22867063492262.479662698413
1239244207.698908730162935.51272.19890873016-283.698908730159
1320722030.764384920632954.875-924.11061507936541.2356150793648
1424342547.169146825403005.29166666667-458.12251984127-113.169146825397
1529562908.588789682543058.58333333333-149.99454365079447.4112103174602
1628282706.567956349213079.625-373.057043650794121.432043650794
1726872772.892361111113066.58333333333-293.690972222222-85.8923611111109
1826292671.487599206353061.95833333333-390.470734126984-42.4875992063494
1931503184.428075396833084.20833333333100.219742063492-34.4280753968255
2041193425.910218253973104.83333333333321.076884920635693.089781746032
2130303065.338789682543113.83333333333-48.4945436507935-35.3387896825393
2230553237.841765873023119.625118.216765873016-182.841765873015
2338213947.187003968253120.95833333333826.22867063492-126.187003968254
2440014411.282242063493139.083333333331272.19890873016-410.282242063492
2525292235.639384920643159.75-924.110615079365293.360615079365
2624722678.710813492063136.83333333333-458.12251984127-206.710813492063
2731342949.005456349213099-149.994543650794184.994543650794
2827892717.401289682543090.45833333333-373.05704365079471.5987103174607
2927582796.017361111113089.70833333333-293.690972222222-38.0173611111113
3029932692.945932539683083.41666666667-390.470734126984300.054067460318
3132823168.219742063493068100.219742063492113.780257936508
3234373377.49355158733056.41666666667321.07688492063559.5064484126983
3328043005.005456349213053.5-48.4945436507935-201.005456349206
3430763158.508432539683040.29166666667118.216765873016-82.5084325396824
3537823855.853670634923029.625826.22867063492-73.85367063492
3638894320.823908730163048.6251272.19890873016-431.823908730159
3722712124.597718253973048.70833333333-924.110615079365146.402281746032
3824522585.002480158733043.125-458.12251984127-133.00248015873
3930842898.838789682543048.83333333333-149.994543650794185.161210317460
4025222659.234623015873032.29166666667-373.057043650794-137.234623015873
4127692732.934027777783026.625-293.69097222222236.0659722222217
4234382628.570932539683019.04166666667-390.470734126984809.429067460318
4328393112.886408730163012.66666666667100.219742063492-273.886408730158
4437463334.160218253973013.08333333333321.076884920635411.839781746032
4526322943.172123015872991.66666666667-48.4945436507935-311.172123015873
4628513091.716765873022973.5118.216765873016-240.716765873016
4738713802.187003968252975.95833333333826.2286706349268.8129960317465
4836184202.1989087301629301272.19890873016-584.198908730159
4923891954.597718253972878.70833333333-924.110615079365434.402281746032
5023442424.085813492062882.20833333333-458.12251984127-80.0858134920636
5126782752.963789682542902.95833333333-149.994543650794-74.9637896825398
5224922552.692956349212925.75-373.057043650794-60.6929563492063
5328582640.725694444442934.41666666667-293.690972222222217.274305555555
5422462570.070932539682960.54166666667-390.470734126984-324.070932539683
5528003083.886408730162983.66666666667100.219742063492-283.886408730158
5638693312.660218253972991.58333333333321.076884920635556.339781746032
5730072961.880456349213010.375-48.494543650793545.1195436507942
5830233155.383432539683037.16666666667118.216765873016-132.383432539682
5939073919.312003968253093.08333333333826.22867063492-12.3120039682540
6042094425.157242063493152.958333333331272.19890873016-216.157242063493
6123532255.68105158733179.79166666667-924.11061507936597.3189484126983
6225702717.627480158733175.75-458.12251984127-147.62748015873
6329033007.380456349213157.375-149.994543650794-104.380456349206
6429102777.401289682543150.45833333333-373.057043650794132.598710317460
6537822844.934027777783138.625-293.690972222222937.065972222223
6627592730.070932539683120.54166666667-390.47073412698428.9290674603176
6729313220.594742063493120.375100.219742063492-289.594742063492
6836413430.410218253973109.33333333333321.076884920635210.589781746032
6927943028.380456349213076.875-48.4945436507935-234.380456349206
7030703157.216765873023039118.216765873016-87.2167658730154
7135763792.645337301592966.41666666667826.22867063492-216.645337301587
7241064176.698908730162904.51272.19890873016-70.6989087301586
7324521977.222718253972901.33333333333-924.110615079365474.777281746032
7422062460.877480158732919-458.12251984127-254.87748015873
7524882784.630456349212934.625-149.994543650794-296.630456349206
7624162564.401289682542937.45833333333-373.057043650794-148.401289682539
7725342651.725694444442945.41666666667-293.690972222222-117.725694444444
7825212569.070932539682959.54166666667-390.470734126984-48.0709325396833
7930933050.969742063492950.75100.21974206349242.0302579365080
8039033267.61855158732946.54166666667321.076884920635635.381448412698
8129072912.505456349212961-48.4945436507935-5.50545634920627
8230253105.466765873022987.25118.216765873016-80.4667658730154
8338123841.395337301593015.16666666667826.22867063492-29.3953373015875
8442094306.157242063493033.958333333331272.19890873016-97.1572420634925
8521382128.097718253973052.20833333333-924.1106150793659.90228174603135
8624192558.794146825403016.91666666667-458.12251984127-139.794146825397
8726222839.755456349212989.75-149.994543650794-217.755456349206
8829122661.151289682543034.20833333333-373.057043650794250.848710317461
8927082781.184027777783074.875-293.690972222222-73.1840277777783
9027982690.779265873023081.25-390.470734126984107.220734126984
9132543178.344742063493078.125100.21974206349275.6552579365084
9228953430.701884920633109.625321.076884920635-535.701884920634
9332633099.463789682543147.95833333333-48.4945436507935163.536210317461
9437363257.300099206353139.08333333333118.216765873016478.699900793651
9540773952.812003968253126.58333333333826.22867063492124.187996031746
9640974401.032242063493128.833333333331272.19890873016-304.032242063492
9721752239.014384920643163.125-924.110615079365-64.0143849206352
9831382767.627480158733225.75-458.12251984127370.37251984127
9928233123.338789682543273.33333333333-149.994543650794-300.33878968254
10024982917.692956349213290.75-373.057043650794-419.692956349206
10128223010.517361111113304.20833333333-293.690972222222-188.517361111111
10227382946.279265873023336.75-390.470734126984-208.279265873016
10341373467.344742063493367.125100.219742063492669.655257936509
10435153692.535218253973371.45833333333321.076884920635-177.535218253968
10537853338.130456349213386.625-48.4945436507935446.869543650795
10636323550.591765873023432.375118.21676587301681.4082341269846
10745044292.103670634923465.875826.22867063492211.89632936508
10844514758.1989087301634861272.19890873016-307.198908730159
10925502534.222718253973458.33333333333-924.11061507936515.7772817460318
11028672947.752480158733405.875-458.12251984127-80.7524801587301
11134583226.547123015873376.54166666667-149.994543650794231.452876984127
11229612992.609623015873365.66666666667-373.057043650794-31.6096230158728
11331633069.892361111113363.58333333333-293.69097222222293.1076388888896
11428803011.445932539683401.91666666667-390.470734126984-131.445932539682
11533313542.719742063493442.5100.219742063492-211.719742063492
11630623762.201884920643441.125321.076884920635-700.201884920635
11735343392.755456349213441.25-48.4945436507935141.244543650793
11836223566.841765873023448.625118.21676587301655.1582341269841
11944644285.812003968253459.58333333333826.22867063492178.187996031746
12054114739.907242063493467.708333333331272.19890873016671.092757936507
12125642545.597718253973469.70833333333-924.11061507936518.4022817460318
12228203025.960813492063484.08333333333-458.12251984127-205.960813492064
12335083351.838789682543501.83333333333-149.994543650794156.161210317461
12430883126.401289682543499.45833333333-373.057043650794-38.4012896825388
12532993187.934027777783481.625-293.690972222222111.065972222222
12629393056.570932539683447.04166666667-390.470734126984-117.570932539683
12733203510.511408730163410.29166666667100.219742063492-190.511408730159
12834183734.99355158733413.91666666667321.076884920635-316.993551587302
12936043362.255456349213410.75-48.4945436507935241.744543650795
13034953479.841765873023361.625118.21676587301615.1582341269846
13141634135.562003968253309.33333333333826.2286706349227.437996031746
13248824569.573908730163297.3751272.19890873016312.426091269841
13322112412.847718253973336.95833333333-924.110615079365-201.847718253969
13432602901.419146825403359.54166666667-458.12251984127358.580853174603
13529923193.963789682543343.95833333333-149.994543650794-201.963789682539
13624252963.276289682543336.33333333333-373.057043650794-538.276289682539
13727073040.392361111113334.08333333333-293.690972222222-333.392361111111
13832442938.612599206353329.08333333333-390.470734126984305.387400793651
13939653431.928075396833331.70833333333100.219742063492533.071924603174
14033153641.660218253973320.58333333333321.076884920635-326.660218253969
14133333283.463789682543331.95833333333-48.494543650793549.5362103174602
14235833500.341765873023382.125118.21676587301682.6582341269841
14340214248.978670634923422.75826.22867063492-227.97867063492
14449044688.240575396833416.041666666671272.19890873016215.759424603174
14522522453.80605158733377.91666666667-924.110615079365-201.806051587302
14629522893.752480158733351.875-458.1225198412758.2475198412694
14735733198.630456349213348.625-149.994543650794374.369543650794
14830482977.234623015873350.29166666667-373.05704365079470.7653769841277
14930593064.184027777783357.875-293.690972222222-5.18402777777737
15027312984.570932539683375.04166666667-390.470734126984-253.570932539682
15135633473.094742063493372.875100.21974206349289.905257936508
15230923699.576884920633378.5321.076884920635-607.576884920635
15334783331.963789682543380.45833333333-48.4945436507935146.036210317461
15434783514.300099206353396.08333333333118.216765873016-36.3000992063489
15543084252.187003968253425.95833333333826.2286706349255.812996031746
15650294705.240575396833433.041666666671272.19890873016323.759424603174
15720752516.18105158733440.29166666667-924.110615079365-441.181051587302
15832643052.29414682543510.41666666667-458.12251984127211.705853174603
15933083403.672123015873553.66666666667-149.994543650794-95.6721230158728
16036883165.776289682543538.83333333333-373.057043650794522.223710317461
16131363255.892361111113549.58333333333-293.690972222222-119.892361111111
16228243184.445932539683574.91666666667-390.470734126984-360.445932539682
16336443706.303075396833606.08333333333100.219742063492-62.3030753968255
16446943952.61855158733631.54166666667321.076884920635741.381448412698
16529143619.172123015873667.66666666667-48.4945436507935-705.172123015873
16636863805.300099206353687.08333333333118.216765873016-119.300099206349
16743584517.228670634923691826.22867063492-159.22867063492
16855874995.157242063493722.958333333331272.19890873016591.842757936508
16922652838.597718253973762.70833333333-924.110615079365-573.597718253968
17036853272.794146825403730.91666666667-458.12251984127412.205853174604
17137543592.713789682543742.70833333333-149.994543650794161.286210317461
17237083454.026289682543827.08333333333-373.057043650794253.97371031746
17332103593.642361111113887.33333333333-293.690972222222-383.642361111112
17435173532.945932539683923.41666666667-390.470734126984-15.9459325396829
17539054033.636408730163933.41666666667100.219742063492-128.636408730159
17636704264.326884920643943.25321.076884920635-594.326884920635
17742213913.380456349213961.875-48.4945436507935307.619543650793
17844044106.216765873023988118.216765873016297.783234126984
17950864857.603670634924031.375826.22867063492228.396329365080
18057255369.1989087301640971272.19890873016355.801091269841
1812367NA4148.375NANA
1823819NANANANA
1834067NANANANA
1844022NANANANA
1853937NANANANA
1864365NANANANA
1874290NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275831275awp5ncgruacfsvj/1xoie1275831133.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275831275awp5ncgruacfsvj/1xoie1275831133.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275831275awp5ncgruacfsvj/28xzz1275831133.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275831275awp5ncgruacfsvj/28xzz1275831133.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275831275awp5ncgruacfsvj/38xzz1275831133.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275831275awp5ncgruacfsvj/38xzz1275831133.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Jun/06/t1275831275awp5ncgruacfsvj/41oyk1275831133.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Jun/06/t1275831275awp5ncgruacfsvj/41oyk1275831133.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