test_logrank_hr_1binary: Power Analysis for Log Rank Tests with a Single Binary...

Description Usage Arguments Details Author(s) References Examples

View source: R/test_logrank_hr_1binary.R

Description

Calculates the power, number of deaths, proportion to be randomized, significance, or hazard ratio for a log-rank test of a Kaplan-Meier curve with a single binary covariate.

Usage

1
2
test_logrank_hr_1binary(hr = NULL, deaths = NULL, p = 0.5, alpha = 0.05,
  power = 0.8)

Arguments

hr

Hazard ratio

deaths

Number of deaths

p

proportion of subjects to be randomized to the first group. The format of this argument will eventually change.

alpha

significance level for the test

power

Power of the test

Details

This function is currently in development and will undergo serious changes. Among the changes: 1) p will be changed to a 'weights' style argument; 2) follow up time and recruitment interval will be incorporated; 3) event rates may be incorporated so as to calculate the sample size instead of the number of deaths.

Author(s)

Benjamin Nutter

References

Schoenfeld DA. Sample-size formula for the proportional-hazards regression model. Biometrics 1983;39:499-503

Examples

1
2
#* Example from Schoenfeld (doesn't incorporate recruitment and follow-up periods)
test_logrank_hr_1binary(hr=1.5, p=.25)

nutterb/junkyard documentation built on May 24, 2019, 10:51 a.m.