compare_models: Compare a set of massively-univariate models

View source: R/minc_model_selection.R

compare_modelsR Documentation

Compare a set of massively-univariate models

Description

For each response (voxel, vertex, or structure) compare a set of linear model formulations with the criterion of your choice (e.g. AIC, AICc, BIC).

Usage

compare_models(object, ..., metric = AICc)

Arguments

object

A model or a list of models, typically mincLm, vertexLm, or anatLm results.

...

additional models

metric

A function to apply to the models that extracts a result for each independent sub-model. Typical choices are AIC, AICc, and BIC. Please note that metrics are considered such that lower is better (in following AIC). To use a positive metric create a wrapper function that performs the negation, for example, to use the un-modified log-likelihood you could pass metric = function(minc_model){ -minc_model[,"logLik"]}

Value

A sub-model x n models model_comparison matrix with the metric of interest.


Mouse-Imaging-Centre/RMINC documentation built on Nov. 12, 2022, 1:50 p.m.