nvDT: To calculate the least sample size required to achieve a...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/nvDT.R

Description

For the problem of comparing means of k treatment groups to the mean of one control group, the implementation of the function needs the following three assumptions: 1. The k treatment groups have identical treatment effect size. 2. The sample allocation ratio is pre-specified, and meanwhile the samples to be assigned to each of the k treatment groups are expected to be equal at size n. 3. The alternative hypotheses are one-sided. With the violations assumption 2, the sample size could not be evaluated numerically, and with the violation of assumption 1 and 3, the evaluation of sample size needs great computational effort and thus not implemented. In the situation, simulation-based evaluation is suggested.

Usage

1
nvDT(ratio,power,r,k,mu,mu0,contrast,sigma=NA,dist,alpha=0.05,mcs=1e+05,testcall)

Arguments

ratio

The pre-specified ratio of sample size in each of the treatment groups to the sample size in the control group

power

The power required to be achieved.

r

The least number of null hypotheses to be rejected, e.g.,when r=1, the sample size is evaluated on disjunctive power and when r=k, the sample size is evaluated on conjunctive power.

k

Number of hypotheses to be tested, k≥ 2 and k≤ 16.

mu

Assumed population mean in each of the k treatment groups.

mu0

Assumed population mean in the control group.

contrast

If mu and mu0 are concerned of means of continous outcome, specify contrast="means"; if mu and mu0 are concerned of proportions of binary outcome, specify contrast="props".

sigma

The population error variance, which should be specified when contrast="means"; if contrast="props", set sigma=NA as default and it will be calculated based on mu and mu0 specified within the function.

dist

Whether the sample size is calculated for t-distributed test statistics (dist="tdist") or standard normally distributed test statistics (dist="zdist").

alpha

The pre-specified overall significance level, default=0.05.

mcs

The number of monte-carlo sample points to numerically approximate the power for a given sample size, refer to Equation (4.3) and Equation (4.5) in Dunnett and Tamhane (1992).

testcall

The applied Dunnett test procedure: "SD"=step-down Dunnett test; "SU"=step-up Dunnett test.

Value

Return a LIST containing:

"least sample size required in each treatment groups"

value of n

"least sample size required in the control group"

value of n0

Author(s)

FAN XIA <phoebexia@yahoo.com>

References

Charles W. Dunnett and Ajit C. Tamhane. A step-up multiple test procedure. Journal of the American Statistical Association, 87(417):162-170, 1992.

See Also

powDT

Examples

1
nvDT(2, 0.95, r=1, k=3, mu=0.7, mu0=0.5, contrast="props",dist="zdist", testcall="SD")

DunnettTests documentation built on May 2, 2019, 9:13 a.m.