# NOT RUN {
set.seed(1234)
LRPower(total.sample.size=160, type.I.error = 0.05, effect.size=0.2,
simulation.n=1000,group.sample.size.ratio=1, reference.group.incidence=0.5)
# }
# NOT RUN {
LRPower(total.sample.size=160, effect.size=0.5)
LRPower(total.sample.size=160, effect.size=0.8)
total.sample.size <- 160
effect.size <- c(1:20)/20
power <- sapply(effect.size, function(x){
LRPower(total.sample.size, effect.size=x, simulation.n=100)
})
plot(effect.size, power,
main=paste("Log-rank Test Power Calculation (n=", total.sample.size,")", sep=""),
type="b")
# }
Run the code above in your browser using DataLab