Displaying 1 result from an estimated 1 matches for "linregzscore".
2012 Apr 03
2
pairwise linear regression between two large datasets
...h (last) residual of the aforementioned linear regression.
I have tried the following code, but i don't seem to get it work. Moreover,
any idea of using a for loop is disastrous since A and B are very large
matrices. I'd be grateful for any suggestions!
C <- apply( A[ ,1:dim(A)[2] ], 2, linRegZscore, y=A[ ,1:dim(A)[2]] )
where linRegZscore is the following function
linRegUtility1 <- function(x,y){
regRes <- lm(y~x)$residuals
( regRes[dim(regRes)[1]]-apply(regRes, 2, mean) )/( apply(regRes,2, sd) )
}
[[alternative HTML version deleted]]