Home » date » 2011 » May » 19 »

*Unverified author*
R Software Module: /rwasp_decompose.wasp (opens new window with default values)
Title produced by software: Classical Decomposition
Date of computation: Thu, 19 May 2011 14:13:56 +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/19/t1305814193i5tscqajyzc3gir.htm/, Retrieved Thu, 19 May 2011 16:09:57 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
KDGP2W92
 
Dataseries X:
» Textbox « » Textfile « » CSV «
30790 30800 31025 30835 31110 31270 31090 30755 31460 32135 32680 32700 32515 32275 32200 31835 31985 31875 31795 32260 33255 33160 32195 33130 33950 34210 33855 33735 34175 34265 33915 33660 33720 33810 33590 33545 33660 33165 33800 33880 33975 33930 33905 33890 33640 34395 34245 33940 34295 33745 33535 33715 33600 34120 34330 34130 33755 32910 32910 32850 32780 32565 31905 31975 31380 31355 31440 30310 31410 31300 31070 31075 31815
 
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'Herman Ole Andreas Wold' @ www.yougetit.org


Classical Decomposition by Moving Averages
tObservationsFitTrendSeasonalRandom
130790NANA293.746527777776NA
230800NANA46.538194444445NA
331025NANA-82.336805555555NA
430835NANA-105.961805555554NA
531110NANA-90.5868055555535NA
631270NANA22.3715277777779NA
73109031469.121527777831459.3759.74652777778004-379.121527777781
83075531536.329861111131592.7083333333-56.3784722222229-781.329861111106
93146031639.121527777831703.125-64.0034722222229-179.12152777777
103213531830.954861111131793.7537.2048611111114304.045138888887
113268031762.829861111131871.875-109.045138888891917.17013888889
123270032032.246527777831933.541666666798.70486111111667.753472222223
133251532281.871527777831988.125293.746527777776233.128472222223
143227532126.746527777832080.208333333346.538194444445148.253472222226
153220032135.371527777832217.7083333333-82.33680555555564.6284722222263
163183532229.246527777832335.2083333333-105.961805555554-394.24652777777
173198532267.121527777832357.7083333333-90.5868055555535-282.121527777777
183187532377.788194444432355.416666666722.3715277777779-502.788194444442
193179532442.871527777832433.1259.74652777778004-647.871527777777
203226032517.163194444432573.5416666667-56.3784722222229-257.163194444442
213325532659.121527777832723.125-64.0034722222229595.878472222226
223316032908.454861111132871.2537.2048611111114251.545138888891
233219532932.621527777833041.6666666667-109.045138888891-737.621527777774
243313033331.204861111133232.598.70486111111-201.204861111109
253395033714.163194444433420.4166666667293.746527777776235.836805555562
263421033613.621527777833567.083333333346.538194444445596.378472222226
273385533562.454861111133644.7916666667-82.336805555555292.545138888891
283373533585.288194444433691.25-105.961805555554149.711805555555
293417533685.871527777833776.4583333333-90.5868055555535489.128472222226
303426533874.246527777833851.87522.3715277777779390.753472222219
313391533866.829861111133857.08333333339.7465277777800448.1701388888832
323366033745.079861111133801.4583333333-56.3784722222229-85.0798611111095
333372033691.621527777833755.625-64.003472222222928.3784722222263
343381033796.579861111133759.37537.204861111111413.4201388888905
353359033648.038194444433757.0833333333-109.045138888891-58.0381944444453
363354533833.496527777833734.791666666798.70486111111-288.496527777781
373366034014.163194444433720.4166666667293.746527777776-354.163194444445
383316533776.121527777833729.583333333346.538194444445-611.121527777781
393380033653.496527777833735.8333333333-82.336805555555146.503472222219
403388033650.913194444433756.875-105.961805555554229.086805555555
413397533717.954861111133808.5416666667-90.5868055555535257.045138888891
423393033874.663194444433852.291666666722.371527777777955.3368055555547
433390533904.954861111133895.20833333339.746527777780040.0451388888905058
443389033889.454861111133945.8333333333-56.37847222222290.545138888890506
453364033894.954861111133958.9583333333-64.0034722222229-254.954861111109
463439533978.246527777833941.041666666737.2048611111114416.753472222226
473424533809.496527777833918.5416666667-109.045138888891435.503472222219
483394034009.538194444433910.833333333398.70486111111-69.538194444438
493429534230.204861111133936.4583333333293.74652777777664.7951388888978
503374534010.704861111133964.166666666746.538194444445-265.704861111109
513353533896.621527777833978.9583333333-82.336805555555-361.621527777774
523371533815.913194444433921.875-105.961805555554-100.913194444438
533360033713.788194444433804.375-90.5868055555535-113.788194444438
543412033725.704861111133703.333333333322.3715277777779394.295138888891
553433033604.538194444433594.79166666679.74652777778004725.461805555562
563413033426.121527777833482.5-56.3784722222229703.878472222234
573375533301.413194444433365.4166666667-64.0034722222229453.586805555562
583291033262.20486111113322537.2048611111114-352.204861111109
593291032950.954861111133060-109.045138888891-40.9548611111095
603285032950.996527777832852.291666666798.70486111111-100.996527777774
613278032910.413194444432616.6666666667293.746527777776-130.413194444449
623256532383.621527777832337.083333333346.538194444445181.378472222223
633190531997.871527777832080.2083333333-82.336805555555-92.8715277777774
643197531809.454861111131915.4166666667-105.961805555554165.545138888887
653138031681.079861111131771.6666666667-90.5868055555535-301.079861111109
663135531643.413194444431621.041666666722.3715277777779-288.413194444445
673144031516.621527777831506.8759.74652777778004-76.6215277777774
6830310NANA-56.3784722222229NA
6931410NANA-64.0034722222229NA
7031300NANA37.2048611111114NA
7131070NANA-109.045138888891NA
7231075NANA98.70486111111NA
7331815NANANANA
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/19/t1305814193i5tscqajyzc3gir/11szg1305814434.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305814193i5tscqajyzc3gir/11szg1305814434.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305814193i5tscqajyzc3gir/2osh71305814434.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305814193i5tscqajyzc3gir/2osh71305814434.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305814193i5tscqajyzc3gir/3gpqq1305814434.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305814193i5tscqajyzc3gir/3gpqq1305814434.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/19/t1305814193i5tscqajyzc3gir/42m7h1305814434.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/19/t1305814193i5tscqajyzc3gir/42m7h1305814434.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