[R] Values of ACF and PACF
Rolf Turner
r@turner @end|ng |rom @uck|@nd@@c@nz
Sat Nov 21 04:57:26 CET 2020
On Sat, 21 Nov 2020 08:36:45 +0700
Duncan Williamson <duncanwil using gmail.com> wrote:
> I use the ACF and PACF functions as part of my investigations into
> autocorrelation ...
>
> Is there any way of getting R to show the numerical values provided by
> these functions?
Of course. Easy-peasy. E.g.:
set.seed(42)
x <- rnorm(300)
ax0 <- acf(x,plot=FALSE) # The "plot=FALSE" is not actually necessary.
ax1 <- ax0$acf[,,1]
Reading the help file for a function is Always a Good Idea.
You can also always look at the code. Just type:
acf
Similarly for pacf()
cheers,
Rolf Turner
--
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
More information about the R-help
mailing list