univAndMultiGLM: Make a table with univariable and multivariable logistic...

Description Usage Arguments Examples

View source: R/univAndMultiGLM.R

Description

Given a dataset, make two column output with univariable results for each predictor, and second column with single multivariable model

Usage

1
2
3
univAndMultiGLM(outcome, covars_uni, covars_multi = NULL, p_multiV = 0.05,
  family = "binomial", file = "", d = 2, d_pVal = 3, CIs = TRUE,
  z0 = 1.96, name = "GLM", widthCharCol = 6, markdown = FALSE)

Arguments

outcome

Vector of outcome

covars_uni

Matrix with columns to be used in univariable models

covars_multi

Matrix with columns to be used in multivariable models. If NULL, univariable predictors with p < 0.05 will be used.

p_multiV

ANOVA p-value threshold used for inclusion in multiariable model. Ignored if covars_multi passed in.

family

Model family for GLM: "binomial", "gaussian", "poisson".

file

File name for LaTeX output to be sent to.

d

Decimal places used for HR and confidence interval.

d_pVal

Decimal places used for p value.

CIs

Logical to indicate whether confidence intervals should be printed.

z0

Critical value used for confidence interval.

name

Name of model to be used for caption

widthCharCol

Width of first column with predictor names and levels.

markdown

Boolean to indicate that output be compatible with markdown rather than LaTeX.

Examples

1
2
3
dontrun{
univAndMultiGLM()
}

Oromendia/oromendia documentation built on April 6, 2021, 6:54 a.m.