permute: Permutation test

Description Usage Arguments Details Value Author(s) Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#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)

ClusterSignificance documentation built on Nov. 8, 2020, 5:28 p.m.