rm_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 in the Brant package and visually. Only logistic ordinal regression is supported currently.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
rm_ordsum(
  data,
  covs,
  response,
  reflevel,
  caption = NULL,
  showN = T,
  testPO = TRUE,
  digits = 2,
  CIwidth = 0.95,
  excludeLevels
)

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

caption

Table caption

showN

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

testPO

logical, should the proportional odds (parallel regression) assumption be tested with the Brant test, defaults to TRUE

digits

number of digits to display, defaults to

CIwidth

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

excludeLevels

a named list of levels to exclude from the response variable

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.