nnt_l | R Documentation |
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.
nnt_l(type, treat, control, cutoff, decrease, dist = "none", equal.var = TRUE)
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. |
The estimated Laupacis' NNT and its confidence intervals using the specified estimation method.
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.
nnt_l( type = "mle", treat = rnorm(1000, 110, 10), control = rnorm(1000, 100, 10), cutoff = 100, equal.var = TRUE, dist = "normal", decrease = FALSE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.