Home » date » 2010 » May » 24 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Mon, 24 May 2010 19:22:10 +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/24/t1274728960pvo05cos5hkk1r3.htm/, Retrieved Mon, 24 May 2010 21:22:41 +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/24/t1274728960pvo05cos5hkk1r3.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 «
66857.2 64722.8 68489.6 71342.9 63542.5 69425.0 58927.9 61009.0 66837.0 66147.6 65982.3 65527.5 65914.6 59189.9 66211.4 66400.8 60167.7 64547.9 57706.2 58642.6 60082.1 63414.8 66044.0 57628.5 62838.8 55758.6 61004.5 66173.4 57489.0 59552.2 57061.8 55895.3 56314.7 61232.8 60014.1 57685.4 60403.1 52349.7 55693.3 65676.1 54898.8 55518.2 53779.1 52340.9 55704.4 60330.3 52837.4 55388.1 60383.4 52070.3 54077.0 62887.8 49212.8 57722.0 53936.8 46991.0 54984.2 56485.1 51277.8 53596.4 54252.5 49413.0 53213.2 58695.3 48723.5 54510.0 49454.1 46136.6 54622.5 50583.0 53224.3 53056.4
 
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'RServer@AstonUniversity' @ vre.aston.ac.uk


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
166857.2NANA2739.27465277778NA
264722.8NANA-4060.02034722222NA
368489.6NANA449.28381944444NA
471342.9NANA6607.57631944444NA
563542.5NANA-3024.72201388889NA
669425NANA1457.22048611111NA
758927.962558.037152777865695-3136.96284722222-3630.13715277777
86100961214.245486111165425.1875-4210.94201388889-205.245486111111
96683764952.387986111165099.725-147.3370138888921884.61201388888
1066147.667621.882152777864798.87916666672823.00298611112-1474.28215277779
1165982.365213.232986111164452.3416666667760.891319444445769.067013888889
1265527.563851.247152777864108.5125-257.2653472222241676.25284722223
1365914.666593.670486111163854.39583333332739.27465277778-679.070486111101
1459189.959644.871319444463704.8916666667-4060.02034722222-454.971319444441
1566211.463774.121319444463324.8375449.283819444442437.27868055555
1666400.869537.092986111162929.51666666676607.57631944444-3136.29298611111
1760167.759793.498819444462818.2208333333-3024.72201388889374.201180555552
1864547.963948.887152777862491.66666666671457.22048611111599.01284722222
1957706.258897.420486111162034.3833333333-3136.96284722222-1191.22048611112
2058642.657552.312152777861763.2541666667-4210.942013888891090.28784722222
2160082.161255.992152777861403.3291666667-147.337013888892-1173.89215277777
2263414.863999.902986111161176.92823.00298611112-585.102986111109
236604461816.703819444461055.8125760.8913194444454227.29618055555
2457628.560478.780486111160736.0458333333-257.265347222224-2850.2804861111
2562838.863240.316319444460501.04166666672739.27465277778-401.516319444432
2655758.656299.700486111160359.7208333333-4060.02034722222-541.100486111107
2761004.560537.558819444460088.275449.28381944444466.941180555572
2866173.466447.959652777859840.38333333336607.57631944444-274.559652777782
295748956473.498819444459498.2208333333-3024.722013888891015.50118055556
3059552.260706.566319444459249.34583333331457.22048611111-1154.36631944444
3157061.856013.266319444459150.2291666667-3136.962847222221048.53368055556
3255895.354695.762152777858906.7041666667-4210.942013888891199.53784722222
3356314.758396.029652777858543.3666666667-147.337013888892-2081.32965277777
3461232.861124.348819444458301.34583333332823.00298611112108.451180555559
3560014.158933.591319444558172.7760.8913194444451080.50868055555
3657685.457639.426319444457896.6916666667-257.26534722222445.9736805555585
3760403.160331.103819444457591.82916666672739.2746527777871.9961805555577
3852349.753246.929652777857306.95-4060.02034722222-897.229652777773
3955693.357582.704652777857133.4208333333449.28381944444-1889.40465277778
4065676.163677.963819444457070.38756607.576319444441998.13618055556
4154898.853709.032152777856733.7541666667-3024.722013888891189.76784722223
4255518.257796.224652777856339.00416666671457.22048611111-2278.02465277778
4353779.153105.499652777856242.4625-3136.96284722222673.600347222229
4452340.952019.057986111156230-4210.94201388889321.842013888891
4555704.456003.675486111156151.0125-147.337013888892-299.27548611111
4660330.358790.490486111155967.48752823.002986111121539.80951388889
4752837.456375.282986111155614.3916666667760.891319444445-3537.88298611111
4855388.155212.034652777855469.3-257.265347222224176.065347222218
4960383.458306.970486111155567.69583333332739.274652777782076.42951388889
5052070.351291.333819444455351.3541666667-4060.02034722222778.966180555566
515407755547.717152777855098.4333333333449.28381944444-1470.71715277778
5262887.861515.784652777854908.20833333336607.576319444441372.01534722223
5349212.851658.286319444454683.0083333333-3024.72201388889-2445.48631944444
545772256000.591319444454543.37083333331457.220486111111721.40868055556
5553936.851076.299652777854213.2625-3136.962847222222860.50034722223
564699149636.145486111153847.0875-4210.94201388889-2645.14548611111
5754984.253553.037986111153700.375-147.3370138888921431.1620138889
5856485.156312.698819444453489.69583333332823.00298611112172.401180555556
5951277.854055.512152777853294.6208333333760.891319444445-2777.71215277776
6053596.452883.134652777853140.4-257.265347222224713.265347222223
6154252.555559.062152777852819.78752739.27465277778-1306.56215277778
624941348537.387986111152597.4083333333-4060.02034722222875.612013888887
6353213.252996.021319444452546.7375449.28381944444217.178680555553
6458695.358893.322152777852285.74583333336607.57631944444-198.022152777776
6548723.549096.207152777852120.9291666667-3024.72201388889-372.707152777773
665451053636.753819444452179.53333333331457.22048611111873.246180555558
6749454.1NANA-3136.96284722222NA
6846136.6NANA-4210.94201388889NA
6954622.5NANA-147.337013888892NA
7050583NANA2823.00298611112NA
7153224.3NANA760.891319444445NA
7253056.4NANA-257.265347222224NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/May/24/t1274728960pvo05cos5hkk1r3/1pxtd1274728926.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/24/t1274728960pvo05cos5hkk1r3/1pxtd1274728926.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/24/t1274728960pvo05cos5hkk1r3/2pxtd1274728926.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/24/t1274728960pvo05cos5hkk1r3/2pxtd1274728926.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/24/t1274728960pvo05cos5hkk1r3/306ty1274728926.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/24/t1274728960pvo05cos5hkk1r3/306ty1274728926.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/May/24/t1274728960pvo05cos5hkk1r3/406ty1274728926.png (open in new window)
http://www.freestatistics.org/blog/date/2010/May/24/t1274728960pvo05cos5hkk1r3/406ty1274728926.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