# Selection of Differential Variability with Bartlett Statistic

### Description

Ranks features by largest Bartlett statistic and chooses the features which have best resubstitution performance.

### Usage

1 2 3 4 5 6 | ```
## S4 method for signature 'matrix'
bartlettSelection(expression, classes, ...)
## S4 method for signature 'ExpressionSet'
bartlettSelection(expression, datasetName,
trainParams, predictParams, resubstituteParams,
selectionName = "Bartlett Test", verbose = 3)
``` |

### Arguments

`expression` |
Either a |

`classes` |
A vector of class labels. |

`...` |
For the |

`datasetName` |
A name for the dataset used. Stored in the result. |

`trainParams` |
A container of class |

`predictParams` |
A container of class |

`resubstituteParams` |
An object of class |

`selectionName` |
A name to identify this selection method by. Stored in the result. |

`verbose` |
A number between 0 and 3 for the amount of progress messages to give. This function only prints progress messages if the value is 3. |

### Details

The calculation of the test statistic is performed by the `bartlett.test`

function from the `stats`

package.

### Value

An object of class `SelectResult`

or a list of such objects, if the classifier which was used
for determining resubstitution error rate made a number of prediction varieties.

### Author(s)

Dario Strbenac

### Examples

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
if(require(sparsediscrim))
{
# Samples in one class with differential variability to other class.
# First 20 genes are DV.
genesMatrix <- sapply(1:25, function(sample) c(rnorm(100, 9, 1)))
genesMatrix <- cbind(genesMatrix, rbind(sapply(1:25, function(sample) rnorm(20, 9, 5)),
sapply(1:25, function(sample) rnorm(80, 9, 1))))
classes <- factor(rep(c("Poor", "Good"), each = 25))
genesMatrix <- exprs(subtractFromLocation(genesMatrix, 1:ncol(genesMatrix)))
bartlettSelection(genesMatrix, classes, datasetName = "Example",
trainParams = TrainParams(fisherDiscriminant, FALSE, TRUE),
predictParams = PredictParams(function(){}, FALSE, getClasses = function(result) result),
resubstituteParams = ResubstituteParams(nFeatures = seq(10, 100, 10),
performanceType = "balanced", better = "lower"))
}
``` |