samsize_pcc: Sample size for classifier development

View source: R/samsize_pcc.r

samsize_pccR Documentation

Sample size for classifier development

Description

Determine the sample size necessary to estimate the probability of correct classification (PCC) to within a certain tolerance of the optimal (Bayes) PCC.

Usage

samsize_pcc(effect, tolerance, p = 0.5, nfeat = 1, dfeat = 1)

Arguments

effect

Effect size (difference in means divided by SD)

tolerance

Sample size is found such that PCC(\infty) - PCC(n) is less than tolerance.

p

Proportion of less common class (default 0.5)

nfeat

Number of features

dfeat

Number of differential features. Note that Dobbin & Simon recommend using dfeat=1.

Details

Assumes a multivariate normal distribution with spherical variance. Loosely based on the function MKmisc::ssize.pcc(), but with two primary differences:

  1. Doesn't solve for worst case scenario over 1:dfeat, just uses dfeat.

  2. Uses tpower() rather than approximating the power of the t-test.

Value

Object of class 'power.htest“, a list of the arguments augmented with method and note elements.

Examples

samsize_pcc(0.5, 0.001)
samsize_pcc(1, 0.1, nfeat=22000)
samsize_pcc(0.8, 0.1, p=1/3, nfeat=22000, dfeat=20)

pbreheny/breheny documentation built on March 30, 2024, 7:37 p.m.