Home » date » 2009 » Jan » 27 »

Robbe Leys_2MAR03A_opgave 9_ verb3

*Unverified author*
R Software Module: rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 27 Jan 2009 10:40:55 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Jan/27/t12330781057pcdt5ntd54xzjj.htm/, Retrieved Tue, 27 Jan 2009 18:41:45 +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/2009/Jan/27/t12330781057pcdt5ntd54xzjj.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 «
284.4 212.8 226.9 308.4 262 227.9 236.1 320.4 271.9 232.8 237 313.4 261.4 226.8 249.9 314.3 286.1 226.5 260.4 311.4 294.7 232.6 257.2 339.2 279.1 249.8 269.8 345.7 293.8 254.7 277.5 363.4 313.4 272.8 300.1 369.5 330.8 287.8 305.9 386.1 335.2 288 308.3 402.3 352.8 316.1 324.9 404.8 393 318.9 327 442.3 383.1 331.6 361.4 445.9 386.6 357.2 373.6 466.2 409.6 369.8 378.6 487 419.2 376.7 392.8 506.1 458.4 387.4 426.9 565 464.8 444.5 449.5 556.1 499.6 451.9 434.9 553.8 510 432.9 453.2 547.6 485.8 452.6 456.6 565.7 514.8 464.3 430.9 588.3 503.1 442.6 448 554.5 504.5 427.3 473.1 526.2 547.5 440.2 468.7 574.5 492.6 432.6 479.8 575.7 474.6 405.3 434.6 535.1 452.6 429.5 417.2 551.8 464 416.6 422.9 553.6 458.6 427.6 429.2 534.2 481.7 416 440.2 538.7 473.8 439.9 446.8 597.5 467.2 439.4 447.4 568.5 485.9 442.1 430.5 600 464.5 423.6 437 574 443 410 420 532 432 420 411 512
 
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
1284.4NANA1.01280706844039NA
2212.8NANA0.890923911627435NA
3226.9235.796203965292255.3250.923513968335620.962271640443365
4308.4298.363544564308254.41251.172755051596551.03363834361986
5262260.747179769979257.451.012807068440391.00480473166048
6227.9231.729309414296260.10.8909239116274350.98347507519021
7236.1242.734102652413262.83750.923513968335620.97266925998481
8320.4310.413602719462264.68751.172755051596551.03217126180376
9271.9268.811656052436265.41251.012807068440391.01148887660943
10232.8235.783013212201264.650.8909239116274350.987348481251633
11237242.387784914288262.46250.923513968335620.977772044427929
12313.4305.385415435742260.41.172755051596551.02624416281577
13261.4264.608506718408261.26251.012807068440390.987874514095563
14226.8234.30185220912262.98750.8909239116274350.96798210454425
15249.9245.827874446338266.18750.923513968335621.01656494635864
16314.3315.749638204227269.23751.172755051596550.99540889987247
17286.1273.976972101482270.51251.012807068440391.04424834614943
18226.5241.852432360163271.46250.8909239116274350.936521488701424
19260.4251.357414331747272.1750.923513968335621.03597501069261
20311.4321.3495435756274.01251.172755051596550.969038252038906
21294.7277.888939403333274.3751.012807068440391.06049560890319
22232.6247.186839281032277.450.8909239116274350.940988608764693
23257.2257.637309316430278.9750.923513968335620.99830261650539
24339.2327.403891529467279.1751.172755051596551.03602922499005
25279.1286.523119661787282.91.012807068440390.974092423429742
26249.8254.169455438412285.28750.8909239116274350.982808888539045
27269.8265.914303257638287.93750.923513968335621.01461259020203
28345.7340.553407545494290.38751.172755051596551.01511243857931
29293.8295.701683719528291.96251.012807068440390.993568911425841
30254.7262.945055967942295.13750.8909239116274350.968643426522735
31277.5276.869487707019299.80.923513968335621.00227729064045
32363.4357.118572649295304.51251.172755051596551.01758919258695
33313.4313.565068389146309.61.012807068440390.999473575325232
34272.8279.026232572817313.18750.8909239116274350.977685852274866
35300.1291.945853240098316.1250.923513968335621.02793033937425
36369.5375.486848644926320.1751.172755051596550.984055770084806
37330.8326.908801515848322.7751.012807068440391.01190300923716
38287.8290.062552528102325.5750.8909239116274350.992199777226041
39305.9303.097284407750328.20.923513968335621.00924691752922
40386.1385.572542088656328.7751.172755051596551.00136798618617
41335.2333.314806223733329.11.012807068440391.00565589569100
42288295.274457411123331.4250.8909239116274350.975363743024361
43308.3309.977463471851335.650.923513968335620.994588434097555
44402.3400.334596300628341.36251.172755051596551.00490940257858
45352.8351.393412395394346.951.012807068440391.00400288552656
46316.1311.233131978149349.33750.8909239116274351.01563737122368
47324.9327.547316719436354.6750.923513968335620.991917757880143
48404.8422.250456327339360.051.172755051596550.958672735420774
49393365.281529321383360.66251.012807068440391.07588248639375
50318.9325.732918639886365.61250.8909239116274350.979022941038883
51327340.834373938865369.06250.923513968335620.959410273737982
52442.3433.230375497911369.41251.172755051596551.02093487671926
53383.1380.106492785679375.31.012807068440391.00787544351685
54331.6338.595632614007380.050.8909239116274350.979339270976417
55361.4351.80110231285380.93750.923513968335621.02728501310554
56445.9451.012273967744384.5751.172755051596550.988664889487886
57386.6394.285791743845389.31.012807068440390.980507053754455
58357.2350.456057187547393.36250.8909239116274351.01924333357675
59373.6368.274282723037398.7750.923513968335621.01446127934208
60466.2472.88415568002403.2251.172755051596550.985865130815373
61409.6410.617305722446405.4251.012807068440390.99752249671831
62369.8364.076056486551408.650.8909239116274351.01572183452185
63378.6380.903336240026412.450.923513968335620.993952963860167
64487486.121628324916414.51251.172755051596551.00180689692436
65419.2422.49246859991417.151.012807068440390.992207035995646
66376.7375.357380517534421.31250.8909239116274351.00357690977227
67392.8395.818086828647428.60.923513968335620.992375065897499
68506.1509.957874748616434.83751.172755051596550.992434914843667
69458.4446.078213206215440.43751.012807068440391.02762248060765
70387.4402.753290800077452.06250.8909239116274350.961879167344411
71426.9425.024216077261460.2250.923513968335621.00441335776124
72565549.039936843071468.16251.172755051596551.02906903867267
73464.8484.248379598063478.1251.012807068440390.959838007895441
74444.5427.498702445530479.83750.8909239116274351.03976923779467
75449.5446.126510253730483.0750.923513968335621.00756173342927
76556.1572.714929447176488.351.172755051596550.970989180492965
77499.6493.692805511269487.451.012807068440391.01196532423156
78451.9432.39878395948485.33750.8909239116274351.04510007142469
79434.9449.151018500029486.350.923513968335620.968271209653223
80553.8569.108707663517485.2751.172755051596550.97310055626039
81510491.401329518923485.18751.012807068440391.03784822987615
82432.9433.612667789073486.70.8909239116274350.998356441492573
83453.2445.964895309271482.90.923513968335621.01622348477835
84547.6565.663739699452482.33751.172755051596550.968066293750684
85485.8491.439309783989485.2251.012807068440390.988524911068941
86452.6434.692913031921487.91250.8909239116274351.04119479851461
87456.6456.031197564129493.80.923513968335621.00124728842875
88565.7585.072835803375498.88751.172755051596550.966888163972314
89514.8503.504373986786497.13751.012807068440391.02243401765068
90464.3442.566453100929496.750.8909239116274351.04910798535856
91430.9460.013851552576498.11250.923513968335620.9367109241291
92588.3579.267698297972493.93751.172755051596551.01559262104303
93503.1499.681027303423493.36251.012807068440391.00684231041356
94442.6437.688644684768491.2750.8909239116274351.01122111659709
95448449.959093222322487.2250.923513968335620.995646063715942
96554.5569.357918111981485.48751.172755051596550.973904081001893
97504.5492.945860298295486.71251.012807068440391.02343896284009
98427.3433.267434773317486.31250.8909239116274350.986226902152387
99473.1450.813343643033488.150.923513968335621.04943654989639
100526.2580.675004359888495.13751.172755051596550.906186758598403
101547.5502.554867360123496.21.012807068440391.08943328491866
102440.2446.965389914589501.68750.8909239116274350.98486372755644
103468.7462.553514965499500.86250.923513968335621.01328815982505
104574.5578.22687818968493.051.172755051596550.99355464380807
105492.6499.807628186978493.48751.012807068440390.985579195313358
106432.6441.029609353371495.0250.8909239116274350.980886522866956
107479.8455.223122841835492.9250.923513968335621.05398863969110
108575.7571.439558328565487.26251.172755051596551.00745562957506
109474.6484.324340128196478.21.012807068440390.979921843024404
110405.3416.484655588035467.4750.8909239116274350.973145095652459
111434.6424.493195545468459.650.923513968335621.02380910827450
112535.1539.379367105544459.9251.172755051596550.992066127541162
113452.6466.676176960622460.7751.012807068440390.96983737834595
114429.5410.437509537864460.68750.8909239116274351.04644431860918
115417.2428.695184101395464.20.923513968335620.973185646753905
116551.8544.173003378945464.01251.172755051596551.01401575707302
117464469.043613483101463.11251.012807068440390.989247026634373
118416.6413.433241190711464.050.8909239116274351.00765966181183
119422.9428.141075720393463.60.923513968335620.987758530966517
120553.6544.510170456279464.31.172755051596551.01669359001339
121458.6472.436517162377466.46251.012807068440390.970712430856354
122427.6414.123707222223464.8250.8909239116274351.03254170805185
123429.2429.69950554196465.28750.923513968335620.998837546854215
124534.2547.354101456401466.7251.172755051596550.975967839792558
125481.7472.626418487709466.651.012807068440391.01919821058951
126416417.475808439721468.58750.8909239116274350.996464924649798
127440.2432.354608200925468.16250.923513968335621.01814573419657
128538.7551.385446946264470.16251.172755051596550.97699350424187
129473.8480.045230264035473.9751.012807068440390.986990329514159
130439.9429.558963991168482.150.8909239116274351.02407361241574
131446.8451.298188476409488.6750.923513968335620.990032779675906
132597.5572.055254730653487.78751.172755051596551.04447952371546
133467.2494.047287985223487.81.012807068440390.945658465013117
134439.4431.429904205586484.250.8909239116274351.01847367490459
135447.4446.022614932292482.96250.923513968335621.00308815073854
136568.5569.533831369721485.63751.172755051596550.998184776192778
137485.9490.059360153239483.86251.012807068440390.991512538089388
138442.1432.71060732855485.68750.8909239116274351.02169901202427
139430.5449.70512688103486.950.923513968335620.957293956121361
140600565.223956555103481.96251.172755051596551.06152613144150
141464.5486.615816120542480.46251.012807068440390.954551793452057
142423.6425.883902855705478.0250.8909239116274350.994637264192447
143437435.979400526642472.08750.923513968335621.00234093508116
144574548.497537631707467.71.172755051596551.04649512644743
145443469.815878872787463.8751.012807068440390.94292257865544
146410406.706765657924456.50.8909239116274351.00809731880597
147420415.465846504987449.8750.923513968335621.01091342052098
148532527.446584455549449.751.172755051596551.00863294156915
149432455.636579914622449.8751.012807068440390.948124051148284
150420397.574795563743446.250.8909239116274351.05640499520212
151411NANA0.92351396833562NA
152512NANA1.17275505159655NA
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t12330781057pcdt5ntd54xzjj/14kaa1233078049.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t12330781057pcdt5ntd54xzjj/14kaa1233078049.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t12330781057pcdt5ntd54xzjj/2inbi1233078049.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t12330781057pcdt5ntd54xzjj/2inbi1233078049.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t12330781057pcdt5ntd54xzjj/3z0a81233078049.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t12330781057pcdt5ntd54xzjj/3z0a81233078049.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t12330781057pcdt5ntd54xzjj/40iga1233078049.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2009/Jan/27/t12330781057pcdt5ntd54xzjj/40iga1233078049.ps (open in new window)


 
Parameters (Session):
par1 = multiplicative ; par2 = 4 ;
 
Parameters (R input):
par1 = multiplicative ; par2 = 4 ;
 
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