% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regression_model.R \name{regression_model} \alias{regression_model} \title{Print a flexible baseline characteristics table} \usage{ regression_model( data, outcome.str = "gear", outcome.factor = TRUE, formula.str = NULL, args.list = list(Hess = TRUE, method = "logistic"), fun = "MASS::polr", vars = NULL ) } \arguments{ \item{data}{data set} \item{outcome.str}{Name of outcome variable. Character vector.} \item{outcome.factor}{Factorize outcome variable. Logical.} \item{formula.str}{Formula as string. Passed through 'glue::glue'. If given, 'outcome.str' and 'vars' are ignored. Optional.} \item{args.list}{List of arguments passed to 'fun' with 'do.call'.} \item{fun}{Name of function as character vector or function to use for model creation.} \item{vars}{character vector of variables to include} } \value{ object of standard class for fun } \description{ Print a flexible baseline characteristics table } \examples{ gtsummary::trial |> regression_model(outcome.str = "stage", fun = "MASS::polr") gtsummary::trial |> regression_model( outcome.str = "age", outcome.factor = FALSE, fun = "stats::lm", formula.str = "{outcome.str}~.", args.list = NULL ) gtsummary::trial |> regression_model( outcome.str = "trt", fun = "stats::glm", args.list = list(family = binomial(link = "logit")) ) }