cor.scale: marginal correlation

Description Usage Arguments Value Author(s) Examples

View source: R/coher.R

Description

calculating marginal correlation

Usage

1
cor.scale(snp, y)

Arguments

snp

a SNP covariate

y

phenotype

Value

marginal correlation

Author(s)

The Tien Mai

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (snp, y)
{
    a = snp - mean(snp)
    b = y - mean(y)
    abs(a %*% b)/sqrt(sum(a^2) * sum(b^2))
  }

tienmt/coher documentation built on Dec. 15, 2021, 6:59 a.m.