# NOT RUN {
# (a) Comparison of means:
# This is a cluster randomized trials for unmatched cases. The type = "M", indicates the
# comparison of means of two groups taking a common cluster size m = 20. The mean value
# of group-1 and group-2 is u1 = 0.5 and u2 = 0.3 respectively. For group-1, the between
# -cluster standard deviation is sigma1.B = 0.3 and within-cluster standard deviation is
# sigma1.W = 0.3. Similarly, for group-2 those values are sigma2.B=0.3 and sigma2.W=0.3.
# The intra-cluster correlation coefficient (ICC) of group - 1 is rho1 = 0.2 and that of
# group - 2 is rho2 = 0.2. The level of significance is alpha = 0.05 and the probability
# of type-II error is beta = 0.20.
crt.unmatch(type = "M", m = 20, u1 = 0.5, u2 = 0.3, sigma1.B = 0.3, sigma1.W = 0.3,
sigma2.B = 0.3, sigma2.W = 0.3, rho1 = 0.2, rho2 = 0.2,
alpha = 0.05, beta = 0.20)
# (b) Comparison of proportions:
# This is a cluster randomized trials for unmatched cases. The type = "P", indicates the
# comparison of proportions of two groups taking a common cluster size m = 20. The prop-
# ortion of group-1 andgroup-2 is u1 = 0.5 and u2 = 0.3 respectively. For group - 1, the
# between-cluster standard deviation is sigma1.B = 0.3 and within-cluster standard devi-
# ation is sigma1.W = 0.3. Similarly, for group-2 the standard deviations are sigma2.B =
# 0.3 and sigma2.W = 0.3. The intra-cluster correlation coefficient(ICC) of group - 1 is
# rho1 = 0.2 and that of group-2 is rho2 = 0.2. The level of significance is alpha =0.05
# and the probability of type-II error is beta = 0.20.
crt.unmatch(type = "P", m = 20, u1 = 0.5, u2 = 0.3, sigma1.B = 0.3, sigma1.W = 0.3,
sigma2.B = 0.3, sigma2.W = 0.3, rho1 = 0.2, rho2 = 0.2,
alpha = 0.05, beta = 0.20)
# (c) Comparison of incidence rates:
# This is a cluster randomized trials for unmatched cases. The type = "IR" indicates the
# comparison of incidence rates of two groups taking a total of m = 20 person-years. The
# incidence rate of group-1 and group-2 is u1 = 0.5 and u2 = 0.3 respectively. For group
# -1, the between-cluster standard deviation is sigma1.B = 0.3 and within-cluster stand-
# ard deviation is sigma1.W = 0.3. Similarly, for group-2 the standard deviations are
# sigma2.B = 0.3 and sigma2.W = 0.3. The intra-cluster correlation coefficient (ICC) of
# group-1 is rho1 = 0.2 and that of group-2 is rho2 = 0.2. The level of significance is
# alpha = 0.05 and the probability of type-II error is beta = 0.20.
crt.unmatch(type = "IR", m = 20, u1 = 0.5, u2 = 0.3, sigma1.B = 0.3, sigma1.W = 0.3,
sigma2.B = 0.3, sigma2.W = 0.3, rho1 = 0.2, rho2 = 0.2,
alpha = 0.05, beta = 0.20)
# }
Run the code above in your browser using DataLab