Learn R Programming

carat (version 1.3)

AdjBCD.sim: Covariate-adjusted Biased Coin Design with Covariate Data Generating Mechanism

Description

Allocates patients to one of two treatments based on the covariate-adjusted biased coin design as proposed by Baldi Antognini A, Zagoraiou M (2011) <Doi:10.1093/biomet/asr021>, by simulating the covariates-profile under the assumption of independence between covariates and levels within each covariate.

Usage

AdjBCD.sim(n = 1000, cov_num = 2, level_num = c(2, 2), 
           pr = rep(0.5, 4), a = 2)

Arguments

n

the number of patients. The default is 1000.

cov_num

the number of covariates. The default if 2.

level_num

a vector of level numbers for each covariate. Hence the length of level_num should be equal to the number of covariates. The default is c(2,2).

pr

a vector of probabilities. Under the assumption of independence between covariates, pr is a vector containing probabilities for each levels of each covariates. The length of pr should correspond to the number of all levels, and the vector sum of pr should be equal to cov_num. The default is pr = rep(0.5, 4), which implies that cov_num = 2, and level_num = c(2, 2).

a

a design parameter. The default is 2. As a goes to \(\infty\), the design becomes more deterministic.

Value

See AdjBCD.

Details

See AdjBCD.

See Also

See AdjBCD for allocating patients with complete covariate data; See AdjBCD.ui for the command-line user interface.