Learn R Programming

JWileymisc (version 0.3.1)

.detailedTestsVGLM: Calculates all pairwise contrasts and omnibus tests for multinomial regression

Description

TODO: make me!

Usage

.detailedTestsVGLM(obj, OR = TRUE, digits = 2L, pdigits = 3L)

Arguments

obj

A vglm class object, the fitted result of vglm(). At the moment only handles the multinomial family, although this may get expanded in the future.

OR

a logical value whether to report odds ratios and 95 percent confidence intervals, if TRUE, or regression coefficients on the logit scale with standard errors, if FALSE.

digits

An integer indicating the number of digits for coefficients, standard errors, and confidence intervals

pdigits

An integer indicating the number of digits for p-values.

Value

A list with two elements. Results contains a data table of the actual estimates. Table contains a nicely formatted character matrix.

Examples

Run this code
# NOT RUN {
mtcars$cyl <- factor(mtcars$cyl)
m <- VGAM::vglm(cyl ~ qsec,
  family = VGAM::multinomial(), data = mtcars)
.detailedTestsVGLM(m)

rm(m, mtcars)

# }
# NOT RUN {
mtcars$cyl <- factor(mtcars$cyl)
mtcars$am <- factor(mtcars$am)
m <- VGAM::vglm(cyl ~ qsec,
  family = VGAM::multinomial(), data = mtcars)
.detailedTestsVGLM(m)

.detailedTestsVGLM(m, digits = 4)$Table
.detailedTestsVGLM(m, OR = FALSE)
.detailedTestsVGLM(m, digits = 4, OR = FALSE)$Table

m <- VGAM::vglm(cyl ~ scale(qsec),
  family = VGAM::multinomial(), data = mtcars)
.detailedTestsVGLM(m)

m2 <- VGAM::vglm(cyl ~ factor(vs) * scale(qsec),
  family = VGAM::multinomial(), data = mtcars)
.detailedTestsVGLM(m2)

m <- VGAM::vglm(Species ~ Sepal.Length,
  family = VGAM::multinomial(), data = iris)
.detailedTestsVGLM(m)
# }

Run the code above in your browser using DataLab