# NOT RUN {
# (a) Test for equality:
# The phsize function determines the sample size using proportional hazards assumption.
# The type = "equal" denotes the two survival curves are equal under the null hypothesis
# and the hazard rate of the control group is lambda1 = 1 and that of the test group is
# lambda2 = 2. The proportion of patients in the control group is prop = 0.5. The proba-
# bility of observing an event is 0.8. The level of significance is alpha = 0.05 and the
# probability of type-II error is beta = 0.20.
phsize(type = "equal", lambda1 = 1, lambda2 = 2, delta = 0, prop = 0.5,
d = 0.8, alpha = 0.05, beta = 0.20)
# (b) Test for non-inferiority/superiority:
# The phsize function determines the sample size using proportional hazards assumption.
# The type = "noninf.sup" denotes the difference of the two survival curves is less than
# or equal to the marginal value delta = 0.3. The hazard rate of the control group is
# lambda1 = 1 and that of the test group is lambda2 = 2. The proportion of patients in
# the control group is prop = 0.5, the probability of observing a event is 0.8 and level
# of significance is alpha = 0.05 and the probability of type-II error is beta = 0.20.
phsize(type = "noninf.sup", lambda1 = 1, lambda2 = 2, delta = 0.3, prop = 0.5,
d = 0.8, alpha = 0.05, beta = 0.20)
# (c) Test for equivalence:
# The phsize function determines the sample size using proportional hazards assumption.
# The type = "equiv", denotes whether absolute value of the differences between the two
# survival curves is greater than or equal to the marginal value delta = 0.5. The hazard
# rate of the control group is lambda1 = 1 and that of the test group is lambda2 = 2, &
# the proportion of patients in control group is prop = 0.5 and the probability of obs-
# erving a event ais 0.8. The level of significance is alpha = 0.05 and the probability
# of type-II error is beta = 0.20.
phsize(type = "equiv", lambda1 = 1, lambda2 = 1, delta = 0.5, prop = 0.5,
d = 0.8, alpha = 0.05, beta = 0.20)
# }
Run the code above in your browser using DataLab