# NOT RUN {
# (a) Test for equality:
# This is a parallel study design. The type = "equal" tests the equality of mean respon-
# ses of a test drug (mu1 = 12) and a reference drug (mur = 8). The common standard dev-
# iation of the drugs is s = 5. k = 2 indicates the ratio of the sample sizes of the two
# groups. alpha = 0.05 is the level of significance and the probability of type-II error
# is beta = 0.10. The proportion of factor- 1 and factor-2 are taken to be r1 = 0.6 and
# r2 = 0.6 respectively.
prsize(type="equal", mu1=12, mu2=8, s=5, alpha=0.05, beta=0.10, k=2, r1=0.6, r2=0.6)
# (b) Test for superiority/noninferiority:
# This is a Parallel design. The type = "noninf.sup" test whether the difference of mean
# responses of a test drug (mu1 = 12) and a reference drug (mu2 = 8) being greater than
# or equal to the marginal value delta = 0.8. s = 5 is the common standard deviation of
# the drugs. The value k = 2 indicates the ratio of the sample sizes of the two groups.
# alpha = 0.05 is the level of significance and the probability of type-II error is beta
# = 0.10. The proportion of factor-1 and factor-2 are taken to be r1 = 0.6 and r2 = 0.6
# respectively.
prsize(type="noninf.sup", mu1=12, mu2=8, s=5, alpha=0.05, beta=0.10, k=2, r1=0.6,
r2=0.6, del=0.8)
# (c) Test for equivalence:
# This is a Parallel design. The type = "equiv" tests whether the absolute value of the
# difference of mean responses of a test drug (mu1 = 12) and a reference drug (mu2 = 8)
# being less than or equal to the marginal value delta = 0.8. The number of responses
# are m = 4 observed from each subject in each sequence.The s = 5 is the common standard
# deviation of the drugs. The value k = 2 indicates the ratio of the sample sizes of the
# two groups. The alpha = 0.05 is the level of significance and the probability of type
# -II error is beta = 0.10. The proportion of factor-1 (r1) and factor-2 (r2) both are
# taken to be equal to 0.6.
prsize(type="equiv", mu1=12, mu2=8, s=5, alpha=0.05, beta=0.10, k=2, r1=0.6,
r2=0.6, del=0.8)
# }
Run the code above in your browser using DataLab