refunreg: refunreg

View source: R/dCVnet_referencemodels.R

refunregR Documentation

refunreg

Description

Unregularised prediction models for comparison

Usage

refunreg(object, ...)

## Default S3 method:
refunreg(object, ...)

## S3 method for class 'dCVnet'
refunreg(object, univariate = TRUE, doPCA = "auto", ncomp = "auto", ...)

Arguments

object

an object to calculate reference logistic regressions for

...

arguments to pass on

univariate

boolean: also calculate per-variable models?

doPCA

first run PCA on the features can be "auto" or a boolean.

  • "auto" determines based on ratio of observations to predictors

  • TRUE|FALSE forces pca/no-pca.

ncomp

specify how many components for pca (integer). "auto" (use n / 10)

Details

Calculate uncrossvalidated performance for reference unregularised models to help interpret dCVnet performance. given n observations of p predictors, the models calculated are:

  • a regression using all variables (if n > 5 * p), otherwise one using the first round(n / 5) principal components

  • a series of models, one for each column in the design matrix - i.e. a mass-univariate approach

Dev Note: the mass-univariate component has a class ('glmlist') used in some summary functions, but this is not currently fully implemented with methods etc.

Value

a list containing:

  • glm - the multiple-predictor model (possibly PCA-reduced)

  • univariate - an optional glmlist of models, one for each predictor

Methods (by class)

  • refunreg(default): refunreg for dCVnet object

  • refunreg(dCVnet): refunreg for dCVnet object

Examples

## Not run: 
data(QuickStartExample, package = "glmnet")
m <- dCVnet(y = QuickStartExample$y,
            data = QuickStartExample$x,
            family = "gaussian")
report_reference_performance_summary(refunreg(m))

## End(Not run)

AndrewLawrence/dCVnet documentation built on Sept. 24, 2024, 5:24 a.m.