<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\HeaderA{chart.ACF}{Create ACF chart or ACF with PACF two-panel chart}{chart.ACF}
\aliasA{chart.ACFplus}{chart.ACF}{chart.ACFplus}
\keyword{ts}{chart.ACF}
\keyword{multivariate}{chart.ACF}
\keyword{distribution}{chart.ACF}
\keyword{models}{chart.ACF}
\keyword{hplot}{chart.ACF}
\begin{Description}\relax
Creates an ACF chart or a two-panel plot with the ACF and PACF set to some specific defaults.
\end{Description}
\begin{Usage}
\begin{verbatim}
chart.ACF(R, maxlag = NULL, elementcolor = "gray", main = NULL, ...)
chart.ACFplus(R, maxlag = NULL, elementcolor = "gray", main = NULL, ...)

\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{R}] an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns 
\item[\code{maxlag}] the number of lags to calculate for, optional 
\item[\code{elementcolor}] the color to use for chart elements, defaults to "gray" 
\item[\code{main}] title of the plot; uses the column name by default. 
\item[\code{...}] any other passthru parameters 
\end{ldescription}
\end{Arguments}
\begin{Value}
Returns a one- or two-panel chart.
\end{Value}
\begin{Note}\relax
Inspired by the website: \url{http://www.stat.pitt.edu/stoffer/tsa2/Rcode/acf2.R}
"...here's an R function that will plot the ACF and PACF of a time series 
at the same time on the SAME SCALE, and it leaves out the zero lag in the 
ACF: acf2.R. If your time series is in x and you want the ACF and PACF of 
x to lag 50, the call to the function is acf2(x,50). The number of lags 
is optional, so acf2(x) will use a default number of lags [sqrt(n) + 10, where 
n is the number of observations]."

That description made a lot of sense, so it's implemented here for both the ACF alone and the ACF with the PACF.
\end{Note}
\begin{Author}\relax
Peter Carl
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{plot}{plot}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(edhec)
chart.ACFplus(edhec[,1,drop=FALSE])
\end{ExampleCode}
\end{Examples}

</pre></body></html>