tidy.flexsurvreg | R Documentation |
Tidy summarizes information about the components of the model into a tidy data frame.
## S3 method for class 'flexsurvreg'
tidy(
x,
conf.int = FALSE,
conf.level = 0.95,
pars = "all",
transform = "none",
...
)
x |
Output from |
conf.int |
Logical. Should confidence intervals be returned? Default is |
conf.level |
The confidence level to use for the confidence interval if |
pars |
One of |
transform |
Character vector of transformations to apply to requested Users can specify one or both types of transformations:
See |
... |
Not currently used. |
flexsurvreg
models estimate two types of coefficients, baseline distribution parameters, and covariate effects which act on the baseline distribution. By design, flexsurvreg
returns distribution parameters on the same scale as is found in the relevant d/p/q/r
functions. Covariate effects are returned on the log-scale, which represents either log-time ratios (accelerated failure time models) or log-hazard ratios for proportional hazard models. By default, tidy()
will return baseline distribution parameters on their natural scale and covariate effects on the log-scale.
To transform the baseline distribution parameters to the real-value number line (the scale used for estimation), pass the character argument "baseline.real"
to transform
. To get time ratios or hazard ratios, pass "coefs.exp"
to transform
. These transformations may be done together by submitting both arguments as a character vector.
A tibble
containing the columns: term
, estimate
, std.error
, statistic
, p.value
, conf.low
, and conf.high
, by default.
statistic
and p.value
are only provided for covariate effects (NA
for baseline distribution parameters). These are computed as Wald-type test statistics with p-values from a standard normal distribution.
fitg <- flexsurvreg(formula = Surv(futime, fustat) ~ age, data = ovarian, dist = "gengamma")
tidy(fitg)
tidy(fitg, pars = "coefs", transform = "coefs.exp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.