| 42333 |
ripley |
1 |
% File src/library/stats/man/plot.acf.Rd
|
|
|
2 |
% Part of the R package, http://www.R-project.org
|
| 59039 |
ripley |
3 |
% Copyright 1995-2007 R Core Team
|
| 42333 |
ripley |
4 |
% Distributed under GPL 2 or later
|
|
|
5 |
|
| 27497 |
ripley |
6 |
\name{plot.acf}
|
| 56186 |
murdoch |
7 |
\alias{plot.acf}
|
| 27497 |
ripley |
8 |
\title{Plot Autocovariance and Autocorrelation Functions}
|
|
|
9 |
\description{
|
|
|
10 |
Plot method for objects of class \code{"acf"}.
|
|
|
11 |
}
|
|
|
12 |
\usage{
|
|
|
13 |
\method{plot}{acf}(x, ci = 0.95, type = "h", xlab = "Lag", ylab = NULL,
|
| 30912 |
ripley |
14 |
ylim = NULL, main = NULL,
|
|
|
15 |
ci.col = "blue", ci.type = c("white", "ma"),
|
| 27497 |
ripley |
16 |
max.mfrow = 6, ask = Npgs > 1 && dev.interactive(),
|
|
|
17 |
mar = if(nser > 2) c(3,2,2,0.8) else par("mar"),
|
|
|
18 |
oma = if(nser > 2) c(1,1.2,1,1) else par("oma"),
|
|
|
19 |
mgp = if(nser > 2) c(1.5,0.6,0) else par("mgp"),
|
| 44243 |
ripley |
20 |
xpd = par("xpd"),
|
|
|
21 |
cex.main = if(nser > 2) 1 else par("cex.main"),
|
| 27497 |
ripley |
22 |
verbose = getOption("verbose"),
|
|
|
23 |
\dots)
|
|
|
24 |
}
|
|
|
25 |
\arguments{
|
|
|
26 |
\item{x}{an object of class \code{"acf"}.}
|
|
|
27 |
\item{ci}{coverage probability for confidence interval. Plotting of
|
|
|
28 |
the confidence interval is suppressed if \code{ci} is zero or
|
|
|
29 |
negative.}
|
|
|
30 |
\item{type}{the type of plot to be drawn, default to histogram like
|
|
|
31 |
vertical lines.}
|
|
|
32 |
\item{xlab}{the x label of the plot.}
|
|
|
33 |
\item{ylab}{the y label of the plot.}
|
|
|
34 |
\item{ylim}{numeric of length 2 giving the y limits for the plot.}
|
|
|
35 |
\item{main}{overall title for the plot.}
|
|
|
36 |
\item{ci.col}{colour to plot the confidence interval lines.}
|
|
|
37 |
\item{ci.type}{should the confidence limits assume a white noise
|
|
|
38 |
input or for lag \eqn{k} an MA(\eqn{k-1}) input?}
|
|
|
39 |
\item{max.mfrow}{positive integer; for multivariate \code{x}
|
|
|
40 |
indicating how many rows and columns of plots should be put on one
|
|
|
41 |
page, using \code{\link{par}(mfrow = c(m,m))}.}
|
|
|
42 |
\item{ask}{logical; if \code{TRUE}, the user is asked before a new
|
|
|
43 |
page is started.}
|
|
|
44 |
\item{mar, oma, mgp, xpd, cex.main}{graphics parameters as in
|
|
|
45 |
\code{\link{par}(*)}, by default adjusted to use smaller than
|
|
|
46 |
default margins for multivariate \code{x} only.
|
|
|
47 |
}
|
|
|
48 |
\item{verbose}{logical. Should \R report extra information on
|
|
|
49 |
progress?}
|
|
|
50 |
\item{\dots}{graphics parameters to be passed to the plotting
|
|
|
51 |
routines.}
|
|
|
52 |
}
|
|
|
53 |
\note{
|
|
|
54 |
The confidence interval plotted in \code{plot.acf} is based on an
|
|
|
55 |
\emph{uncorrelated} series and should be treated with appropriate
|
|
|
56 |
caution. Using \code{ci.type = "ma"} may be less potentially
|
|
|
57 |
misleading.
|
|
|
58 |
}
|
|
|
59 |
\seealso{\code{\link{acf}} which calls \code{plot.acf} by default.
|
|
|
60 |
}
|
|
|
61 |
\examples{
|
| 41508 |
ripley |
62 |
require(graphics)
|
|
|
63 |
|
| 27497 |
ripley |
64 |
%%-- FIXME: use less trivial data :
|
| 61160 |
ripley |
65 |
z4 <- ts(matrix(rnorm(400), 100, 4), start = c(1961, 1), frequency = 12)
|
|
|
66 |
z7 <- ts(matrix(rnorm(700), 100, 7), start = c(1961, 1), frequency = 12)
|
| 27497 |
ripley |
67 |
acf(z4)
|
| 61168 |
ripley |
68 |
acf(z7, max.mfrow = 7) # squeeze onto 1 page
|
| 27497 |
ripley |
69 |
acf(z7) # multi-page
|
|
|
70 |
}
|
|
|
71 |
\keyword{hplot}
|
|
|
72 |
\keyword{ts}
|