Try this.  It uses Matthias' trick for getting rid of lag 1.
The it defines a new local plot.acf
 and then
defines a new local plot.acf which


# test data
set.seed(1)
x <- rnorm(1000)

# run acf
x.acf <- acf(x)

# remove lag 0 -- see Matthias' post
x.acf$acf[1] <- NA

# plot with custom x axis
plot(x.acf, xaxt = "n")
axis(1, seq(12, length(x.acf$acf), 12))





On 8/18/06, Stefano Sofia <[EMAIL PROTECTED]> wrote:
> I need to modify the graph of the autocorrelation. I tried to do it through 
> plot.acf but with no success.
>
> 1. I would like to get rid of the lag zero
> 2. I would like to have numbers on the x-axis only at lags 12, 24, 36, 48, 
> 60, ...
>
> Could anybody help me in this?
>
> Any help will be appreciated
> Thank you for your attention
> Stefano
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [email protected] 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.
>

______________________________________________
[email protected] 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.

Reply via email to