Learn R Programming

dentomedical (version 0.2.0)

logreg: Binary Logistic Regression Table with Univariable and Multivariable Analysis

Description

Fits univariable and multivariable logistic regression models for a binary outcome, summarizing odds ratios (ORs), 95% confidence intervals, and p-values. Factor predictors include reference levels in the table. Returns a formatted flextable and optionally provides an automatic textual interpretation of results.

Value

A flextable summarizing univariable and multivariable logistic regression results, including ORs, 95% CI, and p-values.

Arguments

data

A data frame containing the outcome and predictor variables.

outcome

Name of the binary outcome variable (character).

predictors

Character vector of predictor variable names.

report

Logical; if TRUE, prints an automatic textual interpretation of multivariable results (default: FALSE).

Examples

Run this code
logreg(data=medical_data(), outcome="case" ,
   predictors= c("age" ,  "parity" ,    "induced" ), report = TRUE)

Run the code above in your browser using DataLab