nt_multiple_glm | R Documentation |
Tabulating results from multivariable GLMs.
nt_multiple_glm(
fit,
exponentiate = FALSE,
ci.type = "Wald",
user.contrast = NULL,
user.contrast.interaction = NULL,
table.reference = TRUE,
format = TRUE,
labels = NULL,
digits = 2,
digits.p = 3,
save = FALSE,
file = "nt_multiple_glm"
)
fit |
a glm object. |
exponentiate |
a logical value indicating whether coefficients should be exponentiated. |
ci.type |
a character value indicating the procedure to calculate confidence intervals: likelihood ratio ( |
user.contrast |
a variable named list of numerical vectors indicating contrast for a covariate. |
user.contrast.interaction |
a variable named list of numerical vectors indicating a contrast for interaction. |
table.reference |
a logical value indicating whether the output should be presented with a line indicating the reference category. |
format |
a logical value indicating whether the output should be formatted. |
labels |
a list of labels with components given by their variable names. |
digits |
a numerical value defining of digits to present the results. |
digits.p |
a numerical value defining number of digits to present the p-values. |
save |
a logical value indicating whether the output should be saved as a csv file. |
file |
a character indicating the name of output file in csv format to be saved. |
library(titanic)
library(dplyr)
data(titanic_train)
dt <- titanic_train |> mutate(Sex = factor(Sex,
levels = c("male", "female"),
labels = c("Male", "Female")),
Pclass = factor(Pclass,
levels = 1:3,
labels = c("I", "II", "III"))
)
fit <- glm(Survived ~ Age + Sex + Pclass, data = dt, family = "binomial")
nt_multiple_glm(fit, exponentiate = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.