findMatchedCumuSurvProb {OneSampleLogRankTest} | R Documentation |
Find Matched Cumulative Survival Probability
Description
Find Matched Cumulative Survival Probability
Usage
findMatchedCumuSurvProb(time, ageDiag, sex, race, dataPop, maxFollowUp = NULL)
Arguments
time |
follow up length |
ageDiag |
age at diagnosis |
sex |
sex |
race |
race |
dataPop |
Population level mortality data |
maxFollowUp |
maximum follow-up, if max follow-up not provided then the time would be considered until death or censoring |
Value
matched survival probability
Examples
# load data
data(dataSurv_small)
data(dataPop_2018_2021)
# Extract info for the first subject
time_vec <- dataSurv_small$time[1]
age_vec <- dataSurv_small$age[1]
sex_vec <- dataSurv_small$sex[1]
race_vec <- dataSurv_small$race[1]
# Generate cumulative survival probability
findMatchedCumuSurvProb(time = time_vec, ageDiag = age_vec, sex = sex_vec,
race = race_vec, dataPop = dataPop_2018_2021)
#If maximum followup is determined to be 20 years
findMatchedCumuSurvProb(time = time_vec, ageDiag = age_vec, sex = sex_vec,
race = race_vec, dataPop = dataPop_2018_2021, maxFollowUp = 20)
[Package OneSampleLogRankTest version 0.9.2 Index]