nnt_kk: Kraemer & Kupfer's NNT calculator

View source: R/nntkk.R

nnt_kkR Documentation

Kraemer & Kupfer's NNT calculator

Description

Calculates the parametric and the non-parametric KK-NNT. Takes two numeric vectors that are the outcomes of the treatment and control arms, and returns the estimated KK-NNT using the specified method.

Usage

nnt_kk(type, treat, control, decrease, dist = "none", equal.var)

Arguments

type

specification of the estimation method; 'mle' (for the Maximum Likelihood estimator) and 'non-param' (for the non-parametric MLE)

treat

vector of response variable of the treatment group

control

vector of response variable of the control group

decrease

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

dist

distribution type (only for the 'mle' type estimator); "norm" (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 Kraemer & Kupfer's NNT and its confidence intervals using the specified estimation method.

References

Kraemer, H. C., & Kupfer, D. J. (2006). Size of treatment effects and their importance to clinical research and practice. Biological psychiatry, 59(11), 990-996.

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

Examples

nnt_kk( type     = "non-param",
       treat     = rnorm(100, 100, 10),
       control   = rnorm(100, 110, 20),
       dist      = "none",
       decrease  = TRUE )

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