Re: [R] Question concerning Box.test

2011-09-28 Thread R. Michael Weylandt
*An:* Samir Benzerfa; r-help *Betreff:* Re: [R] Question concerning Box.test ** ** Plaintext data looks like this: P - structure(list(X77.BANK = c(0, 0, 0, 0.003181659, -0.006386799, 0.028028724, -0.015347692, -0.015910002, 0.00322897, -0.013062473, 0, -0.03809005, 0.021189299

[R] Question concerning Box.test

2011-09-27 Thread Samir Benzerfa
Hi everyone, I've got a question concerning the function Box.test for testing autocorrelation in my data. My data consist of (daily) returns of several stocks over time (first row=time, all other rows=stock returns). I intend to perform a Box-Ljung test for my returns (for each stock).

Re: [R] Question concerning Box.test

2011-09-27 Thread R. Michael Weylandt
Did you try regular apply? If you have univariate input, there's no reason to use the multivariate mapply. Or more generally: apply(P[-1,],1,function(p) Box.test(p)$p.value) Michael On Tue, Sep 27, 2011 at 4:45 AM, Samir Benzerfa benze...@gmx.ch wrote: Hi everyone, I've got a question

Re: [R] Question concerning Box.test

2011-09-27 Thread R. Michael Weylandt
Weylandt [mailto:michael.weyla...@gmail.com] *Gesendet:* Dienstag, 27. September 2011 13:12 *An:* Samir Benzerfa *Cc:* r-help@r-project.org *Betreff:* Re: [R] Question concerning Box.test ** ** Did you try regular apply? If you have univariate input, there's no reason to use

Re: [R] Question concerning Box.test

2011-09-27 Thread R. Michael Weylandt
and columns. Actually, I want to perform the test for each column and not row. ** ** *Von:* R. Michael Weylandt [mailto:michael.weyla...@gmail.com] *Gesendet:* Dienstag, 27. September 2011 17:51 *An:* Samir Benzerfa; r-help *Betreff:* Re: [R] Question concerning Box.test