| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/nnet.R |
| 3 |
\name{tidy.multinom} |
| 4 |
\alias{tidy.multinom} |
| 5 |
\alias{multinom_tidiers} |
| 6 |
\alias{nnet_tidiers} |
| 7 |
\title{Tidying methods for multinomial logistic regression models} |
| 8 |
\usage{ |
| 9 |
\method{tidy}{multinom}(x, conf.int = FALSE, conf.level = 0.95, exponentiate = FALSE, ...) |
| 10 |
} |
| 11 |
\arguments{ |
| 12 |
\item{x}{A \code{multinom} object returned from \code{\link[nnet:multinom]{nnet::multinom()}}.} |
| 13 |
|
| 14 |
\item{conf.int}{Logical indicating whether or not to include a confidence |
| 15 |
interval in the tidied output. Defaults to \code{FALSE}.} |
| 16 |
|
| 17 |
\item{conf.level}{The confidence level to use for the confidence interval |
| 18 |
if \code{conf.int = TRUE}. Must be strictly greater than 0 and less than 1. |
| 19 |
Defaults to 0.95, which corresponds to a 95 percent confidence interval.} |
| 20 |
|
| 21 |
\item{exponentiate}{Logical indicating whether or not to exponentiate the |
| 22 |
the coefficient estimates. This is typical for logistic and multinomial |
| 23 |
regressions, but a bad idea if there is no log or logit link. Defaults |
| 24 |
to \code{FALSE}.} |
| 25 |
|
| 26 |
\item{...}{Additional arguments. Not used. Needed to match generic |
| 27 |
signature only. \strong{Cautionary note:} Misspelled arguments will be |
| 28 |
absorbed in \code{...}, where they will be ignored. If the misspelled |
| 29 |
argument has a default value, the default value will be used. |
| 30 |
For example, if you pass \code{conf.lvel = 0.9}, all computation will |
| 31 |
proceed using \code{conf.level = 0.95}. Two exceptions here are: |
| 32 |
\itemize{ |
| 33 |
\item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if |
| 34 |
it will be ignored. |
| 35 |
\item \code{augment()} methods will warn when supplied a \code{newdata} argument if it |
| 36 |
will be ignored. |
| 37 |
}} |
| 38 |
} |
| 39 |
\description{ |
| 40 |
These methods tidy the coefficients of multinomial logistic regression |
| 41 |
models generated by \code{multinom} of the \code{nnet} package. |
| 42 |
} |
| 43 |
\examples{ |
| 44 |
\dontshow{if (rlang::is_installed(c("nnet", "MASS"))) withAutoprint(\{ # examplesIf} |
| 45 |
|
| 46 |
# load libraries for models and data |
| 47 |
library(nnet) |
| 48 |
library(MASS) |
| 49 |
|
| 50 |
example(birthwt) |
| 51 |
|
| 52 |
bwt.mu <- multinom(low ~ ., bwt) |
| 53 |
|
| 54 |
tidy(bwt.mu) |
| 55 |
glance(bwt.mu) |
| 56 |
|
| 57 |
# or, for output from a multinomial logistic regression |
| 58 |
fit.gear <- multinom(gear ~ mpg + factor(am), data = mtcars) |
| 59 |
tidy(fit.gear) |
| 60 |
glance(fit.gear) |
| 61 |
\dontshow{\}) # examplesIf} |
| 62 |
} |
| 63 |
\seealso{ |
| 64 |
\code{\link[=tidy]{tidy()}}, \code{\link[nnet:multinom]{nnet::multinom()}} |
| 65 |
|
| 66 |
Other multinom tidiers: |
| 67 |
\code{\link{glance.multinom}()} |
| 68 |
} |
| 69 |
\concept{multinom tidiers} |
| 70 |
\value{ |
| 71 |
A \code{\link[tibble:tibble]{tibble::tibble()}} with columns: |
| 72 |
\item{conf.high}{Upper bound on the confidence interval for the estimate.} |
| 73 |
\item{conf.low}{Lower bound on the confidence interval for the estimate.} |
| 74 |
\item{estimate}{The estimated value of the regression term.} |
| 75 |
\item{p.value}{The two-sided p-value associated with the observed statistic.} |
| 76 |
\item{statistic}{The value of a T-statistic to use in a hypothesis that the regression term is non-zero.} |
| 77 |
\item{std.error}{The standard error of the regression term.} |
| 78 |
\item{term}{The name of the regression term.} |
| 79 |
\item{y.value}{The response level.} |
| 80 |
|
| 81 |
} |