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