GenerateFoldMatrix {GeneSelector} | R Documentation

## Altered datasets via k-Jackknife or Label (class) exchange

### Description

Generates an object of class FoldMatrix that is then processed by GetRepeatRanking

### Usage

    GenerateFoldMatrix(x, y, k = 1, replicates = ifelse(k==1, ncol(x), 10), type = c("unpaired", "paired", "onesample"), minclassize = 2, balanced = FALSE, control)

### Arguments

`x` | A `matrix` of gene expression values with rows corresponding to genes and columns corresponding to observations. Can alternatively an object of class `ExpressionSet`. If `type = paired`, the first half of the columns corresponds to the first measurements and the second half to the second ones. For instance, if there are 10 observations, each measured twice, stored in an expression matrix `expr`, then `expr[,1]` is paired with `expr[,11]`, `expr[,2]` with `expr[,12]`, and so on.
`y` | If `x` is a matrix, then `y` may be a `numeric` vector or a factor with at most two levels. If `x` is an `ExpressionSet`, then `y` is a character specifyig the phenotype variable in the output from `pData`. If `type = paired`, take care that the coding is analogously to the requirement concerning `x`
`k` | Number of observations that are removed or whose labels are exchanged. Label exchange means that the actual label is replaced by the label of the other class (s. GetRepeatRanking).
`replicates` | Number of replications if `k>1`.
`type` | One of `"paired", "unpaired", "onesample"`, depends on the type of test to be performed, s. for example RankingTstat.
`minclassize` | If `minclassize=k` for some integer `k`, then the number of observations in each class are grater then or equal to `minclassize` for each replication.
`balanced` | If `balanced=TRUE`, then the proportions of the two classes are (at least approximately) the same for each replication. It is a shortcut for a certain value of `minclasssize`. May not reasonable, if class proportions are unbalanced.
`control` | Further control arguments concerning the generation process of the fold matrix, s. samplingcontrol.

### Value

An object of class FoldMatrix.

### warning

If the generation process (partially) fails, try to reduce the constraints or change the argument `control`.

### Note

No jackknif-ed dataset will occur more than once, i.e. each replication is unique.

### Author(s)

Martin Slawski martin.slawski@campus.lmu.de
Anne-Laure Boulesteix http://www.slcmsr.net/boulesteix

### References

Davison, A.C., Hinkley, D.V. (1997)
Bootstrap Methods and their Application. Cambridge University Press

### See Also

GenerateBootMatrix, GetRepeatRanking

### Examples

     ## Load toy gene expression data
    data(toydata)
    ### class labels
    yy <- toydata[1,]
    ### gene expression
    xx <- toydata[-1,]
    ### Generate Leave-One-Out / Exchange-One-Label matrix
    loo <- GenerateFoldMatrix(xx, yy, k=1)
    ### A more complex example
    l3o <- GenerateFoldMatrix(xx, yy, k=3, replicates=30, minclassize=5)

[Package GeneSelector version 1.2.0 Index]