Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

glmuni

Binomial logistic regression univariable models: finalfit model wrapper


Description

Using finalfit conventions, produces multiple univariable binomial logistic regression models for a set of explanatory variables against a binary dependent.

Usage

glmuni(.data, dependent, explanatory, family = "binomial", ...)

Arguments

.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 glm.

...

Other arguments to pass to glm.

Details

Uses glm with finalfit modelling conventions. Output can be passed to fit2df.

Value

A list of univariable glm fitted model outputs. Output is of class glmlist.

See Also

Examples

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)")

finalfit

Quickly Create Elegant Regression Results Tables and Plots when Modelling

v1.0.2
MIT + file LICENCE
Authors
Ewen Harrison [aut, cre], Tom Drake [aut], Riinu Ots [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.