Obtain correlation coefficients and their variance-covariances
b2r(b, s, rho, n)
The returned value is a list containing:
r the vector of correlation coefficients.
V the variance-covariance matrix of correlations.
the vector of linear regression coefficients.
the corresponding vector of standard errors.
triangular array of between-SNP correlation.
the sample size.
Jing Hua Zhao
This function converts linear regression coefficients of phenotype on single nucleotide polymorphisms (SNPs) into Pearson correlation coefficients with their variance-covariance matrix. It is useful as a preliminary step for meta-analyze SNP-trait associations at a given region. Between-SNP correlations (e.g., from HapMap) are required as auxiliary information.
elston75gap
becker00gap
casella02gap
mvmeta
, LD22
if (FALSE) {
n <- 10
r <- c(1,0.2,1,0.4,0.5,1)
b <- c(0.1,0.2,0.3)
s <- c(0.4,0.3,0.2)
bs <- b2r(b,s,r,n)
}
Run the code above in your browser using DataLab