gwc {PharmacoGx} | R Documentation

## Calculate the gwc score between two vectors, using either a weighted spearman or pearson correlation

### Description

Calculate the gwc score between two vectors, using either a weighted spearman or pearson correlation

### Usage

    gwc(x1, p1, x2, p2, method.cor = c("pearson", "spearman"), nperm = 10000,
      truncate.p = 1e-16, ...)

### Arguments

`x1` | `numeric` vector of effect sizes (e.g., fold change or t statitsics) for the first experiment
`p1` | `numeric` vector of p-values for each corresponding effect size for the first experiment
`x2` | `numeric` effect size (e.g., fold change or t statitsics) for the second experiment
`p2` | `numeric` vector of p-values for each corresponding effect size for the second experiment
`method.cor` | `character` string identifying if a `pearson` or `spearman` correlation should be used
`nperm` | `numeric` how many permutations should be done to determine
`truncate.p` | `numeric` Truncation value for extremely low p-values
`...` | Other passed down to internal functions

### Value

`numeric` a vector of two values, the correlation and associated p-value.

### Examples

    data(CCLEsmall)
    x <- molecularProfiles(CCLEsmall,"rna")[,1]
    y <- molecularProfiles(CCLEsmall,"rna")[,2]
    x_p <- rep(0.05, times=length(x))
    y_p <- rep(0.05, times=length(y))
    names(x_p) <- names(x)
    names(y_p) <- names(y)
    gwc(x,x_p,y,y_p, nperm=100)

[Package PharmacoGx version 1.8.3 Index]