Learn R Programming

CALF (version 1.0.17)

calf_fractional: calf_fractional

Description

Randomly selects from binary input provided to data parameter while ensuring the requested proportions of case and control variables are used and runs Coarse Approximation Linear Function.

Usage

calf_fractional(
  data,
  nMarkers,
  controlProportion = 0.8,
  caseProportion = 0.8,
  optimize = "pval",
  verbose = FALSE
)

Arguments

data

Matrix or data frame. Must be binary data such that the first column must contain case/control dummy coded variable, as function is only approprite for binary data.

nMarkers

Maximum number of markers to include in creation of sum.

controlProportion

Proportion of control samples to use, default is .8.

caseProportion

Proportion of case samples to use, default is .8.

optimize

Criteria to optimize, "pval" or "auc". Defaults to "pval".

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 optimal AUC or pval for the classification.

rocPlot. A plot object from ggplot2 for the receiver operating curve.

Examples

Run this code
# NOT RUN {
calf_fractional(data = CaseControl, nMarkers = 6, controlProportion = .8, caseProportion = .4)
# }

Run the code above in your browser using DataLab