[R] Newbie: Acf function
Vincent Goulet
vincent.goulet at act.ulaval.ca
Thu Feb 8 16:00:11 CET 2007
Le Jeudi 8 Février 2007 09:41, Martin Percossi a écrit :
> Hi, I would like to use acf.plot on a correlogram that is computed
> externally. In other words, I would like to "fake out" the acf object.
> Is this possible?-- any help would be appreciated.
Well, essentially plot.acf() makes a plot with 'type = "h"'. Playing around
with that so give you the desired output.
Now wait a little bit... There, I already wrote such a function:
tacf <- function(x, ...)
{
plot(x, type = "h", ylab = "ACF", xlab = "Lag",
ylim = c(-1, 1), ...)
abline(h = 0)
}
('x' contains the autocorrelations.)
HTH
--
Vincent Goulet, Associate Professor
École d'actuariat
Université Laval, Québec
Vincent.Goulet at act.ulaval.ca http://vgoulet.act.ulaval.ca
More information about the R-help
mailing list