ordsum: Fit and format an ordinal logistic regression using polr from...

Description Usage Arguments Value

View source: R/main.R

Description

Fit and format an ordinal logistic regression using polr from the MASS package. The parallel regression assumption can be tested using the Brant test (modfied from the the Brant package).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
ordsum(
  data,
  covs,
  response,
  reflevel,
  markup = FALSE,
  sanitize = TRUE,
  nicenames = TRUE,
  excludeLevels,
  testPO = TRUE,
  showN = TRUE,
  digits = 1,
  CIwidth = 0.95
)

Arguments

data

dataframe containing data [REQUIRED]

covs

character vector with the names of columns to include in table [REQUIRED]

response

ordinal outcome variable [REQUIRED]

reflevel

manual specification of the reference level, must match level exactly

markup

boolean indicating if you want latex markup

sanitize

boolean indicating if you want to sanitize all strings to not break LaTeX

nicenames

booling indicating if you want to replace . and _ in strings with a space

excludeLevels

a named list of levels to exclude from the response variable

testPO

logical, should the proportional odds (parallel regression) assumption be tested with the Brant test, defaults to TRUE, values greater than alpha are desirable.

showN

logical, should sample sizes be shown for each lvel, defaults to TRUE

digits

number of digits to display, defaults to

CIwidth

level of significance for computing the confidence intervals, default is 0.95

Value

A formatted table displaying the odds ratio associated with each covariate


Avery-Lisa/myReportRx documentation built on May 23, 2021, 2:30 a.m.