GenerateFoldMatrix {GeneSelector} | R Documentation

## Altered datasets via k-Jackknife or label exchange

### Description

Generates an object of class FoldMatrix to be used for RepeatRanking.

### Usage

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

### Arguments

`x` | Only needed if `y` is stored within an `ExpressionSet`.
`y` | `y` may be a `numeric` vector or a factor with at most two levels. If `x` is an `ExpressionSet`, then `y` is a character specifying the phenotype variable in the output from `pData`. If `type = "paired"`, take care that the coding is correct.
`k` | Number of observations that are removed or whose labels are exchanged. Label exchange means that the observed label is replaced by the label of the other class (s. RepeatRanking).
`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 be reasonable if class proportions in the given dataset are unbalanced in the original sample.
`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
Anne-Laure Boulesteix

### References

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

### See Also

GenerateBootMatrix, RepeatRanking

### Examples

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

[Package GeneSelector version 2.30.0 Index]