Learn R Programming

OneSampleLogRankTest (version 0.9.2)

oneSampleLogRankTest: Calculate One-Sample Log-Rank Test

Description

Calculate One-Sample Log-Rank Test

Usage

oneSampleLogRankTest(dataSurv, dataPop, type = c("exact", "approximate"))

Value

p-value for one-sample log-rank test

Arguments

dataSurv

Survival data

dataPop

Population data

type

Type of test

Examples

Run this code
# load data
data(dataSurv_small)
data(dataPop_2018_2021)

# Since the dataset is small run an exact test
oneSampleLogRankTest(dataSurv_small, dataPop_2018_2021, type = "exact")

Run the code above in your browser using DataLab