nicepolr: Lisa's Propoportional Odds Logistic Regression Table Function

Usage Arguments

View source: R/nicepolr.R

Usage

1
2
3
4
nicepolr(df, fit = NA, method = "logistic", covs = NA, out = NA,
  regtype = "multi", exp = TRUE, estname = "Estimate", labels = NA,
  overallp = FALSE, est.dec = 2, ci.dec = 2, pval.dec = 3,
  color = "#EEEEEE", printRMD = FALSE, htmlTable = TRUE)

Arguments

df

Dataframe [REQUIRED].

fit

polr model object [fit or method/covs/out are REQUIRED].

method

Method name in quotes ("logistic", "probit", "loglog", "cloglog", "cauchit") [REQUIRED if fit = NA].

covs

Vector of covariates to include in model [fit or method/covs/out are REQUIRED].

out

Outcome for regression model [fit or method/covs/out are REQUIRED].

regtype

Should the covariates be run separately ("uni") or together in a multiple regression model ("multi") [REQUIRED if no fit].

exp

Option to exponentiate coefficients and CI's. Default is NA (estimates are only exponentiated for binomial and poisson method models by default).

estname

Option to override default estimate column name. Default is NA.

overallp

If TRUE, a likelihood ratio test pvalue (using drop1 Chisq tests) will be calculated for each variable. Default is TRUE.

est.dec

Number of decimal places for estimates. Default is 2.

ci.dec

Number of decimal places for 95

\item

pval.decNumber of decimal places for pvalues. Default is 3.

\item

colorHex color to use for htmlTable output. Default is "#EEEEEE" (grey).

\item

printRMDWhether to print resulting table to Rmd via xtable. Default is FALSE

\item

htmlTableWhether to use htmlTable package to display table (instead of xtable). Default is TRUE

This function creates a nice looking regression table for a polr MASS model. Input either a polr object or outcome variable, vector of covariates, method, and type of analysis (bivariate or multiple regression). The function returns a dataframe with regression coefficients. By default a table is also printed via htmlTable - handy for R markdown html reports. coefficients logistic odds ordered polr proportional regression table


lisaerein/daphne documentation built on May 21, 2019, 6:42 a.m.