powered by
Obtains the power given sample size or obtains the sample size given power for the Wilcoxon test for two-sample ordinal response.
getDesignTwoOrdinal( beta = NA_real_, n = NA_real_, ncats = NA_integer_, pi1 = NA_real_, pi2 = NA_real_, allocationRatioPlanned = 1, rounding = TRUE, alpha = 0.05 )
An S3 class designTwoOrdinal object with the following components:
designTwoOrdinal
power: The power to reject the null hypothesis.
power
alpha: The two-sided significance level.
alpha
n: The maximum number of subjects.
n
ncats: The number of categories of the ordinal response.
ncats
pi1: The prevalence of each category for the treatment group.
pi1
pi2: The prevalence of each category for the control group.
pi2
meanscore1: The mean midrank score for the treatment group.
meanscore1
meanscore2: The mean midrank score for the control group.
meanscore2
allocationRatioPlanned: Allocation ratio for the active treatment versus control.
allocationRatioPlanned
rounding: Whether to round up sample size.
rounding
The type II error.
The total sample size.
The number of categories of the ordinal response.
The prevalence of each category for the treatment group. Only need to specify the valued for the first ncats-1 categories.
ncats-1
The prevalence of each category for the control group. Only need to specify the valued for the first ncats-1 categories.
Allocation ratio for the active treatment versus control. Defaults to 1 for equal randomization.
Whether to round up sample size. Defaults to 1 for sample size rounding.
The significance level. Defaults to 0.025.
Kaifeng Lu, kaifenglu@gmail.com
(design1 <- getDesignTwoOrdinal( beta = 0.1, ncats = 4, pi1 = c(0.55, 0.3, 0.1), pi2 = c(0.214, 0.344, 0.251), alpha = 0.025))
Run the code above in your browser using DataLab