| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/ordinal-clm.R |
| 3 |
\name{tidy.clm} |
| 4 |
\alias{tidy.clm} |
| 5 |
\alias{ordinal_tidiers} |
| 6 |
\title{Tidy a(n) clm object} |
| 7 |
\usage{ |
| 8 |
\method{tidy}{clm}( |
| 9 |
x, |
| 10 |
conf.int = FALSE, |
| 11 |
conf.level = 0.95, |
| 12 |
conf.type = c("profile", "Wald"), |
| 13 |
exponentiate = FALSE, |
| 14 |
... |
| 15 |
) |
| 16 |
} |
| 17 |
\arguments{ |
| 18 |
\item{x}{A \code{clm} object returned from \code{\link[ordinal:clm]{ordinal::clm()}}.} |
| 19 |
|
| 20 |
\item{conf.int}{Logical indicating whether or not to include a confidence |
| 21 |
interval in the tidied output. Defaults to \code{FALSE}.} |
| 22 |
|
| 23 |
\item{conf.level}{The confidence level to use for the confidence interval |
| 24 |
if \code{conf.int = TRUE}. Must be strictly greater than 0 and less than 1. |
| 25 |
Defaults to 0.95, which corresponds to a 95 percent confidence interval.} |
| 26 |
|
| 27 |
\item{conf.type}{Whether to use \code{"profile"} or \code{"Wald"} confidence |
| 28 |
intervals, passed to the \code{type} argument of \code{\link[ordinal:confint.clm]{ordinal::confint.clm()}}. |
| 29 |
Defaults to \code{"profile"}.} |
| 30 |
|
| 31 |
\item{exponentiate}{Logical indicating whether or not to exponentiate the |
| 32 |
the coefficient estimates. This is typical for logistic and multinomial |
| 33 |
regressions, but a bad idea if there is no log or logit link. Defaults |
| 34 |
to \code{FALSE}.} |
| 35 |
|
| 36 |
\item{...}{Additional arguments. Not used. Needed to match generic |
| 37 |
signature only. \strong{Cautionary note:} Misspelled arguments will be |
| 38 |
absorbed in \code{...}, where they will be ignored. If the misspelled |
| 39 |
argument has a default value, the default value will be used. |
| 40 |
For example, if you pass \code{conf.lvel = 0.9}, all computation will |
| 41 |
proceed using \code{conf.level = 0.95}. Two exceptions here are: |
| 42 |
\itemize{ |
| 43 |
\item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if |
| 44 |
it will be ignored. |
| 45 |
\item \code{augment()} methods will warn when supplied a \code{newdata} argument if it |
| 46 |
will be ignored. |
| 47 |
}} |
| 48 |
} |
| 49 |
\description{ |
| 50 |
Tidy summarizes information about the components of a model. |
| 51 |
A model component might be a single term in a regression, a single |
| 52 |
hypothesis, a cluster, or a class. Exactly what tidy considers to be a |
| 53 |
model component varies across models but is usually self-evident. |
| 54 |
If a model has several distinct types of components, you will need to |
| 55 |
specify which components to return. |
| 56 |
} |
| 57 |
\details{ |
| 58 |
In \verb{broom 0.7.0} the \code{coefficient_type} column was renamed to |
| 59 |
\code{coef.type}, and the contents were changed as well. |
| 60 |
|
| 61 |
Note that \code{intercept} type coefficients correspond to \code{alpha} |
| 62 |
parameters, \code{location} type coefficients correspond to \code{beta} |
| 63 |
parameters, and \code{scale} type coefficients correspond to \code{zeta} |
| 64 |
parameters. |
| 65 |
} |
| 66 |
\examples{ |
| 67 |
\dontshow{if (rlang::is_installed("ordinal")) withAutoprint(\{ # examplesIf} |
| 68 |
|
| 69 |
# load libraries for models and data |
| 70 |
library(ordinal) |
| 71 |
|
| 72 |
# fit model |
| 73 |
fit <- clm(rating ~ temp * contact, data = wine) |
| 74 |
|
| 75 |
# summarize model fit with tidiers |
| 76 |
tidy(fit) |
| 77 |
tidy(fit, conf.int = TRUE, conf.level = 0.9) |
| 78 |
tidy(fit, conf.int = TRUE, conf.type = "Wald", exponentiate = TRUE) |
| 79 |
|
| 80 |
glance(fit) |
| 81 |
augment(fit, type.predict = "prob") |
| 82 |
augment(fit, type.predict = "class") |
| 83 |
|
| 84 |
# ...and again with another model specification |
| 85 |
fit2 <- clm(rating ~ temp, nominal = ~contact, data = wine) |
| 86 |
|
| 87 |
tidy(fit2) |
| 88 |
glance(fit2) |
| 89 |
\dontshow{\}) # examplesIf} |
| 90 |
} |
| 91 |
\seealso{ |
| 92 |
\link{tidy}, \code{\link[ordinal:clm]{ordinal::clm()}}, \code{\link[ordinal:confint.clm]{ordinal::confint.clm()}} |
| 93 |
|
| 94 |
Other ordinal tidiers: |
| 95 |
\code{\link{augment.clm}()}, |
| 96 |
\code{\link{augment.polr}()}, |
| 97 |
\code{\link{glance.clm}()}, |
| 98 |
\code{\link{glance.clmm}()}, |
| 99 |
\code{\link{glance.polr}()}, |
| 100 |
\code{\link{glance.svyolr}()}, |
| 101 |
\code{\link{tidy.clmm}()}, |
| 102 |
\code{\link{tidy.polr}()}, |
| 103 |
\code{\link{tidy.svyolr}()} |
| 104 |
} |
| 105 |
\concept{ordinal tidiers} |
| 106 |
\value{ |
| 107 |
A \code{\link[tibble:tibble]{tibble::tibble()}} with columns: |
| 108 |
\item{conf.high}{Upper bound on the confidence interval for the estimate.} |
| 109 |
\item{conf.low}{Lower bound on the confidence interval for the estimate.} |
| 110 |
\item{estimate}{The estimated value of the regression term.} |
| 111 |
\item{p.value}{The two-sided p-value associated with the observed statistic.} |
| 112 |
\item{statistic}{The value of a T-statistic to use in a hypothesis that the regression term is non-zero.} |
| 113 |
\item{std.error}{The standard error of the regression term.} |
| 114 |
\item{term}{The name of the regression term.} |
| 115 |
|
| 116 |
} |