nnt_logreg: Laupacis' adjusted and marginal NNT in logistic regression...

View source: R/nnt_logreg.R

nnt_logregR Documentation

Laupacis' adjusted and marginal NNT in logistic regression model

Description

Internal function. Not for users. Calculates Laupacis' adjusted and marginal NNT in logistic regression model. Takes a data-set suitable for a logistic regression with a dummy variable and an interaction term, and returns the estimated adjusted NNT(x) and the marginal NNT.

Usage

nnt_logreg(response, x, group, adj, data)

Arguments

response

vector of the response variable (i.e., the dependent variable).

x

vector of the explanatory variable.

group

allocated arm variable where 1 corresponds to the treatment arm, and 0 to the control arm.

adj

value that the NNT need to be adjusted for. The default value is the mean of x.

data

data frame that contains the required variables for the computations.

Value

The estimated marginal and adjusted NNT with their corresponding 95 percent confidence intervals.


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