| Type: | Package |
| Title: | Construction and a-Efficiency of Nested Partially Balanced Bipartite Block Designs |
| Version: | 1.0.0 |
| Maintainer: | Vinayaka <vinayaka.b3vs@gmail.com> |
| Description: | Construction and evaluation of nested partially balanced bipartite block (NPBBB) designs for comparing a set of test treatments with a set of control treatments under a nested (blocks within blocks) structure. Six systematic construction methods are provided: composing partially balanced bipartite block designs with nested balanced incomplete block designs; augmenting nested partially balanced incomplete block designs with controls; merging rows of group-divisible nested designs; direct construction from group-divisible schemes; and expansion of partially balanced incomplete block designs (Vinayaka et al. 2026: In press). The A-efficiencies of the block and sub-block classifications are computed against the A-optimal completely symmetric reference design, following the test-versus-control optimality framework of Gupta and Parsad (1996) <doi:10.1080/03610929608831743> and Vinayaka et al. (2024) <doi:10.1080/03610926.2023.2251623>. These designs are particularly suited to agricultural, animal husbandry, industrial, and clinical trials involving multiple standard checks under nested experimental conditions, such as multi-environment trials where field heterogeneity (blocks) and within-field variation (sub-blocks) must be controlled simultaneously. |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| Depends: | R (≥ 3.5.0) |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Config/roxygen2/version: | 8.0.0 |
| Packaged: | 2026-06-28 19:46:19 UTC; DELL |
| Author: | Vinayaka |
| Repository: | CRAN |
| Date/Publication: | 2026-07-04 07:30:02 UTC |
A-Value of an NPBBB Design for Test-Versus-Control Contrasts
Description
Returns the trace of the variance-covariance matrix of the
estimators of the v_1 v_2 elementary test-versus-control contrasts
\tau_i - \tau_j (i a test treatment, j a control treatment),
that is, the sum of their variances. When the information matrix is completely
symmetric within the test set and within the control set (which holds for the
A-optimal members of the catalogue) the value is computed in closed form from
the canonical quantities f_1, f_2, f_4, f_5 (the average diagonal and
off-diagonal entries of the test-test and control-control sub-matrices of
C). This reproduces the values reported in the design catalogues of
Vinayaka et al. (2026); see also Hedayat and Majumdar (1984) and Stufken
(1988).
Usage
a_value(design, v1, v2)
Arguments
design |
A matrix (or data frame) whose rows are the blocks or sub-blocks
and whose entries are the treatment labels. Test treatments must be labelled
|
v1 |
Number of test treatments. |
v2 |
Number of control treatments. |
Value
A single numeric value, the A-value (sum of variances of the
v_1 v_2 test-versus-control elementary contrasts).
References
Hedayat AS, Majumdar D (1984) A-optimal incomplete block designs for test treatment-control comparisons. Technometrics, 26, 363–370.
Stufken J (1988) On bounds for the efficiency of block designs for comparing test treatments with a control. Journal of Statistical Planning and Inference, 19, 361–372.
Vinayaka, Parsad R, Mandal BN, LN Vinaykumar (2026) Nested partially balanced bipartite block designs for comparing test treatments with multiple controls. Journal of Statistical Theory and Practice. (In press).
Examples
d <- rbind(c(1, 2, 5, 6), c(3, 4, 5, 6))
a_value(d, v1 = 4, v2 = 2)
A-Value of the A-Optimal Completely Symmetric Reference Design
Description
Computes the smallest attainable A-value (sum of variances of the
v_1 v_2 test-versus-control elementary contrasts) within the class of
connected (sub-)block designs that are completely symmetric in the test and in
the control treatments, for a control replication r_0. This is the
benchmark against which the A-efficiency is measured. The expression is the
nested-design analogue of the Hedayat-Majumdar / Stufken optimal A-value; see
Vinayaka et al. (2026).
Usage
a_value_optimal(v1, v2, b, k, r0)
Arguments
v1 |
Number of test treatments. |
v2 |
Number of control treatments. |
b |
Number of blocks (or sub-blocks) in the classification. |
k |
Block (or sub-block) size. |
r0 |
Replication of each control treatment in the classification. |
Value
A single numeric value, the optimal (minimum) A-value.
References
Hedayat AS, Majumdar D (1984) A-optimal incomplete block designs for test treatment-control comparisons. Technometrics, 26, 363–370.
Stufken J (1988) On bounds for the efficiency of block designs for comparing test treatments with a control. Journal of Statistical Planning and Inference, 19, 361–372.
Vinayaka, Parsad R, Mandal BN, LN Vinaykumar (2026) Nested partially balanced bipartite block designs for comparing test treatments with multiple controls. Journal of Statistical Theory and Practice. (In press).
Examples
# Optimal block-classification A-value for an NPBBB with v1 = 9, v2 = 2
a_value_optimal(v1 = 9, v2 = 2, b = 6, k = 10, r0 = 12)
Construct an NPBBB Design by Composing a PBBB Design with an NBIB Design
Description
Implements Method 1 of Vinayaka et al. (2026). Each block of a
partially balanced bipartite block (PBBB) design of size k^\prime is
replaced by a copy of a nested balanced incomplete block (NBIB) design on
v^{*} = k^\prime symbols, by identifying the k^\prime symbols of
the NBIB design with the k^\prime entries of the PBBB block.
Usage
construct_method1(pbbb_blocks, nbib_subblocks, q, v2 = 2)
Arguments
pbbb_blocks |
A list of integer vectors of common length |
nbib_subblocks |
A list of integer vectors over the symbols
|
q |
Number of sub-blocks per block of the NBIB design. |
v2 |
Number of control treatments in the PBBB design (default 2). |
Value
An object of class "npbbb": a list with the following components:
-
method: a character string naming the construction used.
-
v1, v2: numbers of test and control treatments.
-
parameters: a list of the design parameters
v1, v2, b1, b2, r1, r2, k1, k2, q. -
block_design: an integer matrix with
b1rows andk1columns; each row is a block written as its concatenated sub-blocks. -
subblock_design: an integer matrix with
b2rows andk2columns; each row is a sub-block. -
E1, E2: block and sub-block A-efficiencies.
-
efficiency: an object of class
"npbbb_efficiency"holding the underlying A-values and optimal references.
References
Vinayaka, Parsad R, Mandal BN, LN Vinaykumar (2026) Nested partially balanced bipartite block designs for comparing test treatments with multiple controls. Journal of Statistical Theory and Practice. (In press).
Examples
# PBBB design: 4 test treatments (1-4), 2 controls (5, 6); block size k' = 4
pbbb <- list(c(1,2,5,6), c(1,3,5,6), c(1,4,5,6),
c(2,3,5,6), c(2,4,5,6), c(3,4,5,6))
# NBIB on k' = 4 symbols from a one-factorisation of K4 (q = 2 sub-blocks/block)
nbib <- list(c(1,2), c(3,4), c(1,3), c(2,4), c(1,4), c(2,3))
d <- construct_method1(pbbb, nbib, q = 2, v2 = 2)
d
Construct an NPBBB Design by Augmenting an NPBIB Design with Controls
Description
Implements Method 2 of Vinayaka et al. (2026). Starting from a
nested partially balanced incomplete block (NPBIB) design with q
sub-blocks per block, v2 control treatments are added to every
sub-block. Because the controls appear in every sub-block, every test
treatment meets every control the same number of times and every pair of
controls co-occurs the same number of times; the resulting design is
completely symmetric in the controls and, whenever the parent NPBIB design is
itself well balanced, A-optimal for both classifications.
Usage
construct_method2(npbib_subblocks, q, v2 = 2)
Arguments
npbib_subblocks |
A list of integer vectors, one per sub-block of the
parent NPBIB design, giving its test treatments labelled |
q |
Number of sub-blocks per block of the parent NPBIB design. |
v2 |
Number of control treatments to add (default 2). |
Value
An object of class "npbbb": a list with the following components:
-
method: a character string naming the construction used.
-
v1, v2: numbers of test and control treatments.
-
parameters: a list of the design parameters
v1, v2, b1, b2, r1, r2, k1, k2, q. -
block_design: an integer matrix with
b1rows andk1columns; each row is a block written as its concatenated sub-blocks. -
subblock_design: an integer matrix with
b2rows andk2columns; each row is a sub-block. -
E1, E2: block and sub-block A-efficiencies.
-
efficiency: an object of class
"npbbb_efficiency"holding the underlying A-values and optimal references.
References
Vinayaka, Parsad R, Mandal BN, LN Vinaykumar (2026) Nested partially balanced bipartite block designs for comparing test treatments with multiple controls. Journal of Statistical Theory and Practice. (In press).
Examples
# L2-type NPBIB on v = 9 (Example 3.2 of Vinayaka et al. (2026))
sub <- list(c(1,2,3), c(4,5,6), c(1,2,3), c(7,8,9), c(4,5,6), c(7,8,9),
c(1,4,7), c(2,5,8), c(1,4,7), c(3,6,9), c(2,5,8), c(3,6,9))
d <- construct_method2(sub, q = 2, v2 = 2)
d
Construct an NPBBB Design by Merging Rows of a Group-Divisible NPBIB Design
Description
Implements Method 3 of Vinayaka et al. (2026). In a group-divisible
NPBIB design on v = mn treatments arranged in an m \times n array,
the treatments of v2 selected rows are each merged into a single
control treatment. The test treatments are the n(m - v_2) remaining
array entries, relabelled 1, ..., v1; the merged rows become controls
v1 + 1, ..., v1 + v2. A control may occur more than once in a sub-block
(see Note 3.1 of the paper); such multiplicities are retained.
Usage
construct_method3(
gd_npbib_subblocks,
m,
n,
q,
merge_rows = seq_len(v2),
v2 = 2
)
Arguments
gd_npbib_subblocks |
A list of integer vectors, one per sub-block of the
parent group-divisible NPBIB design, with treatments labelled
|
m |
Number of rows of the group-divisible scheme. |
n |
Number of treatments per row. |
q |
Number of sub-blocks per block. |
merge_rows |
Integer vector of length |
v2 |
Number of control treatments (default 2). |
Value
An object of class "npbbb": a list with the following components:
-
method: a character string naming the construction used.
-
v1, v2: numbers of test and control treatments.
-
parameters: a list of the design parameters
v1, v2, b1, b2, r1, r2, k1, k2, q. -
block_design: an integer matrix with
b1rows andk1columns; each row is a block written as its concatenated sub-blocks. -
subblock_design: an integer matrix with
b2rows andk2columns; each row is a sub-block. -
E1, E2: block and sub-block A-efficiencies.
-
efficiency: an object of class
"npbbb_efficiency"holding the underlying A-values and optimal references.
References
Vinayaka, Parsad R, Mandal BN, LN Vinaykumar (2026) Nested partially balanced bipartite block designs for comparing test treatments with multiple controls. Journal of Statistical Theory and Practice. (In press).
Examples
# Group-divisible NPBIB on v = m*n = 8 treatments (m = 4 rows, n = 2),
# with q = 2 sub-blocks per block; merge the first two rows into v2 = 2 controls
gd <- list(c(1,3), c(2,4), c(5,7), c(6,8), c(1,5), c(2,6),
c(3,7), c(4,8), c(1,7), c(2,8), c(3,5), c(4,6))
d <- construct_method3(gd, m = 4, n = 2, q = 2, merge_rows = c(1, 2), v2 = 2)
d
Construct an NPBBB Design Directly from a Group-Divisible Scheme
Description
Implements Method 4 of Vinayaka et al. (2026). The
v_1 = mn test treatments are arranged in an m \times n array. For
each row, n sub-blocks are formed, each consisting of one treatment
from that row together with all v2 controls; the n sub-blocks of
a row constitute a block. The construction yields an A-optimal design for both
classifications.
Usage
construct_method4(m, n, v2 = 2)
Arguments
m |
Number of rows (groups) of the group-divisible scheme. |
n |
Number of treatments per row. |
v2 |
Number of control treatments (default 2). |
Value
An object of class "npbbb": a list with the following components:
-
method: a character string naming the construction used.
-
v1, v2: numbers of test and control treatments.
-
parameters: a list of the design parameters
v1, v2, b1, b2, r1, r2, k1, k2, q. -
block_design: an integer matrix with
b1rows andk1columns; each row is a block written as its concatenated sub-blocks. -
subblock_design: an integer matrix with
b2rows andk2columns; each row is a sub-block. -
E1, E2: block and sub-block A-efficiencies.
-
efficiency: an object of class
"npbbb_efficiency"holding the underlying A-values and optimal references.
References
Vinayaka, Parsad R, Mandal BN, LN Vinaykumar (2026) Nested partially balanced bipartite block designs for comparing test treatments with multiple controls. Journal of Statistical Theory and Practice. (In press).
Examples
d <- construct_method4(m = 4, n = 3, v2 = 2)
d
Construct an NPBBB Design by Expanding the Size-4 Blocks of a PBIB Design
Description
Implements Method 5 of Vinayaka et al. (2026) (specific to
v2 = 2). Each block (x_1, x_2, x_3, x_4) of a PBIB design with
block size 4 is expanded, with the two controls 0_1, 0_2, into four
blocks of size 6 (each consisting of two sub-blocks of size 3): the
i-th block places x_i with both controls in one sub-block and the
remaining three treatments in the other.
Usage
construct_method5(pbib_blocks)
Arguments
pbib_blocks |
A list of integer vectors of length 4, the blocks of a PBIB
design with test treatments labelled |
Value
An object of class "npbbb" with v2 = 2: a list with the
following components:
-
method: a character string naming the construction used.
-
v1, v2: numbers of test and control treatments.
-
parameters: a list of the design parameters
v1, v2, b1, b2, r1, r2, k1, k2, q. -
block_design: an integer matrix with
b1rows andk1columns; each row is a block written as its concatenated sub-blocks. -
subblock_design: an integer matrix with
b2rows andk2columns; each row is a sub-block. -
E1, E2: block and sub-block A-efficiencies.
-
efficiency: an object of class
"npbbb_efficiency"holding the underlying A-values and optimal references.
References
Vinayaka, Parsad R, Mandal BN, LN Vinaykumar (2026) Nested partially balanced bipartite block designs for comparing test treatments with multiple controls. Journal of Statistical Theory and Practice. (In press).
Examples
# Singular GD design S1: v = 6, b = 3, k = 4
s1 <- list(c(1,2,3,4), c(1,2,5,6), c(3,4,5,6))
d <- construct_method5(s1)
d
Construct an NPBBB Design by Expanding the Size-2 Blocks of a PBIB Design
Description
Implements Method 6 of Vinayaka et al. (2026) (specific to
v2 = 2). Each block (x_1, x_2) of a PBIB design with block size 2
is expanded, with the two controls 0_1, 0_2, into three blocks of size 4
(two sub-blocks of size 2): [(x_1, x_2);(0_1, 0_2)],
[(x_1, 0_1);(x_2, 0_2)] and [(x_1, 0_2);(x_2, 0_1)].
Usage
construct_method6(pbib_blocks)
Arguments
pbib_blocks |
A list of integer vectors of length 2, the blocks of a PBIB
design with test treatments labelled |
Value
An object of class "npbbb" with v2 = 2: a list with the
following components:
-
method: a character string naming the construction used.
-
v1, v2: numbers of test and control treatments.
-
parameters: a list of the design parameters
v1, v2, b1, b2, r1, r2, k1, k2, q. -
block_design: an integer matrix with
b1rows andk1columns; each row is a block written as its concatenated sub-blocks. -
subblock_design: an integer matrix with
b2rows andk2columns; each row is a sub-block. -
E1, E2: block and sub-block A-efficiencies.
-
efficiency: an object of class
"npbbb_efficiency"holding the underlying A-values and optimal references.
References
Vinayaka, Parsad R, Mandal BN, LN Vinaykumar (2026) Nested partially balanced bipartite block designs for comparing test treatments with multiple controls. Journal of Statistical Theory and Practice. (In press).
Examples
# Semi-regular GD design SR1: v = 4, b = 4, k = 2
sr1 <- list(c(1,3), c(1,4), c(2,3), c(2,4))
d <- construct_method6(sr1)
d
Information Matrix of a (Sub-)Block Design for Test-Versus-Control Comparisons
Description
Computes the reduced (treatment) information matrix
C = R - N K^{-1} N^\prime for a single classification (blocks or
sub-blocks) of a nested partially balanced bipartite block (NPBBB) design.
Here R is the diagonal matrix of treatment replications, N is the
treatment-by-(sub-)block incidence matrix and K is the diagonal matrix
of (sub-)block sizes. Control treatments may occur more than once in a
(sub-)block (for example, designs obtained by merging rows of a
group-divisible scheme); such multiplicities are counted in N so that
C is the correct information matrix under the homoscedastic
fixed-effects nested model. For more details see Vinayaka et al. (2026).
Usage
info_matrix(design, v1, v2)
Arguments
design |
A matrix (or data frame) whose rows are the blocks or sub-blocks
and whose entries are the treatment labels. Test treatments must be labelled
|
v1 |
Number of test treatments. |
v2 |
Number of control treatments. |
Value
A numeric (v1 + v2) by (v1 + v2) information matrix
C.
References
Vinayaka, Parsad R, Mandal BN, LN Vinaykumar (2026) Nested partially balanced bipartite block designs for comparing test treatments with multiple controls. Journal of Statistical Theory and Practice. (In press).
Examples
# Two blocks of size 4 on 4 test treatments (1-4) and 2 controls (5, 6)
d <- rbind(c(1, 2, 5, 6), c(3, 4, 5, 6))
info_matrix(d, v1 = 4, v2 = 2)
Total Number of Experimental Units of an NPBBB Design
Description
Returns the total number of experimental units of a nested
partially balanced bipartite block design, N = b_2 k_2 = b_1 k_1.
Usage
n_units(x)
Arguments
x |
An object of class |
Value
A single numeric value, the total number of experimental units
N = b_2 k_2 = b_1 k_1.
Examples
d <- construct_method4(m = 3, n = 2, v2 = 2)
n_units(d)
A-Efficiency of an NPBBB Design
Description
Evaluates the A-efficiency of a nested partially balanced bipartite block design separately for its block and sub-block classifications. For each classification the A-efficiency is
E = A^{\mathrm{opt}} / A,
the ratio of the A-value of the A-optimal completely symmetric reference
design to the A-value of the design under study. A value of 1 means the
design is A-optimal for that classification. For more details see Vinayaka et
al. (2026).
Usage
npbbb_efficiency(block_design, subblock_design, v1, v2)
Arguments
block_design |
A matrix whose rows are the blocks (each block being the
concatenation of its sub-blocks) and whose entries are treatment labels
|
subblock_design |
A matrix whose rows are the sub-blocks, with the same labelling convention. |
v1 |
Number of test treatments. |
v2 |
Number of control treatments. |
Value
An object of class "npbbb_efficiency": a list with the following
components:
-
E1: block-classification A-efficiency.
-
E2: sub-block-classification A-efficiency.
-
A1, A2: A-values of the design under study (block and sub-block classifications, respectively).
-
A1_opt, A2_opt: A-values of the corresponding A-optimal completely symmetric reference designs.
-
v1, v2: numbers of test and control treatments.
References
Hedayat AS, Majumdar D (1984) A-optimal incomplete block designs for test treatment-control comparisons. Technometrics, 26, 363–370.
Stufken J (1988) On bounds for the efficiency of block designs for comparing test treatments with a control. Journal of Statistical Planning and Inference, 19, 361–372.
Vinayaka, Parsad R, Mandal BN, LN Vinaykumar (2026) Nested partially balanced bipartite block designs for comparing test treatments with multiple controls. Journal of Statistical Theory and Practice. (In press).
Examples
d <- construct_method4(m = 3, n = 2, v2 = 2)
npbbb_efficiency(d$block_design, d$subblock_design, v1 = d$v1, v2 = d$v2)
Print Method for NPBBB Designs
Description
Prints a nested partially balanced bipartite block design: its
construction method, design parameters, block and sub-block A-efficiencies
and, optionally, the full block layout with controls displayed as
0_1, 0_2, ....
Usage
## S3 method for class 'npbbb'
print(x, digits = 4, show_layout = TRUE, ...)
Arguments
x |
An object of class |
digits |
Number of significant digits used when printing the A-efficiencies. |
show_layout |
Logical; if |
... |
Further arguments passed to or from other methods. |
Value
The object x, invisibly.
Examples
d <- construct_method4(m = 3, n = 2, v2 = 2)
print(d)
print(d, show_layout = FALSE)
Print Method for NPBBB Efficiency Objects
Description
Prints the block and sub-block A-efficiencies of a nested partially
balanced bipartite block design held in an object of class
"npbbb_efficiency".
Usage
## S3 method for class 'npbbb_efficiency'
print(x, digits = 4, ...)
Arguments
x |
An object of class |
digits |
Number of significant digits used when printing the A-values and A-efficiencies. |
... |
Further arguments passed to or from other methods. |
Value
The object x, invisibly.
Examples
d <- construct_method4(m = 3, n = 2, v2 = 2)
print(d$efficiency)