glmuni | R Documentation |
finalfit
model wrapperUsing finalfit
conventions, produces multiple univariable binomial logistic
regression models for a set of explanatory variables against a binary dependent.
glmuni(.data, dependent, explanatory, family = "binomial", weights = "", ...)
.data |
Data frame. |
dependent |
Character vector of length 1: name of depdendent variable (must have 2 levels). |
explanatory |
Character vector of any length: name(s) of explanatory variables. |
family |
Character vector quoted or unquoted of the error distribution
and link function to be used in the model, see |
weights |
Character vector of length 1: name of variabe for weighting. 'Prior weights' to be used in the fitting process. |
... |
Other arguments to pass to |
Uses glm
with finalfit
modelling conventions. Output can be
passed to fit2df
.
A list of univariable glm
fitted model outputs.
Output is of class glmlist
.
fit2df, finalfit_merge
Other finalfit model wrappers:
coxphmulti()
,
coxphuni()
,
crrmulti()
,
crruni()
,
glmmixed()
,
glmmulti_boot()
,
glmmulti()
,
lmmixed()
,
lmmulti()
,
lmuni()
,
svyglmmulti()
,
svyglmuni()
library(finalfit)
library(dplyr)
explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor")
dependent = "mort_5yr"
colon_s %>%
glmuni(dependent, explanatory) %>%
fit2df(estimate_suffix=" (univariable)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.