quickSurv: quickSurv Function

View source: R/quickSurv.R

quickSurvR Documentation

quickSurv Function

Description

Realiza supervivencia Kaplan Meier, cox para variables cuali y cuanti

Usage

#' @usage \method{names}{mtc_bis}(x) <- value

Arguments

time

for right censored data, this is the follow up time. For interval data, the first argument is the starting time for the interval.

event

the status indicator. Factor with two levels

tag.event

A character value. Level of event

covariate

variables a evaluar

data

an optional matrix or data frame (or similar: see model.frame) containing the variables in the formula formula.

do.plot

A logical value indicating if show plot. Default value is TRUE.

pval.plot

A logical value indicating if show pvalue at plot. Default value is TRUE.

title.plot

a title for the plot.

summary.km

type of table to produce for Kaplan-Meier summary. Possible values for type are "ht", "r" or "no". Default value is "ht".

do.cox

A logical value indicating if show cox regression. Default value is TRUE.

summary.cox

type of table to produce for Kaplan-Meier summary. Possible values for type are "ht", "r" or "no". Default value is "ht".

title.cox

a title for the Cox regression.

pval.cut

Pvalor que s'utlitza per mostrar el Cox. Per defecte 0.05

Value

results:

coeff:

plot

Author(s)

Miriam Mota miriam.mota@vhir.org

Examples


# set.seed(81)
# 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))
#
# quickSurv(time = tm,event = ev, covariate = age, tag.event = "Muerto",
#          data = dat, do.cox = TRUE,summary.cox = "ht")


# quickSurv(time = tm,event = ev, covariate = iq, tag.event = "Muerto",
#           data = dat, surv.median.line = "hv",
#           cox = TRUE, summary.cox = "ht" )

# quickSurv(time = tm,event = ev, covariate = iq, tag.event = "Muerto",
#           data = dat, surv.median.line = "hv", cumevents = TRUE,
#          cox = TRUE, summary.cox = "ht")

uebvhir/anaStatsUEB documentation built on May 6, 2023, 3:46 a.m.