library("survival")
Warning messages:
1: In readChar(file, size, TRUE) : truncating string with embedded nuls
2: In readChar(file, size, TRUE) : truncating string with embedded nuls
#datos
df <- read_csv("https://docs.google.com/spreadsheets/d/e/2PACX-1vQ-oM6VFHCBg56GKR3hloRLSRpamlDwi3nZsGQYVD3-Pz-twI7tw-ixdXqfq1eTXw/pub?gid=1757501195&single=true&output=csv")
Error in read_csv("https://docs.google.com/spreadsheets/d/e/2PACX-1vQ-oM6VFHCBg56GKR3hloRLSRpamlDwi3nZsGQYVD3-Pz-twI7tw-ixdXqfq1eTXw/pub?gid=1757501195&single=true&output=csv") :
could not find function "read_csv"
#objeto kaplan
melanom.surv <- Surv(df$Seguimiento.M., df$status==1)
Error in Surv(df$Seguimiento.M., df$status == 1) :
could not find function "Surv"
#summary
summary(kaplan.km)
Call: survfit(formula = kaplan ~ 1, data = df, type = "kaplan-meier")
time n.risk n.event survival std.err lower 95% CI upper 95% CI
1 115 1 0.991 0.00866 0.974 1.000
4 114 1 0.983 0.01219 0.959 1.000
8 108 2 0.964 0.01748 0.931 0.999
12 99 2 0.945 0.02189 0.903 0.989
#curva supervivencia
#riesgo acumulado
#Estimacion de la supervivencia (ESTIMACIÓN DE LA MEDIA, MEDIANA Y PERCENTILES DE LOS TIEMPOS DE SUPERVIVENCIA)
print(kaplan.km, print.rmean = TRUE)
Call: survfit(formula = kaplan ~ 1, data = df, type = "kaplan-meier")
n events *rmean *se(rmean) median 0.95LCL 0.95UCL
115.00 6.00 138.38 3.03 NA NA NA
* restricted mean with upper limit = 146