R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(423.4,404.1,500,472.6,496.1,562,434.8,538.2,577.6,518.1,625.2,561.2,523.3,536.1,607.3,637.3,606.9,652.9,617.2,670.4,729.9,677.2,710,844.3,748.2,653.9,742.6,854.2,808.4,1819,1936.5,1966.1,2083.1,1620.1,1527.6,1795,1685.1,1851.8,2164.4,1981.8,1726.5,2144.6,1758.2,1672.9,1837.3,1596.1,1446,1898.4,1964.1,1755.9,2255.3,1881.2,2117.9,1656.5,1544.1,2098.9,2133.3,1963.5,1801.2,2365.4,1936.5,1667.6,1983.5,2058.6,2448.3,1858.1,1625.4,2130.6,2515.7,2230.2,2086.9,2235,2100.2,2288.6,2490,2573.7,2543.8,2004.7,2390,2338.4,2724.5,2292.5,2386,2477.9,2337,2605.1,2560.8,2839.3,2407.2,2085.2,2735.6,2798.7,3053.2,2405,2471.9,2727.3,2790.7,2385.4,3206.6,2705.6,3518.4,1954.9,2584.3,2535.8,2685.9,2866,2236.6,2934.9,2668.6,2371.2,3165.9,2887.2,3112.2,2671.2,2432.6,2812.3,3095.7,2862.9,2607.3,2862.5) > par4 = '12' > par3 = '1' > par2 = '0' > par1 = '1' > #'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!) > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > par3 <- as.numeric(par3) > par4 <- as.numeric(par4) > if (par1 == 0) { + x <- log(x) + } else { + x <- (x ^ par1 - 1) / par1 + } > if (par2 > 0) x <- diff(x,lag=1,difference=par2) > if (par3 > 0) x <- diff(x,lag=par4,difference=par3) > postscript(file="/var/www/html/rcomp/tmp/1prb21259864250.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > r <- spectrum(x,main='Raw Periodogram') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/22doi1259864250.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > cpgram(x,main='Cumulative Periodogram') > dev.off() null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Raw Periodogram',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Parameter',header=TRUE) > a<-table.element(a,'Value',header=TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Box-Cox transformation parameter (lambda)',header=TRUE) > a<-table.element(a,par1) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Degree of non-seasonal differencing (d)',header=TRUE) > a<-table.element(a,par2) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Degree of seasonal differencing (D)',header=TRUE) > a<-table.element(a,par3) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Seasonal Period (s)',header=TRUE) > a<-table.element(a,par4) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Frequency (Period)',header=TRUE) > a<-table.element(a,'Spectrum',header=TRUE) > a<-table.row.end(a) > for (i in 1:length(r$freq)) { + a<-table.row.start(a) + mylab <- round(r$freq[i],4) + mylab <- paste(mylab,' (',sep='') + mylab <- paste(mylab,round(1/r$freq[i],4),sep='') + mylab <- paste(mylab,')',sep='') + a<-table.element(a,mylab,header=TRUE) + a<-table.element(a,round(r$spec[i],6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3fexx1259864250.tab") > > system("convert tmp/1prb21259864250.ps tmp/1prb21259864250.png") > system("convert tmp/22doi1259864250.ps tmp/22doi1259864250.png") > > > proc.time() user system elapsed 0.529 0.307 0.629