[R] Meaning of lag 0.2, 0.4,... ?

2010-04-08 Thread Bogaso

Please see that correlogram for a arbitrary time series :

acf(zooreg(rnorm(39), start=as.yearmon(2008-01-01), frequency=12))

What is the meaning of lag 0.2, 0.4,  in the plot? Those should not
be integers? Or I am missing something?

Thanks
-- 
View this message in context: 
http://n4.nabble.com/Meaning-of-lag-0-2-0-4-tp1765093p1765093.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Meaning of lag 0.2, 0.4,... ?

2010-04-08 Thread Steve Chen
Hi Bogaso,

You could try this to get integer x-axis values:

library(zoo)
z = zooreg(rnorm(39), start=as.yearmon(2008-01-01), frequency=12)

acf(ts(z,freq=1))

Steve Chen

On 2010/4/8 下午 03:32, Bogaso wrote:
 
 Please see that correlogram for a arbitrary time series :
 
 acf(zooreg(rnorm(39), start=as.yearmon(2008-01-01), frequency=12))
 
 What is the meaning of lag 0.2, 0.4,  in the plot? Those should not
 be integers? Or I am missing something?
 
 Thanks

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Meaning of lag 0.2, 0.4,... ?

2010-04-08 Thread Prof Brian Ripley

On Wed, 7 Apr 2010, Bogaso wrote:



Please see that correlogram for a arbitrary time series :


library(zoo) ## you example does not work without it!


acf(zooreg(rnorm(39), start=as.yearmon(2008-01-01), frequency=12))

What is the meaning of lag 0.2, 0.4,  in the plot? Those should not
be integers? Or I am missing something?


You are.  They are in years: you told R that the series was monthly 
with a time unit of years.




Thanks
--
View this message in context: 
http://n4.nabble.com/Meaning-of-lag-0-2-0-4-tp1765093p1765093.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

  ^^^



--
Brian D. Ripley,  rip...@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, UKFax:  +44 1865 272595

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.