Description Usage Arguments Examples
The fmt_uni_regression
function arguments are similar to the fmt_regression
arguments. Review the fmt_uni_regression
vignette for detailed examples.
1 2 3 4 | fmt_uni_regression(data, method, y, method.args = NULL,
formula = "{y} ~ {.x}", exponentiate = FALSE, label = NULL,
show_yesno = NULL, conf.level = 0.95, beta_fun = fmt_beta,
pvalue_fun = fmt_pvalue)
|
data |
Data frame to be used in univariate regression modeling. Data frame includes the outcome variable(s) and the independent variables. |
method |
Regression method (e.g. |
y |
model outcome as a string (e.g. |
method.args |
List of additional arguments passed on to the regression function defined by method. |
formula |
String that becomes the model formula. Uses |
exponentiate |
logical argument passed directly to |
label |
list of labels to write in the output. |
show_yesno |
Vector of names of categorical and factor variables that
are |
conf.level |
confidence level passed directly to |
beta_fun |
function to round and format beta coefficients. Default is |
pvalue_fun |
function to round and format p-values. Default is |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | fmt_uni_regression(
trial,
method = "glm",
y = "response",
method.args = list(family = binomial),
exponentiate = TRUE
)
# rounding pvalues to 2 decimal places, and adding global p-values
fmt_uni_regression(
trial,
method = "glm",
y = "response",
method.args = list(family = binomial),
exponentiate = TRUE,
pvalue_fun = function(x) fmt_pvalue(x, digits = 2)
) %>%
add_global()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.