Home » date » 2011 » May » 18 »

opgave 10.1

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Wed, 18 May 2011 11:47:38 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/18/t1305719484qxo9w46r4xo2v1i.htm/, Retrieved Wed, 18 May 2011 13:51:28 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W101
 
Dataseries X:
» Textbox « » Textfile « » CSV «
814 1150 1225 1691 1759 1754 2100 2062 2012 1897 1964 2186 966 1549 1538 1612 2078 2137 2907 2249 1883 1739 1828 1868 1138 1430 1809 1763 2200 2067 2503 2141 2103 1972 2181 2344 970 1199 1718 1683 2025 2051 2439 2353 2230 1852 2147 2286 1007 1665 1642 1518 1831 2207 2822 2393 2306 1785 2047 2171 1212 1335 2011 1860 1954 2152 2835 2224 2182 1992 2389 2724 891 1247 2017 2257 2255 2255 3057 3330 1896 2096 2374 2535 1041 1728 2201 2455 2204 2660 3670 2665 2639 2226 2586 2684 1185 1749 2459 2618 2585 3310 3923
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ www.wessa.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
1814NANA0.51723341036936NA
21150NANA0.71994479119866NA
31225NANA0.910429225840974NA
41691NANA0.918464905236503NA
51759NANA1.02317800979132NA
61754NANA1.0852626663327NA
721002426.84789086881724.166666666671.407548317565280.865319993025276
820622108.196748298811747.1251.206666236416290.97808707923675
920121884.389048916021776.791666666671.060557117791541.06772006617072
1018971686.787999128341786.541666666670.9441638169433531.12462265618459
1119641920.602487859321796.541666666671.06905535423671.0225957804465
1221862076.830988390171825.791666666671.137496148277321.05256518812561
13966970.006606971441875.3750.517233410369360.995869505483114
1415491379.984176229671916.791666666670.719944791198661.12247663899459
1515381747.303357144211919.208333333330.9104292258409740.880213497966205
1616121751.742190512321907.250.9184649052365030.920226736976945
1720781938.9223285545518951.023178009791321.07172936708049
1821372036.043200595661876.083333333331.08526266633271.04958480221579
1929072632.1153538470718701.407548317565281.10443487811093
2022492259.130583370551872.208333333331.206666236416290.995515715893042
2118831992.300735651311878.541666666671.060557117791540.945138435329854
2217391790.252617401711896.1250.9441638169433530.971371293132865
2318282039.22308820651907.51.06905535423670.896419823104165
2418682172.238477826931909.666666666671.137496148277320.859942413813015
251138977.5280428138931889.916666666670.517233410369361.16416097560145
2614301345.276837753961868.583333333330.719944791198661.06297823605399
2718091705.46154730661873.250.9104292258409741.06070993090223
2817631737.850408820621892.1250.9184649052365031.01447166629057
2922001960.963288182141916.541666666671.023178009791321.12189759658349
3020672117.437900570621951.083333333331.08526266633270.97617974980186
3125032764.307600005081963.916666666671.407548317565280.905470867278084
3221412349.731106621481947.291666666671.206666236416290.911168088113028
3321032050.984896169111933.8751.060557117791541.02536103699644
3419721819.16763429561926.750.9441638169433531.08401224979114
3521812048.443690636791916.1251.06905535423671.06471074111976
3623442170.532233604511908.166666666671.137496148277321.07991946109338
37970985.2434411852361904.833333333330.517233410369360.984528249011332
3811991375.8144959806419110.719944791198660.871483767254093
3917181752.690063397111925.1250.9104292258409740.980207531199288
4016831768.427636290781925.416666666670.9184649052365030.95169288551158
4120251963.4786007895419191.023178009791321.03133285954108
4220512078.458883138171915.166666666671.08526266633270.986788825431703
4324392694.45801474591914.291666666671.407548317565280.905191317382619
4423532335.200834024631935.251.206666236416291.00762211357414
4522302069.677215370191951.51.060557117791541.0774626997095
4618521833.054710436481941.458333333330.9441638169433531.01033536503611
4721472059.5351399371926.51.06905535423671.04246825332909
4822862189.585294088161924.916666666671.137496148277321.04403331816859
4910071007.247412518031947.3750.517233410369360.999754367680713
5016651414.6915147053719650.719944791198661.17693502978758
5116421793.393836702411969.833333333330.9104292258409740.915582493034109
5215181809.567210171171970.208333333330.9184649052365030.838874616796582
5318312008.754227722811963.251.023178009791320.91151021599874
5422072120.919784958431954.291666666671.08526266633271.04058626622848
5528222756.038253639381958.041666666671.407548317565281.02393353803182
5623932356.418048681621952.833333333331.206666236416291.01552438937516
5723062072.814696843651954.458333333331.060557117791541.11249693641763
5817851873.299693133691984.083333333330.9441638169433530.95286408605236
5920472141.807858240132003.458333333331.06905535423670.955734657581268
6021712282.149043154232006.291666666671.137496148277320.951296325939955
6112121036.815922477482004.541666666670.517233410369361.16896352932535
6213351438.479690514561998.041666666670.719944791198660.92806315501226
6320111807.960704315871985.833333333330.9104292258409741.11230293623055
6418601827.094582112771989.291666666670.9184649052365031.01800969594534
6519542058.804685368432012.166666666671.023178009791320.949094401176924
6621522224.200615371092049.458333333331.08526266633270.967538622697913
6728352898.317929406612059.1251.407548317565280.97815355977197
6822242464.113010281772042.083333333331.206666236416290.902556007261082
6921822162.122444137682038.666666666671.060557117791541.00919353846782
7019921940.689385568022055.458333333330.9441638169433531.02643937500434
7123892228.490429879492084.541666666671.06905535423671.07202614288507
7227242390.305968586262101.3751.137496148277321.13960306161604
738911093.9055601472114.916666666670.517233410369360.814512726199387
7412471562.460183098892170.250.719944791198660.798100337844624
7520172006.965359264272204.416666666670.9104292258409741.00499990729257
7622572017.714319320392196.833333333330.9184649052365031.11859244809255
7722552251.545842962872200.541666666671.023178009791321.00153412689683
7822552378.940983879032192.041666666671.08526266633270.94790077403394
7930573083.117293933622190.416666666671.407548317565280.991528932750951
8033302674.827101815962216.708333333331.206666236416291.24494027959386
8118962380.332071123292244.416666666671.060557117791540.796527519416762
8220962134.124947564292260.333333333330.9441638169433530.98213555977226
8323742422.969416404382266.458333333331.06905535423670.97978950288318
8425352594.86569258482281.208333333331.137496148277320.97692917488721
8510411201.85648316952323.6250.517233410369360.866159990463006
8617281671.321835068062321.458333333330.719944791198661.03391217881721
8722012116.482408222732324.708333333330.9104292258409741.0399330471394
8824552168.572180005492361.083333333330.9184649052365031.13208129415078
8922042430.388832590982375.333333333331.023178009791320.906850776486808
9026602594.184746035022390.3751.08526266633271.02537030335468
9136703381.752128643722402.583333333331.407548317565281.08523625043799
9226652907.41201888522409.458333333331.206666236416290.916622749954046
9326392567.697161933132421.083333333331.060557117791541.02776917742635
9422262302.461488093482438.6250.9441638169433530.966791414975286
9525862631.257034588172461.291666666671.06905535423670.982800222861827
9626842848.574729323492504.251.137496148277320.94222558824617
971185NA2541.875NANA
981749NANANANA
992459NANANANA
1002618NANANANA
1012585NANANANA
1023310NANANANA
1033923NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/18/t1305719484qxo9w46r4xo2v1i/1xr931305719254.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305719484qxo9w46r4xo2v1i/1xr931305719254.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305719484qxo9w46r4xo2v1i/2w8281305719254.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305719484qxo9w46r4xo2v1i/2w8281305719254.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305719484qxo9w46r4xo2v1i/3ggqi1305719254.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305719484qxo9w46r4xo2v1i/3ggqi1305719254.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t1305719484qxo9w46r4xo2v1i/47ru71305719254.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t1305719484qxo9w46r4xo2v1i/47ru71305719254.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