View source: R/postestimation.R
tidy.risks | R Documentation |
Obtain a tibble (data frame) with parameters, coefficients, standard errors, confidence limits, and p-values. A column with the type of model fitted is added.
## S3 method for class 'risks'
tidy(
x,
conf.int = TRUE,
conf.level = 0.95,
bootrepeats = 1000,
bootci = c("bca", "normal", "nonpar"),
bootverbose = FALSE,
exponentiate = FALSE,
default = TRUE,
...
)
x |
Model |
conf.int |
Show confidence intervals? |
conf.level |
Optional. Confidence level. Defaults to |
bootrepeats |
Optional. Number of bootstrap repeats.
Applicable to models fitted via marginal standardization and bootstrapping
( |
bootci |
Optional and applicable for
|
bootverbose |
Optional. Add values of |
exponentiate |
Optional. Exponentiate coefficients and confidence
limits? Defaults to FALSE. Setting |
default |
Use default, normality-based confidence intervals?
Defaults to TRUE. With |
... |
Passed on |
If multiple types of models are fitted, tidy()
can be used
to parameters for all models at once, in one tibble. The last
column of the tibble includes the name of the model. See examples.
tibble
# Define example data
library(broom) # provides tidy() function
# Fit and tidy the model
fit_rr <- riskratio(
formula = death ~ stage + receptor,
data = breastcancer)
tidy(fit_rr)
# Marginal standardization,
# increase number of bootstrap repeats:
fit_rr <- riskratio(
formula = death ~ stage + receptor,
data = breastcancer,
approach = "margstd_boot")
tidy(fit_rr, bootrepeats = 2000)
# Multiple types of models fitted:
fit_rr <- riskratio(
formula = death ~ stage + receptor,
data = breastcancer,
approach = "all")
tidy(fit_rr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.