Home » date » 2010 » Dec » 16 »

*The author of this computation has been verified*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 16 Dec 2010 11:48:05 +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/Dec/16/t1292499960k5pjsgdqtzqe2am.htm/, Retrieved Thu, 16 Dec 2010 12:46:05 +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/2010/Dec/16/t1292499960k5pjsgdqtzqe2am.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:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1856 1834 2095 2164 2368 2072 2521 1823 1947 2226 1754 1786 2072 1846 2137 2466 2154 2289 2628 2074 2798 2194 2442 2565 2063 2069 2539 1898 2139 2408 2725 2201 2311 2548 2276 2351 2280 2057 2479 2379 2295 2456 2546 2844 2260 2981 2678 3440 2842 2450 2669 2570 2540 2318 2930 2947 2799 2695 2498 2260 2160 2058 2533 2150 2172 2155 3016 2333 2355 2825 2214 2360 2299 1746 2069 2267 1878 2266 2282 2085 2277 2251 1828 1954 1851 1570 1852 2187 1855 2218 2253 2028 2169 1997 2034 1791 1627 1631 2319 1707 1747 2397 2059 2251 2558 2406 2049 2074 1734
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
11856NANA-120.073350694444NA
21834NANA-340.771267361111NA
32095NANA50.0672743055555NA
42164NANA-75.677517361111NA
52368NANA-183.651475694445NA
62072NANA29.1870659722222NA
725212317.114149305562046.16666666667270.947482638889203.885850694445
818232157.681857638892055.66666666667102.015190972222-334.681857638889
919472128.791232638892057.9166666666770.8745659722223-181.791232638889
1022262226.598524305562072.25154.348524305556-0.598524305555202
1117542079.296440972222075.916666666673.37977430555571-325.296440972222
1217862115.395399305562076.0416666666739.3537326388888-329.395399305555
1320721969.468315972222089.54166666667-120.073350694444102.531684027778
1418461763.687065972222104.45833333333-340.77126736111182.3129340277778
1521372200.442274305562150.37550.0672743055555-63.4422743055557
1624662108.822482638892184.5-75.677517361111357.177517361111
1721542028.181857638892211.83333333333-183.651475694445125.818142361111
1822892302.145399305562272.9583333333329.1870659722222-13.1453993055552
1926282575.989149305562305.04166666667270.94748263888952.0108506944443
2020742415.973524305562313.95833333333102.015190972222-341.973524305555
2127982410.87456597222234070.8745659722223387.125434027778
2221942487.431857638892333.08333333333154.348524305556-293.431857638889
2324422312.171440972222308.791666666673.37977430555571129.828559027778
2425652352.478732638892313.12539.3537326388888212.521267361111
2520632202.051649305562322.125-120.073350694444-139.051649305556
2620691990.687065972222331.45833333333-340.77126736111178.3129340277783
2725392366.525607638892316.4583333333350.0672743055555172.474392361111
2818982235.239149305562310.91666666667-75.677517361111-337.239149305556
2921392135.098524305562318.75-183.6514756944453.9014756944448
3024082332.103732638892302.9166666666729.187065972222275.8962673611113
3127252573.989149305562303.04166666667270.947482638889151.010850694445
3222012413.598524305562311.58333333333102.015190972222-212.598524305556
3323112379.457899305562308.5833333333370.8745659722223-68.4578993055552
3425482480.473524305562326.125154.34852430555667.5264756944443
3522762356.046440972222352.666666666673.37977430555571-80.0464409722222
3623512400.520399305562361.1666666666739.3537326388888-49.5203993055557
3722802235.634982638892355.70833333333-120.07335069444444.3650173611113
3820572034.270399305562375.04166666667-340.77126736111122.7296006944443
3924792449.775607638892399.7083333333350.067274305555529.2243923611109
4023792339.947482638892415.625-75.67751736111139.0525173611113
4122952266.765190972222450.41666666667-183.65147569444528.2348090277783
4224562541.728732638892512.5416666666729.1870659722222-85.7287326388891
4325462852.280815972222581.33333333333270.947482638889-306.280815972222
4428442723.140190972222621.125102.015190972222120.859809027778
4522602716.291232638892645.4166666666770.8745659722223-456.291232638889
4629812815.640190972222661.29166666667154.348524305556165.359809027778
4726782682.838107638892679.458333333333.37977430555571-4.83810763888869
4834402723.270399305562683.9166666666739.3537326388888716.729600694444
4928422574.093315972222694.16666666667-120.073350694444267.906684027777
5024502373.687065972222714.45833333333-340.77126736111176.3129340277783
5126692791.275607638892741.2083333333350.0672743055555-122.275607638889
5225702676.072482638892751.75-75.677517361111-106.072482638889
5325402548.681857638892732.33333333333-183.651475694445-8.68185763888914
5423182704.853732638892675.6666666666729.1870659722222-386.853732638889
5529302869.030815972222598.08333333333270.94748263888960.9691840277783
5629472655.348524305562553.33333333333102.015190972222291.651475694444
5727992602.207899305562531.3333333333370.8745659722223196.792100694444
5826952662.515190972222508.16666666667154.34852430555632.4848090277778
5924982478.713107638892475.333333333333.3797743055557119.2868923611113
6022602492.562065972222453.2083333333339.3537326388888-232.562065972222
6121602329.926649305562450-120.073350694444-169.926649305556
6220582087.228732638892428-340.771267361111-29.2287326388887
6325332433.983940972222383.9166666666750.067274305555599.0160590277778
6421502295.155815972222370.83333333333-75.677517361111-145.155815972222
6521722180.765190972222364.41666666667-183.651475694445-8.76519097222217
6621552385.937065972222356.7529.1870659722222-230.937065972222
6730162637.655815972222366.70833333333270.947482638889378.344184027778
6823332461.515190972222359.5102.015190972222-128.515190972222
6923552398.041232638892327.1666666666770.8745659722223-43.0412326388887
7028252467.056857638892312.70833333333154.348524305556357.943142361111
7122142308.713107638892305.333333333333.37977430555571-94.7131076388887
7223602337.062065972222297.7083333333339.353732638888822.9379340277778
7322992151.676649305562271.75-120.073350694444147.323350694444
7417461890.062065972222230.83333333333-340.771267361111-144.062065972222
7520692267.317274305562217.2550.0672743055555-198.317274305556
7622672114.405815972222190.08333333333-75.677517361111152.594184027777
7718781966.431857638892150.08333333333-183.651475694445-88.4318576388887
7822662146.270399305562117.0833333333329.1870659722222119.729600694444
7922822352.447482638892081.5270.947482638889-70.4474826388889
8020852157.515190972222055.5102.015190972222-72.5151909722222
8122772109.999565972222039.12570.8745659722223167.000434027778
8222512181.098524305562026.75154.34852430555669.9014756944446
8318282025.838107638892022.458333333333.37977430555571-197.838107638889
8419542058.853732638892019.539.3537326388888-104.853732638888
8518511896.218315972222016.29166666667-120.073350694444-45.2183159722217
8615701671.937065972222012.70833333333-340.771267361111-101.937065972222
8718522055.900607638892005.8333333333350.0672743055555-203.900607638888
8821871915.072482638891990.75-75.677517361111271.927517361111
8918551805.098524305561988.75-183.65147569444549.9014756944448
9022182019.728732638891990.5416666666729.1870659722222198.271267361111
9122532245.364149305561974.41666666667270.9474826388897.6358506944448
9220282069.640190972221967.625102.015190972222-41.6401909722219
9321692060.499565972221989.62570.8745659722223108.500434027778
9419972143.431857638891989.08333333333154.348524305556-146.431857638889
9520341967.963107638891964.583333333333.3797743055557166.0368923611111
9617912006.895399305561967.5416666666739.3537326388888-215.895399305555
9716271846.843315972221966.91666666667-120.073350694444-219.843315972222
9816311627.353732638891968.125-340.7712673611113.64626736111131
9923192043.692274305561993.62550.0672743055555275.307725694444
10017071951.197482638892026.875-75.677517361111-244.197482638889
10117471860.890190972222044.54166666667-183.651475694445-113.890190972222
10223972086.145399305562056.9583333333329.1870659722222310.854600694445
10320592344.155815972222073.20833333333270.947482638889-285.155815972222
1042251NANA102.015190972222NA
1052558NANA70.8745659722223NA
1062406NANA154.348524305556NA
1072049NANA3.37977430555571NA
1082074NANA39.3537326388888NA
1091734NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292499960k5pjsgdqtzqe2am/195qu1292500081.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292499960k5pjsgdqtzqe2am/195qu1292500081.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292499960k5pjsgdqtzqe2am/295qu1292500081.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292499960k5pjsgdqtzqe2am/295qu1292500081.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292499960k5pjsgdqtzqe2am/395qu1292500081.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292499960k5pjsgdqtzqe2am/395qu1292500081.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/16/t1292499960k5pjsgdqtzqe2am/4kwpf1292500081.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/16/t1292499960k5pjsgdqtzqe2am/4kwpf1292500081.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