unadjusted_ors: unadjusted_ors function

unadjusted_orsR Documentation

unadjusted_ors function

Description

Given a vector of variable names, and outcome variable, and a data frame, this function will produce the unadjusted odds ratios and model output by using the lr_model_output function and running each variable independently against the outcome

Usage

unadjusted_ors(vars, outcome, x, digs = 3, staror = TRUE, starpval = TRUE)

Arguments

vars

the vector of variable names to use for piecemeal comparison to the outcome variable

outcome

the outcome variable to use in the unadjusted models. note, this should be in quotes (e.g. "outcome1")

x

the dataframe containing the outcome and covariate variables

digs

option passed to the lr_model_output function. The number of digits to round the values to. default is 3

staror

option passed to the lr_model_output function. Boolean indicating whether to apply star characters to odds ratios. default is TRUE

starpval

option passed to the lr_model_output function. Boolean indicating whether to apply star characters to p values. default is TRUE

Examples

unadjusted_ors_function()


clmacleod/highlandr documentation built on Oct. 11, 2023, 8:04 p.m.