R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- c(235.10 + ,280.70 + ,264.60 + ,240.70 + ,201.40 + ,240.80 + ,241.10 + ,223.80 + ,206.10 + ,174.70 + ,203.30 + ,220.50 + ,299.50 + ,347.40 + ,338.30 + ,327.70 + ,351.60 + ,396.60 + ,438.80 + ,395.60 + ,363.50 + ,378.80 + ,357.00 + ,369.00 + ,464.80 + ,479.10 + ,431.30 + ,366.50 + ,326.30 + ,355.10 + ,331.60 + ,261.30 + ,249.00 + ,205.50 + ,235.60 + ,240.90 + ,264.90 + ,253.80 + ,232.30 + ,193.80 + ,177.00 + ,213.20 + ,207.20 + ,180.60 + ,188.60 + ,175.40 + ,199.00 + ,179.60 + ,225.80 + ,234.00 + ,200.20 + ,183.60 + ,178.20 + ,203.20 + ,208.50 + ,191.80 + ,172.80 + ,148.00 + ,159.40 + ,154.50 + ,213.20 + ,196.40 + ,182.80 + ,176.40 + ,153.60 + ,173.20 + ,171.00 + ,151.20 + ,161.90 + ,157.20 + ,201.70 + ,236.40 + ,356.10 + ,398.30 + ,403.70 + ,384.60 + ,365.80 + ,368.10 + ,367.90 + ,347.00 + ,343.30 + ,292.90 + ,311.50 + ,300.90 + ,366.90 + ,356.90 + ,329.70 + ,316.20 + ,269.00 + ,289.30 + ,266.20 + ,253.60 + ,233.80 + ,228.40 + ,253.60 + ,260.10 + ,306.60 + ,309.20 + ,309.50 + ,271.00 + ,279.90 + ,317.90 + ,298.40 + ,246.70 + ,227.30 + ,209.10 + ,259.90 + ,266.00 + ,320.60 + ,308.50 + ,282.20 + ,262.70 + ,263.50 + ,313.10 + ,284.30 + ,252.60 + ,250.30 + ,246.50 + ,312.70 + ,333.20 + ,446.40 + ,511.60 + ,515.50 + ,506.40 + ,483.20 + ,522.30 + ,509.80 + ,460.70 + ,405.80 + ,375.00 + ,378.50 + ,406.80 + ,467.80 + ,469.80 + ,429.80 + ,355.80 + ,332.70 + ,378.00 + ,360.50 + ,334.70 + ,319.50 + ,323.10 + ,363.60 + ,352.10 + ,411.90 + ,388.60 + ,416.40 + ,360.70 + ,338.00 + ,417.20 + ,388.40 + ,371.10 + ,331.50 + ,353.70 + ,396.70 + ,447.00 + ,533.50 + ,565.40 + ,542.30 + ,488.70 + ,467.10 + ,531.30 + ,496.10 + ,444.00 + ,403.40 + ,386.30 + ,394.10 + ,404.10 + ,462.10 + ,448.10 + ,432.30 + ,386.30 + ,395.20 + ,421.90 + ,382.90 + ,384.20 + ,345.50 + ,323.40 + ,372.60 + ,376.00 + ,462.70 + ,487.00 + ,444.20 + ,399.30 + ,394.90 + ,455.40 + ,414.00 + ,375.50 + ,347.00 + ,339.40 + ,385.80 + ,378.80 + ,451.80 + ,446.10 + ,422.50 + ,383.10 + ,352.80 + ,445.30 + ,367.50 + ,355.10 + ,326.20 + ,319.80 + ,331.80 + ,340.90 + ,394.10 + ,417.20 + ,369.90 + ,349.20 + ,321.40 + ,405.70 + ,342.90 + ,316.50 + ,284.20 + ,270.90 + ,288.80 + ,278.80 + ,324.40 + ,310.90 + ,299.00 + ,273.00 + ,279.30 + ,359.20 + ,305.00 + ,282.10 + ,250.30 + ,246.50 + ,257.90 + ,266.50 + ,315.90 + ,318.40 + ,295.40 + ,266.40 + ,245.80 + ,362.80 + ,324.90 + ,294.20 + ,289.50 + ,295.20 + ,290.30 + ,272.00 + ,307.40 + ,328.70 + ,292.90 + ,249.10 + ,230.40 + ,361.50 + ,321.70 + ,277.20 + ,260.70 + ,251.00 + ,257.60 + ,241.80 + ,287.50 + ,292.30 + ,274.70 + ,254.20 + ,230.00 + ,339.00 + ,318.20 + ,287.00 + ,295.80 + ,284.00 + ,271.00 + ,262.70 + ,340.60 + ,379.40 + ,373.30 + ,355.20 + ,338.40 + ,466.90 + ,451.00 + ,422.00 + ,429.20 + ,425.90 + ,460.70 + ,463.60 + ,541.40 + ,544.20 + ,517.50 + ,469.40 + ,439.40 + ,549.00 + ,533.00 + ,506.10 + ,484.00 + ,457.00 + ,481.50 + ,469.50 + ,544.70 + ,541.20 + ,521.50 + ,469.70 + ,434.40 + ,542.60 + ,517.30 + ,485.70 + ,465.80 + ,447.00 + ,426.60 + ,411.60 + ,467.50 + ,484.50 + ,451.20 + ,417.40 + ,379.90 + ,484.70 + ,455.00 + ,420.80 + ,416.50 + ,376.30 + ,405.60 + ,405.80 + ,500.80 + ,514.00 + ,475.50 + ,430.10 + ,414.40 + ,538.00 + ,526.00 + ,488.50 + ,520.20 + ,504.40 + ,568.50 + ,610.60 + ,818.00 + ,830.90 + ,835.90 + ,782.00 + ,762.30 + ,856.90 + ,820.90 + ,769.60 + ,752.20 + ,724.40 + ,723.10 + ,719.50 + ,817.40 + ,803.30 + ,752.50 + ,689.00 + ,630.40 + ,765.50 + ,757.70 + ,732.20 + ,702.60 + ,683.30 + ,709.50 + ,702.20 + ,784.80 + ,810.90 + ,755.60 + ,656.80 + ,615.10 + ,745.30 + ,694.10 + ,675.70 + ,643.70 + ,622.10 + ,634.60 + ,588.00 + ,689.70 + ,673.90 + ,647.90 + ,568.80 + ,545.70 + ,632.60 + ,643.80 + ,593.10 + ,579.70 + ,546.00 + ,562.90 + ,572.50) > par2 = '12' > par1 = 'additive' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > par2 <- as.numeric(par2) > x <- ts(x,freq=par2) > m <- decompose(x,type=par1) > m$figure [1] 46.751157 54.385602 30.880463 -9.577454 -30.505926 42.342407 [7] 16.824907 -14.845926 -33.154398 -48.975787 -27.666343 -26.458704 > postscript(file="/var/www/rcomp/tmp/147pt1322313699.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(m) > dev.off() null device 1 > mylagmax <- length(x)/2 > postscript(file="/var/www/rcomp/tmp/2r8911322313699.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > 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() null device 1 > postscript(file="/var/www/rcomp/tmp/3evnz1322313699.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > 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() null device 1 > postscript(file="/var/www/rcomp/tmp/4r2wg1322313699.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > 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() null device 1 > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/rcomp/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="/var/www/rcomp/tmp/5mjyf1322313699.tab") > > try(system("convert tmp/147pt1322313699.ps tmp/147pt1322313699.png",intern=TRUE)) character(0) > try(system("convert tmp/2r8911322313699.ps tmp/2r8911322313699.png",intern=TRUE)) character(0) > try(system("convert tmp/3evnz1322313699.ps tmp/3evnz1322313699.png",intern=TRUE)) character(0) > try(system("convert tmp/4r2wg1322313699.ps tmp/4r2wg1322313699.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.150 0.060 4.219