logit2tab: Format logistic regression table

Description Usage Arguments Value Examples

Description

Turns a logistic regression object into a regression table and outsheets it to a csv if you choose

Usage

1
logit2tab(reg, file = NULL, xvlab = NULL, stats = F)

Arguments

reg

logistic regression object. output from glm

file

filepath of ouput. txt or csv object.

xvlab

data.frame, lookup table for variable names. First column is codename, second column is the pretty printed name.

stats

include statistics in output

Value

data.frame of results formatted nicely

Examples

1
2
3
4
5
reg <- glm(am~qsec+hp, data=mtcars, family=binomial(logit))
logit2tab(reg)
longnames <- data.frame(short = c('wt', 'mpg', 'cyl', 'drat', 'hp', 'am', 'qsec'),
long = c('Weight', 'Miles Per Gallon', 'Cylinder', 'D.R.A.T', 'Horsepower', 'A.M.', 'Q Seconds'))
logit2tab(reg, xvlab=longnames, stats=T)

brooksandrew/Rsenal documentation built on May 13, 2019, 7:50 a.m.