[R] acf Significance

Steve Jones steve at squaregoldfish.co.uk
Fri Aug 7 09:44:53 CEST 2009


Your suggestion wasn't entirely useless - I didn't know about it before,
so I learned something!

I've had a look in the plot.acf source and found the bit I need, so it's
all good now.

Thanks for the suggestions.

Steve.

markleeds at verizon.net wrote:
> Hi Steve: Clearly my str suggestions was useless !!!! So, my bad there.
> If you do stats:::plot.acf, that will show the source ( it looks complex
> as it always does ) but you can see how the ci piece is calculated.
> Also, the formula for it is in any reasonable time series book such as
> box jenkins or abraham ledolter etc. If you have MASS, it may be in
> there also.
> 
> I'm surprised it's not part of some output somewhere ? hopefully someone
> else will say something because
> I'm not an R expert so it still might be somewhere ?
> 
> 
> 
> On Aug 6, 2009, *Steve Jones* <steve at squaregoldfish.co.uk> wrote:
> 
>     Thanks for the pointer to the str function - very handy!
> 
>     The output for the acf object is below - it doesn't seem to contain
>     anything that might tell me the significance level.
> 
>     List of 6
>     $ acf : num [1:27, 1, 1] 1 0.6309 0.2989 0.0612 -0.2105 ...
>     $ type : chr "correlation"
>     $ n.used: int 27
>     $ lag : num [1:27, 1, 1] 0 1 2 3 4 5 6 7 8 9 ...
>     $ series: chr "time_series"
>     $ snames: NULL
>     - attr(*, "class")= chr "acf"
> 
>     Does anyone have any more ideas?
> 
>     Steve.
> 
>     markleeds at verizon.net <mailto:markleeds at verizon.net> wrote:
>     > hi: set the acf to an object and then do str(object). that should show
>     > if and where they are ? If I knew I would
>     > just tell you so I'm not trying to be socratic. it's been a while
>     since
>     > I used acf().
>     >
>     >
>     >
>     >
>     >
>     > On Aug 5, 2009, *Steve Jones* <steve at squaregoldfish.co.uk
>     <mailto:steve at squaregoldfish.co.uk>> wrote:
>     >
>     > Hi List,
>     >
>     > I'm trying to calculate the autocorrelation coefficients for a time
>     > series using acf at various lags. This is working well, and I can get
>     > the coefficients without any trouble. However, I don't seem to be able
>     > to obtain the significance of these coefficients from the returned acf
>     > object, largely because I don't know where I might find them.
>     >
>     > It's clear that the acf function knows the significance threshold
>     of the
>     > autocorrelations, since it's shown in blue shown on the plot
>     output from
>     > acf, but I can't figure out where to access it. Can anyone help?
>     >
>     > Thanks in advance,
>     > Steve.
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > ______________________________________________
>     > R-help at r-project.org <mailto:R-help at r-project.org>
>     <mailto:R-help at r-project.org <mailto:R-help at r-project.org>> 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.
>     >
> 
> 
> 
>     ------------------------------------------------------------------------
> 
>     ______________________________________________
>     R-help at r-project.org <mailto:R-help at r-project.org> 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.
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090807/c6893a29/attachment-0002.bin>


More information about the R-help mailing list