R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: i686-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(0.7869,0.7439,0.7492,0.7804,0.7678,0.7573,0.7337,0.7136,0.7107,0.7015,0.6874,0.6754,0.6713,0.6849,0.7003,0.7309,0.7364,0.7439,0.7928,0.8188,0.784,0.7746,0.7677,0.7197,0.7304,0.7567,0.749,0.7328,0.7142,0.6927,0.6974,0.6953,0.699,0.6971,0.7246,0.7301,0.736,0.7585,0.7756,0.7564,0.7568,0.7593,0.779,0.7978,0.8125,0.8075,0.7781,0.771,0.7796,0.763,0.7531,0.7473,0.7707,0.7684,0.7702,0.759,0.7649,0.7508,0.7494,0.7334) > par10 = 'FALSE' > par9 = '1' > par8 = '1' > par7 = '1' > par6 = '0' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '0.0' > par1 = '0' > par10 <- 'FALSE' > par9 <- '1' > par8 <- '1' > par7 <- '1' > par6 <- '0' > par5 <- '12' > par4 <- '0' > par3 <- '1' > par2 <- '0.0' > par1 <- '0' > #'GNU S' R Code compiled by R2WASP v. 1.2.327 () > #Author: root > #To cite this work: Wessa P., (2013), ARIMA Forecasting (v1.0.9) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_arimaforecasting.wasp/ > #Source of accompanying publication: > # > par1 <- as.numeric(par1) #cut off periods > par2 <- as.numeric(par2) #lambda > par3 <- as.numeric(par3) #degree of non-seasonal differencing > par4 <- as.numeric(par4) #degree of seasonal differencing > par5 <- as.numeric(par5) #seasonal period > par6 <- as.numeric(par6) #p > par7 <- as.numeric(par7) #q > par8 <- as.numeric(par8) #P > par9 <- as.numeric(par9) #Q > if (par10 == 'TRUE') par10 <- TRUE > if (par10 == 'FALSE') par10 <- FALSE > if (par2 == 0) x <- log(x) > if (par2 != 0) x <- x^par2 > lx <- length(x) > first <- lx - 2*par1 > nx <- lx - par1 > nx1 <- nx + 1 > fx <- lx - nx > if (fx < 1) { + fx <- par5 + nx1 <- lx + fx - 1 + first <- lx - 2*fx + } > first <- 1 > if (fx < 3) fx <- round(lx/10,0) > (arima.out <- arima(x[1:nx], order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5), include.mean=par10, method='ML')) Call: arima(x = x[1:nx], order = c(par6, par3, par7), seasonal = list(order = c(par8, par4, par9), period = par5), include.mean = par10, method = "ML") Coefficients: ma1 sar1 sma1 0.3593 0.8502 -1.0000 s.e. 0.1407 0.1796 0.4194 sigma^2 estimated as 0.0005086: log likelihood = 137.93, aic = -267.86 > (forecast <- predict(arima.out,par1)) Error in ts(z[[1L]] + xm, start = xtsp[2L] + deltat(rsd), frequency = xtsp[3L]) : 'ts' object must have one or more observations Calls: predict -> predict.Arima -> ts Execution halted