interval_lrp: Sample Size for Likelihood Ratio Positive Confidence...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/interval_lrp.R

Description

The likelihood ratio positive LR^+ is a measure comparing positive results from a diagnostic test. Sample size requirements may be generated given an estimate of the sensitivity, specificity, and desired lower (or upper) limit of the confidence interval. Unbalanced designs between diseased and non-diseased groups may be accommodated.

Usage

1
2
interval_lrp(lr = NULL, n = NULL, sens, spec, weights = list(c(0.5, 0.5)),
  alpha = 0.05)

Arguments

lr

The lower (or upper) limit of the likelihood ratio positive desired for the study.

n

The total sample size for the study. Refer to the Details for strategies for calculating n from the disease or non-disease group size.

sens

The estimated or expected sensitivity of the diagnostic test.

spec

The estimated or expected specificity of the diagnostic test.

weights

A list of vectors, each of length 2, providing the weights for the diease and non-disease groups. By default, it is assumed that there are as many patients with the disease as there are without. The values in each vector will be normalized (summed and divided by one), so they do not necessarily need to sum to 1.0. Note that while decreasing the weight of the disease group may reduce the sample size requirement, it will increase the width of the confidence interval around the likelihood ratio negative.

alpha

Significance level (or 1-confidence)

Details

Exactly one of the parameters lr, n, 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.

Let D indicate a patient's disease status, with D^+ indicating the patient has the disease and D^- indicating no disease. Let T represent a diagnostic test where T^+ indicates a positive test and T^- indicates a negative test. Then the sensitivity, s_e, is defined by s_e = P(D^+|T^+) and specificity, s_p is defined by P(D^-|T^-). The likelihood ratio positive can be defined as s_e / (1-s_p). But who are we kidding, this is nearly impossible to read in this medium. Further details about the definitions and derivations for this function can be reviewed by running vignette('LikelihoodRatioPositive').

In cases where the total sample size is not known, the total sample size may be calculated using either n = n_h + (r/(1-r)) * n_h or n_d + (1-r)/r * n_d, where n_h is the size of the non-disease group, n_d is the size of the disease group, and r is the disease rate in the total group. The vignette given above justifies this approach in Section 5b. An example is given in Section 4e.

Value

Returns an object of class HazPwr with subclasses lrp and est (actual appearance: lrp_est_HazPwr. The object contains a data frame of the parameters passed to the function (expanded using expand.grid) and the corresponding sample size estimates. Sample size estimates are provided for the diseased group, the non-diseased group, and the total sample size. Specific fields are:

  1. lrLower limit of the confidence interval for the likelihood ratio positive.

  2. sensSensitivity of the proposed test.

  3. specSpecificity of the proposed test.

  4. disease.rateRate of disease in the study population.

  5. alphaDesired significance level.

  6. n1_estThe estimated (decimal) sample size for the diseased group.

  7. n2_estThe estimated (decimal) sample size for the non-diseased group.

  8. n_estThe total estimated (decimal) sample size. This is the sum of n1_est and n2_est.

  9. n1The actual (integer) sample size for the diseased group.

  10. n2The acutal (integer) sample size for the non-diseased group

  11. nThe actual total (integer) sample size. This is the sum of n1 and n2.

Author(s)

Benjamin Nutter

References

David L. Simel, Gregory P. Samsa, and David B. Matchar, “Likelihood Ratios with confidence: sample size estimation for diagnostic test studies," Journal of Clinical Epidemiology, Vol 44, No 8, pp 763-770, 1991.

Examples

1
2
3
4
5
# Problem 1 From Simel Article
interval_lrp(lr=2.0, n=NULL, sens=.80, spec=.73)

# Problem 3 From Simel Article
interval_lrp(lr=2.0, n=NULL, sens=.80, spec=.73, weights=list(c(1, 5)))

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