Would not something like

V = apply(P,2,acf, plot=FALSE)
V = sapply(V,`[[`,"acf")

work? I'm pretty sure acf() doesn't return any sort of residuals so you'll
have to calculate those on your own.

Hope this helps,

Michael Weylandt

On Fri, Sep 16, 2011 at 9:20 AM, Jean-Christophe BOUËTTÉ <
jcbouette@gmail.com> wrote:

> Hi,
> you did not supply a reproducible example. We do not know what your
> data nor your code looks like.
> Please follow the recommandations found at the bottom of this email!
> You're more likely to get a quick and meaningful reply.
> JC
>
> 2011/9/16 Samir Benzerfa <benzerfa@gmx.ch>:
> > Hi everyone,
> >
> >
> >
> > I've got a question concerning the function acf(.) in R for calculating
> the
> > autocorrelation in my data.
> >
> >
> >
> > I have a table with daily returns of several stocks over time and I would
> > like to calculate the autocorrelation for all the series (not only for
> one
> > time series). How can I do this?
> >
> > After that I want to apply an autoregressive model based on the estimated
> > lag in the data and finally extract the residuals for further
> calculations.
> >
> >
> >
> > Many thanks & best regards
> >
> > Benzerfa
> >
> >
> >        [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@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@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.
>

	[[alternative HTML version deleted]]

