From bbernzwe at bear.com  Fri Mar 31 18:23:52 2006
From: bbernzwe at bear.com (Bernzweig, Bruce (Exchange))
Date: Fri, 31 Mar 2006 11:23:52 -0500
Subject: [Rd] Run t-test on multiple time series
Message-ID: <136753ACA3E9A5498440B172A77F4BF20A5D3375@whexchmb15.bsna.bsroot.bear.com>

I have two sets of time-series that I imported from Excel using RODBC
and placed in

"securities" and "factors".

 

What I need to do is generate t-scores for each security-factor pair.

 

I tried the following:

 

    t1 <- t.test(securities[,3:42], factors[,2:41], var.equal=TRUE)

 

However, this gives me just a single t-score.  Note: the numeric values
that I need are in indices 3 to 42 for securities and 2 to 41 for
factors.

 

I'm pretty new with R so I was wondering if I could use something
similar to the following where I can run some function that would
calculate against all values (all meaning each security or each factor):

 

> x <- c(1, 2, 3, 4, 5)

> y <- x+1

> y

  [1] 2 3 4 5 6

 

Or do I need to iterate through the list of securities and factors and
generate a t-score for each pair one at a time?

 

Thanks,

 

- Bruce

 

 

-------------- next part --------------


**********************************************************************
Please be aware that, notwithstanding the fact that the pers...{{dropped}}



[Rd] Run t-test on multiple time series
Bernzweig, Bruce (Exchange