mincFDR {RMINC}R Documentation

Compute the False Discovery Rate for a mincLm object

Description

Takes the output of a mincLm run and computes the False Discovery Rate on the results.

Usage

qvals <- mincFDR(mincLm.object, mask="mask.mnc")

Arguments

mincLm.object

The results of a mincLm run.

columns

A vector of column names. By default the threshold will be computed for all columns; with this argument the computation can be limited to a subset.

mask

Either a filename or a numeric vector representing a mask - only values inside the mask will be used to compute the threshold.

df

The degrees of freedom - normally this can be determined from the input object.

method

The method used to compute the false discovery rate. Options are "FDR" and "pFDR".

Details

This function uses the qvalue package to compute the False Discovery Rate threshold for the results of a mincLm computation. The False Discovery Rate represents the percentage of results expected to be a false positive. Two implementations can be used as specified by the method argument. "FDR" uses the implementation in p.adjust, whereas "pFDR" is a version of the postivie False Discovery Rate as found in John Storey's qvalue package.

Value

qvals

mincFDR returns an object with the same number of columns as the input (or the subset specified by the columns argument to mincFDR). Each column now contains the qvalues for each voxel. Areas outside the mask (if a mask was specified) will be represented by a value of 1. The result also has an attribute called "thresholds" which contains the 1, 5, 10, 15, and 20 percent false discovery rate thresholds.

See Also

mincWriteVolume,mincLm

Examples

## Not run: 
# read the text file describing the dataset
gf <- read.csv("control-file.csv")
# run a linear model relating the data in all voxels to Genotype
vs <- mincLm(filenames ~ Genotype, gf)
# compute the False Discovery Rate
qvals <- mincFDR(vs, mask="mask.mnc")
# write the Gentoype column of the qvals to file
mincWriteVolume(qvals, "FDR-results.mnc", "Genotype+")

## End(Not run)

[Package RMINC version 0.5.1 Index]