| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/survival-cch.R |
| 3 |
\name{glance.cch} |
| 4 |
\alias{glance.cch} |
| 5 |
\title{Glance at a(n) cch object} |
| 6 |
\usage{ |
| 7 |
\method{glance}{cch}(x, ...) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{x}{An \code{cch} object returned from \code{\link[survival:cch]{survival::cch()}}.} |
| 11 |
|
| 12 |
\item{...}{Additional arguments. Not used. Needed to match generic |
| 13 |
signature only. \strong{Cautionary note:} Misspelled arguments will be |
| 14 |
absorbed in \code{...}, where they will be ignored. If the misspelled |
| 15 |
argument has a default value, the default value will be used. |
| 16 |
For example, if you pass \code{conf.lvel = 0.9}, all computation will |
| 17 |
proceed using \code{conf.level = 0.95}. Two exceptions here are: |
| 18 |
\itemize{ |
| 19 |
\item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if |
| 20 |
it will be ignored. |
| 21 |
\item \code{augment()} methods will warn when supplied a \code{newdata} argument if it |
| 22 |
will be ignored. |
| 23 |
}} |
| 24 |
} |
| 25 |
\description{ |
| 26 |
Glance accepts a model object and returns a \code{\link[tibble:tibble]{tibble::tibble()}} |
| 27 |
with exactly one row of model summaries. The summaries are typically |
| 28 |
goodness of fit measures, p-values for hypothesis tests on residuals, |
| 29 |
or model convergence information. |
| 30 |
|
| 31 |
Glance never returns information from the original call to the modeling |
| 32 |
function. This includes the name of the modeling function or any |
| 33 |
arguments passed to the modeling function. |
| 34 |
|
| 35 |
Glance does not calculate summary measures. Rather, it farms out these |
| 36 |
computations to appropriate methods and gathers the results together. |
| 37 |
Sometimes a goodness of fit measure will be undefined. In these cases |
| 38 |
the measure will be reported as \code{NA}. |
| 39 |
|
| 40 |
Glance returns the same number of columns regardless of whether the |
| 41 |
model matrix is rank-deficient or not. If so, entries in columns |
| 42 |
that no longer have a well-defined value are filled in with an \code{NA} |
| 43 |
of the appropriate type. |
| 44 |
} |
| 45 |
\examples{ |
| 46 |
\dontshow{if (rlang::is_installed(c("survival", "ggplot2"))) withAutoprint(\{ # examplesIf} |
| 47 |
|
| 48 |
# load libraries for models and data |
| 49 |
library(survival) |
| 50 |
|
| 51 |
# examples come from cch documentation |
| 52 |
subcoh <- nwtco$in.subcohort |
| 53 |
selccoh <- with(nwtco, rel == 1 | subcoh == 1) |
| 54 |
ccoh.data <- nwtco[selccoh, ] |
| 55 |
ccoh.data$subcohort <- subcoh[selccoh] |
| 56 |
|
| 57 |
# central-lab histology |
| 58 |
ccoh.data$histol <- factor(ccoh.data$histol, labels = c("FH", "UH")) |
| 59 |
|
| 60 |
# tumour stage |
| 61 |
ccoh.data$stage <- factor(ccoh.data$stage, labels = c("I", "II", "III", "IV")) |
| 62 |
ccoh.data$age <- ccoh.data$age / 12 # age in years |
| 63 |
|
| 64 |
# fit model |
| 65 |
fit.ccP <- cch(Surv(edrel, rel) ~ stage + histol + age, |
| 66 |
data = ccoh.data, |
| 67 |
subcoh = ~subcohort, id = ~seqno, cohort.size = 4028 |
| 68 |
) |
| 69 |
|
| 70 |
# summarize model fit with tidiers + visualization |
| 71 |
tidy(fit.ccP) |
| 72 |
|
| 73 |
# coefficient plot |
| 74 |
library(ggplot2) |
| 75 |
|
| 76 |
ggplot(tidy(fit.ccP), aes(x = estimate, y = term)) + |
| 77 |
geom_point() + |
| 78 |
geom_errorbarh(aes(xmin = conf.low, xmax = conf.high), height = 0) + |
| 79 |
geom_vline(xintercept = 0) |
| 80 |
\dontshow{\}) # examplesIf} |
| 81 |
} |
| 82 |
\seealso{ |
| 83 |
\code{\link[=glance]{glance()}}, \code{\link[survival:cch]{survival::cch()}} |
| 84 |
|
| 85 |
Other cch tidiers: |
| 86 |
\code{\link{glance.survfit}()}, |
| 87 |
\code{\link{tidy.cch}()} |
| 88 |
|
| 89 |
Other survival tidiers: |
| 90 |
\code{\link{augment.coxph}()}, |
| 91 |
\code{\link{augment.survreg}()}, |
| 92 |
\code{\link{glance.aareg}()}, |
| 93 |
\code{\link{glance.coxph}()}, |
| 94 |
\code{\link{glance.pyears}()}, |
| 95 |
\code{\link{glance.survdiff}()}, |
| 96 |
\code{\link{glance.survexp}()}, |
| 97 |
\code{\link{glance.survfit}()}, |
| 98 |
\code{\link{glance.survreg}()}, |
| 99 |
\code{\link{tidy.aareg}()}, |
| 100 |
\code{\link{tidy.cch}()}, |
| 101 |
\code{\link{tidy.coxph}()}, |
| 102 |
\code{\link{tidy.pyears}()}, |
| 103 |
\code{\link{tidy.survdiff}()}, |
| 104 |
\code{\link{tidy.survexp}()}, |
| 105 |
\code{\link{tidy.survfit}()}, |
| 106 |
\code{\link{tidy.survreg}()} |
| 107 |
} |
| 108 |
\concept{cch tidiers} |
| 109 |
\concept{survival tidiers} |
| 110 |
\value{ |
| 111 |
A \code{\link[tibble:tibble]{tibble::tibble()}} with exactly one row and columns: |
| 112 |
\item{iter}{Iterations of algorithm/fitting procedure completed.} |
| 113 |
\item{p.value}{P-value corresponding to the test statistic.} |
| 114 |
\item{rscore}{Robust log-rank statistic} |
| 115 |
\item{score}{Score.} |
| 116 |
\item{n}{number of predictions} |
| 117 |
\item{nevent}{number of events} |
| 118 |
|
| 119 |
} |