Home » date » 2010 » Dec » 14 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Tue, 14 Dec 2010 20:24:27 +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/14/t12923581627dbwxk3vuxxio9f.htm/, Retrieved Tue, 14 Dec 2010 21:22:46 +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/14/t12923581627dbwxk3vuxxio9f.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:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
84.9 81.9 95.9 81 89.2 102.5 89.8 88.8 83.2 90.2 100.4 187.1 87.6 85.4 86.1 86.7 89.1 103.7 86.9 85.2 80.8 91.2 102.8 182.5 80.9 83.1 88.3 86.6 93 105.3 93.8 86.4 87 96.7 100.5 196.7 86.8 88.2 93.8 85 90.4 115.9 94.9 87.7 91.7 95.9 106.8 204.5 90.2 90.5 93.2 97.8 99.4 120 108.2 98.5 104.3 102.9 111.1 188.1 93.8 94.5 112.4 102.5 115.8 136.5 122.1 110.6 116.4 112.6 121.5 199.3
 
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'George Udny Yule' @ 72.249.76.132


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
184.9NANA-15.8064583333333NA
281.9NANA-15.7772916666667NA
395.9NANA-9.815625NA
481NANA-13.3189583333333NA
589.2NANA-7.86145833333333NA
6102.5NANA10.6010416666667NA
789.891.271041666666798.0208333333333-6.74979166666666-1.47104166666666
888.885.950208333333398.2791666666667-12.32895833333332.84979166666666
983.285.525208333333398.0166666666667-12.4914583333333-2.32520833333334
1090.291.017708333333397.8458333333333-6.828125-0.817708333333343
11100.499.790208333333498.07916666666671.711041666666670.609791666666652
12187.1186.79104166666798.12588.66604166666670.308958333333351
1387.682.247708333333398.0541666666667-15.80645833333335.35229166666664
1485.482.006041666666797.7833333333333-15.77729166666673.39395833333334
1586.187.717708333333397.5333333333333-9.815625-1.61770833333333
1686.784.156041666666797.475-13.31895833333332.54395833333334
1789.189.755208333333397.6166666666667-7.86145833333333-0.655208333333334
18103.7108.12604166666797.52510.6010416666667-4.42604166666666
1986.990.30437597.0541666666667-6.74979166666666-3.404375
2085.284.350208333333396.6791666666667-12.32895833333330.849791666666675
2180.884.183541666666796.675-12.4914583333333-3.38354166666666
2291.289.93437596.7625-6.8281251.265625
23102.898.63187596.92083333333331.711041666666674.16812500000002
24182.5185.81604166666797.1588.6660416666667-3.31604166666664
2580.981.697708333333397.5041666666666-15.8064583333333-0.797708333333318
2683.182.06437597.8416666666667-15.77729166666671.03562500000001
2788.388.33437598.15-9.815625-0.0343749999999829
2886.685.318541666666698.6375-13.31895833333331.28145833333335
299390.90937598.7708333333333-7.861458333333332.09062500000000
30105.3109.86770833333399.266666666666710.6010416666667-4.56770833333333
3193.893.354375100.104166666667-6.749791666666660.445625000000007
3286.488.2335416666667100.5625-12.3289583333333-1.83354166666668
338788.5127083333333101.004166666667-12.4914583333333-1.51270833333332
3496.794.3385416666667101.166666666667-6.8281252.36145833333333
35100.5102.702708333333100.9916666666671.71104166666667-2.20270833333335
36196.7189.991041666667101.32588.66604166666676.70895833333333
3786.886.0060416666667101.8125-15.80645833333330.793958333333322
3888.286.1352083333333101.9125-15.77729166666672.06479166666668
3993.892.346875102.1625-9.8156251.453125
408589.0060416666666102.325-13.3189583333333-4.00604166666665
4190.494.6927083333333102.554166666667-7.86145833333333-4.29270833333332
42115.9113.742708333333103.14166666666710.60104166666672.15729166666668
4394.996.8585416666666103.608333333333-6.74979166666666-1.95854166666663
4487.791.516875103.845833333333-12.3289583333333-3.81687499999998
4591.791.4252083333333103.916666666667-12.49145833333330.274791666666673
4695.997.596875104.425-6.828125-1.69687499999999
47106.8107.044375105.3333333333331.71104166666667-0.244374999999991
48204.5194.545208333333105.87916666666788.66604166666679.95479166666668
4990.290.7977083333333106.604166666667-15.8064583333333-0.597708333333316
5090.591.8310416666667107.608333333333-15.7772916666667-1.33104166666666
5193.298.7677083333334108.583333333333-9.815625-5.56770833333336
5297.896.0810416666667109.4-13.31895833333331.71895833333333
5399.4102.009375109.870833333333-7.86145833333333-2.60937499999999
54120119.967708333333109.36666666666710.60104166666670.0322916666666799
55108.2102.083541666667108.833333333333-6.749791666666666.11645833333334
5698.596.8210416666666109.15-12.32895833333331.67895833333336
57104.397.6252083333333110.116666666667-12.49145833333336.67479166666666
58102.9104.284375111.1125-6.828125-1.38437499999998
59111.1113.702708333333111.9916666666671.71104166666667-2.60270833333333
60188.1202.028541666667113.362588.6660416666667-13.9285416666667
6193.898.8227083333333114.629166666667-15.8064583333333-5.0227083333333
6294.599.9352083333333115.7125-15.7772916666667-5.43520833333334
63112.4106.905208333333116.720833333333-9.8156255.49479166666669
64102.5104.310208333333117.629166666667-13.3189583333333-1.81020833333332
65115.8110.605208333333118.466666666667-7.861458333333335.19479166666667
66136.5129.967708333333119.36666666666710.60104166666676.53229166666665
67122.1NANA-6.74979166666666NA
68110.6NANA-12.3289583333333NA
69116.4NANA-12.4914583333333NA
70112.6NANA-6.828125NA
71121.5NANA1.71104166666667NA
72199.3NANA88.6660416666667NA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923581627dbwxk3vuxxio9f/1hwwn1292358264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923581627dbwxk3vuxxio9f/1hwwn1292358264.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923581627dbwxk3vuxxio9f/2hwwn1292358264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923581627dbwxk3vuxxio9f/2hwwn1292358264.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923581627dbwxk3vuxxio9f/3snv81292358264.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923581627dbwxk3vuxxio9f/3snv81292358264.ps (open in new window)


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