nnt_l: Laupacis' unadjusted NNT calculator

View source: R/nntl.R

nnt_lR Documentation

Laupacis' unadjusted NNT calculator

Description

Calculates Laupacis' type NNT. Takes two numeric vectors that are the outcomes of the treatment and control arms, and returns the estimated NNT using the specified estimation method.

Usage

nnt_l(type, treat, control, cutoff, decrease, dist = "none", equal.var = TRUE)

Arguments

type

specification of the estimation method; 'mle' (for the Maximum Likelihood estimator), 'fl' (for Furukawa & Leucht's estimator), 'laupacis' (for the non-parametric MLE estimator)

treat

vector of response variable of the treatment group

control

vector of response variable of the control group

cutoff

a scalar that is the MCID

decrease

logical TRUE or FALSE. Indicates whether the MCID change is decrease in the response variable

dist

distribution type (if specified); "normal" (Normal), "expon" (Exponential). The default value is 'none'.

equal.var

logical TRUE or FALSE; Indicates whether the variances are equal - for normal distribution only. The default value is TRUE.

Value

The estimated Laupacis' NNT and its confidence intervals using the specified estimation method.

References

Laupacis, A., Sackett, D. L., & Roberts, R. S. (1988). An assessment of clinically useful measures of the consequences of treatment. New England journal of medicine, 318(26), 1728-1733.

Vancak, V., Goldberg, Y., & Levine, S. Z. (2020). Systematic analysis of the number needed to treat. Statistical Methods in Medical Research, 0962280219890635.

Furukawa, T. A., & Leucht, S. (2011). How to obtain NNT from Cohen's d: comparison of two methods. PloS one, 6(4), e19070.

Examples

 nnt_l( type      = "mle",
        treat     = rnorm(1000, 110, 10),
        control   = rnorm(1000, 100, 10),
        cutoff    = 100,
        equal.var = TRUE,
        dist      = "normal",
        decrease  = FALSE )

vancak/NNTcalculator documentation built on April 7, 2022, 3:48 a.m.