*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
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).
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
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
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
5 matches
Mail list logo