ctrlsva {ENmix} | R Documentation

## Non-negative internal control surrogate variables

### Description

Surrogate variables derived based on intensity data for non-negative internal control probes.

### Usage

    ctrlsva(rgSet,percvar=0.95,npc=1,flag=1)

### Arguments

`rgSet` | An object of class `rgDataSet` or `RGChannelSet`.
`percvar` | Minimum percentage of data variations can be explained by surrogate variables, range from 0 to 1,default is 0.95
`npc` | Number of surrogate variables, default is 1
`flag` | 1: select number of surrogate variables based on argument `percvar`; 2: select number of surrogate variables based on argument `npc`

### Value

The function will return an numerical matrix with columns indicating surrogate variables and rows corresponding to samples. These variables can be used in association analysis to adjust for experimental batch effects.

### Author(s)

Zongli Xu

### References

Zongli Xu, Liang Niu, Leping Li and Jack A. Taylor, ENmix: a novel background correction method for Illumina HumanMethylation450 BeadChip. Nucleic Acids Research 2015.

### Examples

    if (require(minfiData)) {
    path <- file.path(find.package("minfiData"),"extdata")
    rgSet <- readidat(path = path,recursive = TRUE)
    sva<-ctrlsva(rgSet)
    }

[Package ENmix version 1.30.03 Index]