PermutationResults-class {ClusterSignificance} | R Documentation

## Permutation test

### Description

Test how the classification performs compared to random (eg. permuted) data.

### Usage

    ## S4 method for signature 'PermutationResults'
    getData(x, n = NULL)

    ## S4 method for signature 'PermutationResults'
    c(x, ..., recursive = FALSE)

    pvalue(x, ...)

    ## S4 method for signature 'PermutationResults'
    pvalue(x, ...)

    conf.int(x, ...)

    ## S4 method for signature 'PermutationResults'
    conf.int(x, conf.level = 0.99, ...)

    ## S4 method for signature 'PermutationResults'
    initialize(.Object, ..., scores.real, scores.vec)

    permute(mat, ...)

    ## S4 method for signature 'matrix'
    permute(mat, classes, projmethod = "pcp", iter = 100,
      user.permutations = NULL, seed = 3, df = NULL, verbose = TRUE, ...)

    ## S4 method for signature 'PermutationResults,missing'
    plot(x, y, comparison = "all", ...)

    ## S4 method for signature 'PermutationResults'
    show(object)

### Arguments

`x` | matrix for the function permute, otherwise it is a PermutationResults object
`n` | data to extract from ClassifiedPoints (NULL gives all)
`...` | arguments to pass on
`recursive` | dont use (belongs to default generic of combine 'c()')
`conf.level` | confidence level for the returned confidence interval
`.Object` | internal object
`scores.real` | the real score
`scores.vec` | all permuted scores
`mat` | matrix with samples on rows, PCs in columns. Ordered PCs, with PC1 to the left.
`classes` | vector in same order as rows in matrix
`projmethod` | 'pcp' or 'mlp'
`iter` | integer number of iterations to be performed.
`user.permutations` | user defined permutation matrix
`seed` | random seed to be used by the internal permutation
`df` | degrees of freedom, passed to smooth.spline
`verbose` | makes function more talkative
`y` | default plot param, which should be set to NULL
`comparison` | Specify a comparison i.e. ("grp1 vs grp2") and plot only that comparison.
`object` | ClassifiedPoints Object

### Details

This is a test suit and will return a summarized object. The default of the parameter 'iter' is set quite low, and in principle the more iterations the better, or until the pvalue converges to a specifc value. If no pre-permuted data has been supplied by the user, then the internal permutation method will perform a sampling without replacement within each dimension.

### Value

The permute function returns an object of class PermutationResults

### Author(s)

Jesper R. Gadin and Jason T. Serviss

### Examples

    #use pcp method
    data(pcpMatrix)
    classes <- rownames(pcpMatrix)

    #run function
    iterations <- 10
    pe <- permute(
        mat=pcpMatrix,
        classes=classes,
        iter=iterations,
        projmethod="pcp"
    )

    #use mlp method
    data(mlpMatrix)
    classes <- rownames(mlpMatrix)
    pe <- permute(
        mat=mlpMatrix,
        classes=classes,
        iter=iterations,
        projmethod="mlp"
    )

    #getData accessor
    getData(pe)

    #getData accessor specific
    getData(pe, "scores.vec")

    #get pvalue
    pvalue(pe)

    #plot result
    plot(pe)

    #combine three (parallell) jobs on the same matrix
    pe2 <- c(pe, pe, pe)

[Package ClusterSignificance version 1.8.2 Index]