rnb.execute.batcheffects {RnBeads} | R Documentation

## rnb.execute.batcheffects

### Description

Performs tests for association between traits and principal components.

### Usage

    rnb.execute.batcheffects(rnb.set, pcoordinates = NULL)

### Arguments

`rnb.set` | Methylation dataset as an object of type inheriting `RnBSet`.
`pcoordinates` | Coordinates of the samples of `rnb.set` in the principal components space, as returned by `rnb.execute.dreduction`.

### Value

Results of attempted tests for associations in the form of a list with up to three elements:

`"permutations"`

  `integer` matrix of index permutations. The number of rows in the matrix is N - the number of samples in `rnb.set`. Every column in this matrix denotes a sample permutation; the first column is the sequence 1 to N. This element is included only when `rnb.getOption("exploratory.correlation.permutations")` is non-zero and there are numeric traits to be tested.

`"pc"`

  List of four matrices named `"failures"`, `"tests"`, `"correlations"` and `"pvalues"`. The rows in each of these matrices correspond to the first several principal components, and the columns - to selected traits. This element is not included in the returned list when `pcoordinates` is `NULL`.

`"traits"`

  List of four square symmetric matrices named `"failures"`, `"tests"`, `"correlations"` and `"pvalues"`, containing information about the performed tests for pairwise trait association. This element is included only if two or more traits were tested.

### Author(s)

Yassen Assenov

### See Also

`rnb.run.exploratory` for running the whole exploratory analysis module

### Examples

    library(RnBeads.hg19)
    data(small.example.object)
    regs <- c("sites", summarized.regions(rnb.set.example))
    dreduction <- function(x) rnb.execute.dreduction(rnb.set.example, x)
    pcoordinates <- lapply(regs, dreduction)
    names(pcoordinates) <- regs
    result <- rnb.execute.batcheffects(rnb.set.example, pcoordinates)

[Package RnBeads version 2.4.0 Index]