Hi I'm getting the following error that do not make sense to me, what am Idoing wrong ? > acf(Recsim[1,], lag.max=1) Error in acf(Recsim[1, ], lag.max = 1) : 'lag.max' must be at least 1 Regards EJ
acf problem ?
4 messages · Ernesto Jardim, Brian Ripley, Sundar Dorai-Raj
On Thu, 12 May 2005, Ernesto Jardim wrote:
I'm getting the following error that do not make sense to me, what am Idoing wrong ?
acf(Recsim[1,], lag.max=1)
Error in acf(Recsim[1, ], lag.max = 1) : 'lag.max' must be at least 1
Inside the code
lag.max <- min(lag.max, sampleT - 1)
if (lag.max < 1)
stop("'lag.max' must be at least 1")
so you have only one point in your `time series', I think.
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Ernesto Jardim wrote:
Hi I'm getting the following error that do not make sense to me, what am Idoing wrong ?
acf(Recsim[1,], lag.max=1)
Error in acf(Recsim[1, ], lag.max = 1) : 'lag.max' must be at least 1 Regards EJ
______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Hi The problem was that Recsim[1,] was not numeric. EJ
Ernesto Jardim wrote on 5/12/2005 11:01 AM:
Hi I'm getting the following error that do not make sense to me, what am Idoing wrong ?
> acf(Recsim[1,], lag.max=1)
Error in acf(Recsim[1, ], lag.max = 1) : 'lag.max' must be at least 1 Regards EJ
Hi, Ernesto, What is Recsim[1,]? I can reproduce this error using: > acf(c(lh), 1) > acf(matrix(lh,ncol=1), 1) > acf(matrix(lh,nrow=1), 1) Error in acf(matrix(lh, nrow = 1), 1) : 'lag.max' must be at least 1 So, maybe try acf(c(Recsim[1,]), lag.max=1) HTH, --sundar