calf_subset: calf_subset

Description Usage Arguments Value Examples

View source: R/calf_wrappers.R

Description

Coarse approximation linear function, randomized

Usage

1
2
calf_subset(data, nMarkers, proportion = 0.8, targetVector, times = 1,
  margin = NULL, optimize = "pval", verbose = FALSE)

Arguments

data

Matrix or data frame. First column must contain case/control dummy coded variable (if targetVector = "binary"). Otherwise, first column must contain real number vector corresponding to selection variable (if targetVector = "real"). All other columns contain relevant markers.

nMarkers

Maximum number of markers to include in creation of sum.

proportion

Numeric. A value (where 0 < proportion <= 1) indicating the proportion of cases and controls to use in analysis (if targetVector = "binary"). If targetVector = "real", this is just a proportion of the full sample. Used to evaluate robustness of solution. Defaults to 0.8.

targetVector

Indicate "binary" for target vector with two options (e.g., case/control). Indicate "real" for target vector with real numbers.

times

Numeric. Indicates the number of replications to run with randomization.

margin

Real number from 0 to 1. Indicates the amount a potential marker must improve the target criterion (Pearson correlation or p-value) in order to add the marker.

optimize

Criteria to optimize if targetVector = "binary." Indicate "pval" to optimize the p-value corresponding to the t-test distinguishing case and control. Indicate "auc" to optimize the AUC.

verbose

Logical. Indicate TRUE to print activity at each iteration to console. Defaults to FALSE.

Value

A data frame containing the chosen markers and their assigned weight (-1 or 1)

The AUC value for the classification. If multiple replications are requested, this will be a data.frame containing all AUCs across replications.

aucHist A histogram of the AUCs across replications.

Examples

1
calf_subset(data = CaseControl, nMarkers = 6, targetVector = "binary", times = 5)

stlane/calf documentation built on May 26, 2017, 9 p.m.