[Rd] Run t-test on multiple time series
    Bernzweig, Bruce (Exchange) 
    bbernzwe at bear.com
       
    Fri Mar 31 18:23:52 CEST 2006
    
    
  
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}}
    
    
More information about the R-devel
mailing list