-
Notifications
You must be signed in to change notification settings - Fork 7
Closed as not planned
Description
In survtab(..., surv.method="lifetable") age-standardised estimate should be calculated, although an age-specific survival estimate would be 0. An example: age-standardised 5-year survival is missing, if patients in the oldest age group died within the first 1 year after diagnosis:
data("sire", package = "popEpi")
library(Epi)
library(survival)
library(data.table)
#include patients over 70 years of age who died within the first 1 year
sire <- sire[dg_age<70 | (dg_age>=70 & (ex_date-dg_date)<365 & status==1)]
x <- Lexis(entry = list(FUT = 0, AGE = dg_age, CAL = get.yrs(dg_date)),
exit = list(CAL = get.yrs(ex_date)),
data = sire[sire$dg_date < sire$ex_date, ],
exit.status = factor(status, levels = 0:2,
labels = c("alive", "canD", "othD")),
merge = TRUE)
data("popmort", package = "popEpi")
pm <- data.frame(popmort)
names(pm) <- c("sex", "CAL", "AGE", "haz")
## ICSS weights usage
data("ICSS", package = "popEpi")
cut <- c(0, 30, 50, 70, Inf)
agegr <- cut(ICSS$age, cut, right = FALSE)
w <- aggregate(ICSS1~agegr, data = ICSS, FUN = sum)
x$agegr <- cut(x$dg_age, cut, right = FALSE)
st <- survtab(FUT ~ 1, data = x, subset=dg_age>=70,
surv.type = "surv.rel",
pophaz = pm, weights = w$ICSS1,surv.method = "lifetable",
breaks = list(FUT = seq(0, 5, 1/12)))
summary(st,t=5) ##survival=0 in 70+ age group
st <- survtab(FUT ~ adjust(agegr), data = x,
surv.type = "surv.rel",
pophaz = pm, weights = w$ICSS1,surv.method = "lifetable",
breaks = list(FUT = seq(0, 5, 1/12)))
summary(st,t=5) ##This should be calculated, too.
Reactions are currently unavailable