BSD {covadap}R Documentation

Big Stick Design

Description

Implements the Big Stick Design by Soares and Wu (1963) for assigning patients to two treatments A and B. The procedure works with qualitative covariates only.

Usage

BSD(data, bound = 3, print.results = TRUE)

Arguments

data

a data frame or a matrix. Each row of data corresponds to the covariate profile of a patient.

bound

integer parameter representing the maximum tolerated imbalance. The default value is set to 3.

print.results

logical. If TRUE a summary of the results is printed.

Details

The function assigns patients to treatments A or B with the Big Stick Design as described in Soares and Wu (1983).

The argument bound is the maximum tolerated imbalance that the experiment can accept: complete randomization is used as long as the imbalance of the treatment allocation does not exceed bound. When the imbalance reaches the value set in bound, a deterministic assignment is made to lower the imbalance.

At the end of the study the imbalance measures reported are the loss of estimation precision as described in Atkinson (1982), the Mahalanobis distance and the overall imbalance, defined as the difference in the total number of patients assigned to treatment A and B. The strata imbalances measures report, for each stratum, the total number of patients assigned (N.strata), the number of patients assigned to A (A.strata) and the within-stratum imbalance (D.strata), calculated as 2*A.strata-N.strata. The within-covariate imbalances report, for each level of each qualitative covariate, the difference in the number of patients assigned to A and B. See also Value.

Value

It returns an object of class "covadap", which is a list containing the following elements:

summary.info

Design name of the design,

Sample_size number of patients,

n_cov number of covariates,

n_levels number of levels of each covariate,

var_names name of covariates and levels,

parameter_a design parameter (see above).

Assignments

a vector with the treatment assignments.

Imbalances.summary

summary of overall imbalance measures at the end of the study (Loss loss, Mahal Mahalanobis distance, overal.imb difference in the total number of patients assigned to A and B).

Strata.measures

a data frame containing for each possiblue stratum the corresponding imbalances: N.strata is the total number of patients assigned to the stratum; A.strata is the total number of patients assigned to A within the stratum; D.strata is the within-stratum imbalance, i.e. difference in the total number of patients assigned to A and B within the stratum.

Imbalances

a list containing all the imbalance measures:

Imb.measures (Loss loss, Mahal Mahalanobis distance),

Overall.imb difference in the total number of patients assigned to A and B,

Within.strata within-stratum imbalance for all strata,

Within.cov within-covariate imbalance: difference in the number of patients assigned to A and B for each level of each qualitative covariate.

data

the data provided in input.

observed.strata

a data frame with all the observed strata.

References

Soares F, Wu CFJ. Some restricted randomization rules in sequential designs. Communications in Statistics Theory and Methods 1963, 12: 2017-2034.

Atkinson A. C. Optimum biased coin designs for sequential clinical trials with prognostic factors. Biometrika, 1982, 69(1): 61-67.

See Also

See Also as BSD.sim for allocating patients by simulating their covariate profiles.

Examples

require(covadap)

# Create a sample dataset
df1 <- data.frame("gender" = sample(c("female", "male"), 100, TRUE, c(1 / 3, 2 / 3)),
                 "age" = sample(c("18-35", "36-50", ">50"), 100, TRUE),
                 "bloodpressure" = sample(c("normal", "high", "hyper"), 100, TRUE),
                                   stringsAsFactors = TRUE)
# To just view a summary of the metrics of the design
BSD(data = df1, bound = 3, print.results = TRUE)
# To view a summary and create a list containing all the metrics of the design
res <- BSD(data = df1, bound = 3, print.results = TRUE)
res

[Package covadap version 1.0.1 Index]