nnt_l: Laupacis' NNT calculator

Description Usage Arguments Value Examples

View source: R/nntl.R

Description

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

Usage

1
2
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 treament group

control

vector of response variable of the control group

cutoff

a scalar that is the MCID

decrease

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

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.

Examples

1
2
3
4
5
6
7
 nnt_l( type      = "mle",
       treat     = rnorm(1000, 110, 10),
       control   = rnorm(1000, 100, 10),
       cutoff    = 100,
       equal.var = TRUE,
       dist      = "normal",
       decrease  = FALSE )

vancak/NNT-calculator-2018 documentation built on Oct. 17, 2020, 11:09 a.m.