mincLm {RMINC}R Documentation

Linear model at Every Voxel

Description

Perform a linear models at every voxel of a set of MINC files

Usage

out <- mincLm(files ~ covariates, gf, mask="mask.mnc")

Arguments

formula

The linear model formula. The left-hand term consists of the MINC filenames over which to compute the models at every voxel.

data

The dataframe which contains the model terms.

subset

Subset definition.

mask

Either a filename or a vector of values of the same length as the input files. The linear model will only be computed inside the mask.

Details

This function computes a linear model at every voxel of a set of files. The function is a close cousin to lm, the key difference being that the left-hand side of the formula specification takes a series of filenames for MINC files.

Value

out

mincLm returns a mincMultiDim object which contains a series of columns corresponding to the terms in the linear model. The first column is the F-statistic of the significance of the entire volume, the following columns contain the marginal t-statistics for each of the terms in the model

.

See Also

mincWriteVolume,mincFDR,mincMean, mincSd

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)
# see what's in the results
vs
# write the results to file
mincWriteVolume(vs, "output.mnc", "Genotype+")

## End(Not run)

[Package RMINC version 0.5.1 Index]