Description Usage Arguments Details Value Author(s) References Examples
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.
1 2 |
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) |
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.
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:
lr
Lower limit of the confidence interval for the likelihood
ratio positive.
sens
Sensitivity of the proposed test.
spec
Specificity of the proposed test.
disease.rate
Rate of disease in the study population.
alpha
Desired significance level.
n1_est
The estimated (decimal) sample size for the diseased group.
n2_est
The estimated (decimal) sample size for the
non-diseased group.
n_est
The total estimated (decimal) sample size. This is
the sum of n1_est
and n2_est
.
n1
The actual (integer) sample size for the diseased group.
n2
The acutal (integer) sample size for the non-diseased
group
n
The actual total (integer) sample size. This is the sum
of n1
and n2
.
Benjamin Nutter
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.
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)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.