| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/cmprsk.R |
| 3 |
\name{tidy.crr} |
| 4 |
\alias{tidy.crr} |
| 5 |
\alias{cmprsk_tidiers} |
| 6 |
\title{Tidy a(n) cmprsk object} |
| 7 |
\usage{ |
| 8 |
\method{tidy}{crr}(x, exponentiate = FALSE, conf.int = FALSE, conf.level = 0.95, ...) |
| 9 |
} |
| 10 |
\arguments{ |
| 11 |
\item{x}{A \code{crr} object returned from \code{\link[cmprsk:crr]{cmprsk::crr()}}.} |
| 12 |
|
| 13 |
\item{exponentiate}{Logical indicating whether or not to exponentiate the |
| 14 |
the coefficient estimates. This is typical for logistic and multinomial |
| 15 |
regressions, but a bad idea if there is no log or logit link. Defaults |
| 16 |
to \code{FALSE}.} |
| 17 |
|
| 18 |
\item{conf.int}{Logical indicating whether or not to include a confidence |
| 19 |
interval in the tidied output. Defaults to \code{FALSE}.} |
| 20 |
|
| 21 |
\item{conf.level}{The confidence level to use for the confidence interval |
| 22 |
if \code{conf.int = TRUE}. Must be strictly greater than 0 and less than 1. |
| 23 |
Defaults to 0.95, which corresponds to a 95 percent confidence interval.} |
| 24 |
|
| 25 |
\item{...}{Additional arguments. Not used. Needed to match generic |
| 26 |
signature only. \strong{Cautionary note:} Misspelled arguments will be |
| 27 |
absorbed in \code{...}, where they will be ignored. If the misspelled |
| 28 |
argument has a default value, the default value will be used. |
| 29 |
For example, if you pass \code{conf.lvel = 0.9}, all computation will |
| 30 |
proceed using \code{conf.level = 0.95}. Two exceptions here are: |
| 31 |
\itemize{ |
| 32 |
\item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if |
| 33 |
it will be ignored. |
| 34 |
\item \code{augment()} methods will warn when supplied a \code{newdata} argument if it |
| 35 |
will be ignored. |
| 36 |
}} |
| 37 |
} |
| 38 |
\description{ |
| 39 |
Tidy summarizes information about the components of a model. |
| 40 |
A model component might be a single term in a regression, a single |
| 41 |
hypothesis, a cluster, or a class. Exactly what tidy considers to be a |
| 42 |
model component varies across models but is usually self-evident. |
| 43 |
If a model has several distinct types of components, you will need to |
| 44 |
specify which components to return. |
| 45 |
} |
| 46 |
\examples{ |
| 47 |
\dontshow{if (rlang::is_installed("cmprsk")) withAutoprint(\{ # examplesIf} |
| 48 |
|
| 49 |
library(cmprsk) |
| 50 |
|
| 51 |
# time to loco-regional failure (lrf) |
| 52 |
lrf_time <- rexp(100) |
| 53 |
lrf_event <- sample(0:2, 100, replace = TRUE) |
| 54 |
trt <- sample(0:1, 100, replace = TRUE) |
| 55 |
strt <- sample(1:2, 100, replace = TRUE) |
| 56 |
|
| 57 |
# fit model |
| 58 |
x <- crr(lrf_time, lrf_event, cbind(trt, strt)) |
| 59 |
|
| 60 |
# summarize model fit with tidiers |
| 61 |
tidy(x, conf.int = TRUE) |
| 62 |
glance(x) |
| 63 |
\dontshow{\}) # examplesIf} |
| 64 |
} |
| 65 |
\seealso{ |
| 66 |
\code{\link[=tidy]{tidy()}}, \code{\link[cmprsk:crr]{cmprsk::crr()}} |
| 67 |
|
| 68 |
Other cmprsk tidiers: |
| 69 |
\code{\link{glance.crr}()} |
| 70 |
} |
| 71 |
\concept{cmprsk tidiers} |
| 72 |
\value{ |
| 73 |
A \code{\link[tibble:tibble]{tibble::tibble()}} with columns: |
| 74 |
\item{conf.high}{Upper bound on the confidence interval for the estimate.} |
| 75 |
\item{conf.low}{Lower bound on the confidence interval for the estimate.} |
| 76 |
\item{estimate}{The estimated value of the regression term.} |
| 77 |
\item{p.value}{The two-sided p-value associated with the observed statistic.} |
| 78 |
\item{statistic}{The value of a T-statistic to use in a hypothesis that the regression term is non-zero.} |
| 79 |
\item{std.error}{The standard error of the regression term.} |
| 80 |
|
| 81 |
} |