pam.intcv: Nearest shrunken centroid through internal cross validation

Description Usage Arguments Value References Examples

Description

Build a PAM classifier using internal cross validation to choose the tuning parameter, with 5-fold cross validation as the default.

Usage

1
pam.intcv(X, y, vt.k = NULL, n.k = 30, kfold = 5, folds = NULL, seed)

Arguments

X

dataset to be trained. This dataset must have rows as probes and columns as samples.

y

a vector of sample group of each sample for the dataset to be trained. It must have an equal length to the number of samples in X.

vt.k

custom-specified threshold list. By default, vt.k = NULL and 30 values will be predetermined by the pamr package.

n.k

number of threshold values desired. By default, n.k = 30.

kfold

number of folds. By default, kfold = 5.

folds

pre-specifies samples to each fold. By default, folds = NULL for no pre-specification.

seed

an integer used to initialize a pseudorandom number generator.

Value

a list of 4 elements:

mc

an internal misclassification error rate

time

processing time of performing internal validation with PAM

model

a PAM classifier, resulted from pamr.train

cfs

estimated coefficients for the final classifier

References

T. Hastie, R. Tibshirani, Balasubramanian Narasimhan and Gil Chu (2014). pamr: Pam: prediction analysis for microarrays. R package version 1.55. https://CRAN.R-project.org/package=pamr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
set.seed(101)
biological.effect <- estimate.biological.effect(uhdata = uhdata.pl)
ctrl.genes <- unique(rownames(uhdata.pl))[grep("NC", unique(rownames(uhdata.pl)))]
biological.effect.nc <- biological.effect[!rownames(biological.effect) %in% ctrl.genes, ]
group.id <- substr(colnames(biological.effect.nc), 7, 7)

biological.effect.train.ind <- colnames(biological.effect.nc)[c(sample(which(group.id == "E"), size = 64),
                                         sample(which(group.id == "V"), size = 64))]
biological.effect.nc.tr <- biological.effect.nc[, biological.effect.train.ind]

pam.int <- pam.intcv(X = biological.effect.nc.tr,
                     y = substr(colnames(biological.effect.nc.tr), 7, 7),
                     kfold = 5, seed = 1)

LXQin/precision documentation built on May 11, 2019, 6:24 p.m.