mincLm {RMINC} | R Documentation |
Perform a linear models at every voxel of a set of MINC files
out <- mincLm(files ~ covariates, gf, mask="mask.mnc")
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. |
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.
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 |
.
mincWriteVolume,mincFDR,mincMean, mincSd
## 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)