Skip to contents

be_design() inspects the treatment-by-period pattern of a crossover study and reports the design type, the replication of the reference and test formulations, and which regulatory frameworks are feasible. Reference scaling (EMA/HC/GCC/FDA) requires the reference to be replicated; the narrow therapeutic index frameworks additionally require the test to be replicated.

Usage

be_design(data, subject, sequence, period, treatment, reference_value)

Arguments

data

A long data.frame with one row per concentration-derived observation (subject, period, treatment).

subject, sequence, period, treatment

Column names (length-1 character) identifying the subject, randomization sequence, period, and treatment. sequence may be NA to derive it from the treatment-by-period pattern.

reference_value

The value of treatment that is the reference formulation.

Value

An object of class be_design: a list with elements design (one of "parallel", "2x2x2", "full_replicate", "partial_replicate", "other"), n_sequences, n_periods, n_treatments, n_subjects, sequences, treatments, reference, replicate_reference, replicate_test, reps_reference, reps_test, balanced, and feasible (a named logical vector for abe, abel, rsabe, ntid, hvntid).

Examples

d <- data.frame(
  subject = rep(1:4, each = 4),
  period = rep(1:4, times = 4),
  sequence = rep(c("TRTR", "RTRT"), each = 8),
  treatment = c("T", "R", "T", "R", "R", "T", "R", "T",
                "T", "R", "T", "R", "R", "T", "R", "T")
)
be_design(d, "subject", "sequence", "period", "treatment", reference_value = "R")
#> Bioequivalence design: full_replicate
#>   2 sequence(s) (RTRT, TRTR), 4 period(s), 2 treatment(s), 4 subject(s), balanced
#>   Reference "R" replicated: TRUE (2/subject); test replicated: TRUE (2/subject)
#>   Feasible frameworks: ABE, ABEL, RSABE, NTID, HVNTID