coxPretty | R Documentation |
DESCRIPCIO DE LA FUNCIO
coxPretty(
frml,
data,
summary.cox = "ht",
mod_original = FALSE,
title = NULL,
namevar = NULL,
...
)
frml |
a formula object, with the response on the left of a ~ operator, and the terms on the right. The response must be a survival object as returned by the Surv function. |
data |
data frame, list or environment (or object coercible by 'as.data.frame' to a data frame) containing the variables in the model. If they are not found in 'data', the variables are taken from 'environment(formula)'. |
summary.cox |
a character string; possible values are ht, r, no |
mod_original |
logical value, return original cox model. |
title |
Character vector containing the table's caption or title. |
namevar |
Character vector containing the variable name. |
dat <- data.frame(tm = c(rnorm(50,12*4,19), rnorm(50,12*2,12)),
ev = factor(sample(c("Vivo", "Muerto"), 100, replace = TRUE)) ,
iq = factor(c(rep("A",50), rep("B",50))), age = rnorm(100,22,6))
my_surv <- Surv(time = dat$tm, event = as.numeric(dat$ev) - 1)
# coxPretty(my_surv ~ iq + age , data = dat)
# coxPretty(my_surv ~ iq + age , data = dat,summary.cox = "r", mod_original = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.