Home » date » 2010 » May » 29 »

Opgave 9 Oefening 2

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Sat, 29 May 2010 16:59:25 +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/29/t1275152428svo3fall0h6uiq1.htm/, Retrieved Sat, 29 May 2010 19:00:28 +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/29/t1275152428svo3fall0h6uiq1.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 «
22577.0 22792.0 23932.0 22321.0 21102.0 22824.0 23129.0 23604.0 24746.0 26911.0 27909.0 28922.0 29800.0 30506.0 30771.0 31976.0 33749.0 34371.0 33246.0 35072.0 35762.0 36179.0 37433.0 38298.0 37559.0 37511.0 39364.0 40084.0 42712.0 41938.0 40799.0 38568.0 41134.0 43955.0 43607.0 45082.0 46464.0 46496.0 46774.0 47890.0 45740.0 42660.0 39190.0 39010.0 41150.0 42530.0 44710.0 46620.0 44560.0 46120.0 48060.0 51970.0 57720.0 63490.0 65370.0 64260.0 58700.0 58630.0 59803.0 59266.0 60570.0 63062.0 63846.0 64726.0 63460.0 65220.0 66659.0 66871.0 65672.0 67182.0 68292.0 68318.0 69530.0 70500.0 72044.0 73811.0 76018.0 77818.0 79455.0 81408.0 81815.0
 
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'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
122577NANA0.990463704266789NA
222792NANA0.99267095171111NA
323932NANA0.99949955870283NA
422321NANA1.01850702746857NA
521102NANA1.03515696144163NA
622824NANA1.03236886858370NA
72312924556.235746447924531.70833333331.000999824911550.941878887253543
82360424724.730192126925154.08333333330.9829310758210970.95467169172654
92474625056.717414544925760.45833333330.972681351019370.987599436534153
102691126048.993972458426447.70833333330.9849244268785131.03309172048844
112790927187.551834162227376.95833333330.9930815360543361.02653597389859
122892228291.788662273128385.04166666670.9967147131405091.02227541514784
132980029008.412085318629287.70833333330.9904637042667891.02728821944315
143050629965.840741882630187.08333333330.992670951711111.01802583357397
153077131108.34097343731123.91666666670.999499558702830.98915593172503
163197632560.736036728531969.08333333331.018507027468570.98204168247091
173374933903.547064216332752.08333333331.035156961441630.995441566514456
183437134625.221698601933539.58333333331.032368868583700.99265790409041
193324634287.789210933834253.54166666671.000999824911550.96961632012712
203507234273.536994575434868.70833333330.9829310758210971.02329677866486
213576234548.304151350435518.6250.972681351019371.03513040302449
223617935668.545657191936214.50.9849244268785131.01431105006955
233743336670.321908355836925.79166666670.9930815360543361.02079823824700
243829837490.967107203437614.54166666670.9967147131405091.02152606227759
253755937879.830407152238244.54166666670.9904637042667890.991530310360322
263751138421.246463399238704.91666666670.992670951711110.976308773213115
273936439054.862214903839074.41666666670.999499558702831.00791547498990
284008440355.540069116739622.251.018507027468570.993271306277858
294271241616.932899318440203.51.035156961441631.02631301790862
304193842062.234966400840743.41666666671.032368868583700.997046401207639
314079941438.514876841541397.1251.000999824911550.98456713811433
323856841423.213818252142142.54166666670.9829310758210970.931072131902185
334113441655.727311638542825.66666666670.972681351019370.987475256217822
344395542804.487283997943459.66666666670.9849244268785131.02687832021836
354360743607.286086476643911.08333333330.9930815360543360.999993439479906
364508243922.559502200544067.33333333330.9967147131405091.02639738009215
374646443610.488322755844030.3750.9904637042667891.06543177540517
384649643659.405630420143981.750.992670951711111.06497097998978
394677443978.813499223444000.83333333330.999499558702831.06355756961988
404789044755.363114402543942.1251.018507027468571.07003935768736
414574045473.108238388843928.70833333331.035156961441631.00586922187531
424266045464.234511340344038.751.032368868583700.938319988415492
433919044067.515791993644023.51.000999824911550.889317205557574
443901043178.687764207143928.50.9829310758210970.903454968641667
454115042765.313562813943966.41666666670.972681351019370.96222841765345
464253043523.8104237615441900.9849244268785130.97716628176427
474471044548.810139450844859.16666666670.9930815360543361.00361827532643
484662046074.383508311446226.250.9967147131405091.01184207905007
494456047725.4935900952481850.9904637042667890.933672899912089
504612049959.060935137450327.91666666670.992670951711110.923155862754872
514806052085.171378452952111.250.999499558702830.922719436800816
525197054503.706063268353513.33333333331.018507027468570.953513141650823
535772056740.101659039954813.04166666671.035156961441631.01726994334357
546349057780.481144282855968.83333333331.032368868583701.09881397216925
556537057219.986158114857162.83333333331.000999824911551.14243299219550
566426057536.689632417858535.83333333330.9829310758210971.11685257547028
575870058263.126585384859899.50.972681351019371.00749828305172
585863060167.802082474861088.750.9849244268785130.974441444938161
595980361431.444522758661859.41666666670.9930815360543360.973491677830313
605926661966.418192420862170.66666666670.9967147131405090.956421263787825
616057061702.38088353562296.45833333330.9904637042667890.981647695480789
626306262001.193611634662458.95833333330.992670951711111.01710945106977
636384662826.793135832262858.250.999499558702831.01622248746589
646472664680.373654977463505.08333333331.018507027468571.00070541251456
656346066472.733673594264215.1251.035156961441630.954677150959552
666522067048.2285390367649461.032368868583700.972732634718719
676665965762.184997301665696.51.000999824911551.01363724460699
686687165246.719080235566379.750.9829310758210971.02489444592252
696567265200.046810517267031.250.972681351019371.00723854065403
706718266729.984192106267751.3750.9849244268785131.00677380361117
716829268178.192208327768653.16666666670.9930815360543361.00166926971787
726831869472.344458844369701.33333333330.9967147131405090.983384115393887
7369530NA70759.4166666666NANA
7470500NA71898.2916666667NANA
7572044NA73176.625NANA
7673811NANANANA
7776018NANANANA
7877818NANANANA
7979455NANANANA
8081408NANANANA
8181815NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/29/t1275152428svo3fall0h6uiq1/1v18l1275152362.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/29/t1275152428svo3fall0h6uiq1/1v18l1275152362.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/29/t1275152428svo3fall0h6uiq1/2v18l1275152362.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/29/t1275152428svo3fall0h6uiq1/2v18l1275152362.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/29/t1275152428svo3fall0h6uiq1/3ns761275152362.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/29/t1275152428svo3fall0h6uiq1/3ns761275152362.ps (open in new window)


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