nnt_kk: Kraemer & Kupfer's NNT calculator

Description Usage Arguments Value Examples

View source: R/nntkk.R

Description

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

Usage

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

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

control

vector of response variable of the control group

decrease

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

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.

Examples

1
2
3
4
nnt_kk( type     = "non-param",
treat     = rnorm(100, 100, 10),
control   = rnorm(100, 110, 20),
decrease  = TRUE )

vancak/NNTcalculator_v2018 documentation built on Oct. 16, 2020, 12:50 a.m.