interval_auc_1curve: Single Predictor, Single Curve ROC Confidence Interval Sample...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/interval_auc_1curve.R

Description

Calculates the sample size, AUC, margin of error, or significance for the confidence interval of an Area Under the Curve (AUC). Assumes that the AUC is based on a single numeric predictor and that the AUC is normally distributed.

Usage

1
2
interval_auc_1curve(auc = NULL, n = NULL, E = NULL, alpha = 0.05,
  weights = list(c(1, 1)), optim.max = 1e+09)

Arguments

auc

Observed Area Under the Curve (AUC)

n

Total sample size

E

Desired margin of error

alpha

Significance Level

weights

a list of length-2 vectors giving the weights for the diseased and non-diseased groups. This is used to calculate k, the proportion of subjects belonging to the first group.

optim.max

Maximum value for optimze when solving for n. The default setting is 1,000,000,000, which is probably higher than anyone will ever need. I may change this in the future for the sake of improving speed.

Details

Exactly one of the parameters n, E, auc and alpha must be passed as NULL, and that parameter will be calculated from the others. Notice that alpha has a non-NULL default, so NULL must be explicitly passed if you want it computed.

Value

Returns a data frame of the parameters passed to the function (expanded using expand.grid) and the corresponding sample size estimates.

  1. E: Margin of Error

  2. auc: Area Under the Curve (AUC)

  3. k: Proportion of total sample size belonging to group 1

  4. n1_est: Exact sample size for group 1

  5. n2_est: Exact sample size for group 2

  6. n_est: Exact total sample size

  7. n1: Estimated sample size for group 1 (next largest integer)

  8. n2: Estimated sample size for group 2 (next largest integer)

  9. n: Estimated total sample size (sum of n1 and n2)

Author(s)

Benjamin Nutter

References

Nancy A Obuchowski, "Sample size calculations in studies of test accuracy," Statistical Methods in Medical Research 1998; 7: 371-392

James A. Hanley and Barbara J. McNeil, "The Meaning and Use of the Area under a Receiver Operating Characteristic (ROC) Curve," Radiology. Vol 143. No 1, Pages 29-36, April 1982.

Examples

1
2
3
4
5
# (Example 1 from PASS Sample Size Software)
# \url{http://ncss.wpengine.netdna-cdn.com/wp-content/themes/ncss/pdf/Procedures/PASS/Confidence_Intervals_for_the_Area_Under_an_ROC_Curve.pdf}
interval_auc_1curve(auc=c(0.6, 0.7, 0.8, 0.9),
                    E = c(.05, .10),
                    alpha=0.05)

nutterb/junkyard documentation built on May 24, 2019, 10:51 a.m.