nnt_lm: Laupacis' adjusted and marginal NNT in linear regression...

View source: R/nnt_lm.R

nnt_lmR Documentation

Laupacis' adjusted and marginal NNT in linear regression model

Description

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

Usage

nnt_lm(response, x, cutoff, group, decrease, adj, data)

Arguments

response

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

x

vector of the explanatory variable.

cutoff

the MCID threshold.

group

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

decrease

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

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.

data(linreg_data)


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