Title: A-Optimal Block Designs for Comparing Test Treatments with Controls
Version: 0.0.3
Date: 2024-01-25
Author: Baidya Nath Mandal [aut, cre], Sukanta Dash [aut], Rajender Parsad [aut]
Maintainer: Baidya Nath Mandal <mandal.stat@gmail.com>
Depends: R (≥ 3.4.0), lpSolve, MASS
Description: A collection of functions to construct A-optimal block designs for comparing test treatments with one or more control(s). Mainly A-optimal balanced treatment incomplete block designs, weighted A-optimal balanced treatment incomplete block designs, A-optimal group divisible treatment designs and A-optimal balanced bipartite block designs can be constructed using the package. The designs are constructed using algorithms based on linear integer programming. To the best of our knowledge, these facilities to construct A-optimal block designs for comparing test treatments with one or more controls are not available in the existing R packages. For more details on designs for tests versus control(s) comparisons, please see Hedayat, A. S. and Majumdar, D. (1984) <doi:10.1080/00401706.1984.10487989> A-Optimal Incomplete Block Designs for Control-Test Treatment Comparisons, Technometrics, 26, 363-370 and Mandal, B. N. , Gupta, V. K., Parsad, Rajender. (2017) <doi:10.1080/03610926.2015.1071394> Balanced treatment incomplete block designs through integer programming. Communications in Statistics - Theory and Methods 46(8), 3728-3737.
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
NeedsCompilation: no
Packaged: 2024-01-29 05:09:59 UTC; PC
Repository: CRAN
Date/Publication: 2024-01-29 12:10:03 UTC

Get an altnernate solution for particular row of incidence matrix

Description

This function returns an alternate solution for a particular row of incidence matrix with specified properties.

Usage

alternate.sol(v,b,k,r,r0,lambda,lambda0,N1,T,relaxed)

Arguments

v

number of test treatments

b

number of blocks

k

block size

r

number of replications of the test treatments

r0

number of replications of the control

lambda

number of concurrences of two test treatments

lambda0

number of concurrences of a test treatment with the control

N1

Incidence matrix obtained till the previous row

T

Tabu list of deleted rows

relaxed

are the constraints being relaxed?

Value

return the desired row of the incidence matrix

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


Get an altnernate solution for particular row of incidence matrix

Description

This function returns an alternate solution for a particular row of incidence matrix with specified properties.

Usage

alternate.sol2(m,n,b,k,r,r0,lambda1,lambda0,N1,T,relaxed)

Arguments

m

number of rows

n

number of columns

b

number of blocks

k

block size

r

number of replications of the test treatments

r0

number of replications of the control

lambda1

number of concurrences of two test treatments

lambda0

number of concurrences of a test treatment with the control

N1

Incidence matrix obtained till the previous row

T

Tabu list of deleted rows

relaxed

are the constraints being relaxed?

Value

return the desired row of the incidence matrix

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


Get an altnernate solution for particular row of incidence matrix

Description

This function returns an alternate solution for a particular row of incidence matrix with specified properties.

Usage

alternate.sol3(v1,v2,b,k,r,r0,lambda1,lambda2,lambda12,N1,T,relaxed)

Arguments

v1

number of test treatments

v2

number of controls

b

number of blocks

k

block size

r

number of replications of the test treatments

r0

number of replications of the control

lambda1

number of concurrences of two test treatments

lambda2

number of concurrences between two control treatments

lambda12

number of concurrences between a test and a control treatment

N1

Incidence matrix obtained till the previous row

T

Tabu list of deleted rows

relaxed

are the constraints being relaxed?

Value

return the desired row of the incidence matrix

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


A-optimal balanced bipartite block designs

Description

This function generates A-optimal balanced bipartite block (BBPB) designs for tests vs controls comparisons with specified parameters

Usage

aoptbbpb(v1,v2,b,k,ntrial)

Arguments

v1

number of test treatments

v2

number of controls

b

number of blocks

k

block size

ntrial

number of trials, default is 5

Value

It either returns a text message or a design. If a design is found, it returns a list with following components

parameters

parameters of the design

design

generated A-optmal BBPB design

N

incidence matrix of the generated A-optmal BBPB design

NNP

concurrence matrix of the generated design

Aeff

A-efficiency of the design

type

R- type or S- type design

Note

The function is useful to construct A-optimal BBPB designs for v1+v2 <= 30 and up to block size 10. May not be very useful beyond v1+v2 > 30. For k<=3, designs with larger v1+v2 may be obtained.

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>

References

Jaggi, S., Gupta, V. and Parsad, R. (1996). A-efficient block designs for comparing two disjoint sets of treatments, Communications in Statistics-Theory and Methods 25(5), 967-983.

Mandal, B. N., Parsad, R. and Dash, S. (2017). A-optimal block designs for comparing test treatments with control treatment(s) - an algorithmic approach, upcoming project report, ICAR-Indian Agricultural Statistics Research Institute, New Delhi, India.

Examples

##construct an A-optimal BBPB design with 5 test treatments and 3 control treatments in 
##12 blocks each of size 5
aoptbbpb(v1=5,v2=3,b=12,k=5)
##construct an A-optimal BBPB design with 6 test treatments and 3 control treatments in 
##6 blocks each of size 8
aoptbbpb(v1=6,v2=3,b=6,k=8)
##Design does not exist
#not run
aoptbbpb(3,2,9,3)
aoptbbpb(6,3,9,4)
#Design not found
## Not run: aoptbbpb(3,3,12,4)

A-optimal group divisible treatment designs

Description

This function generates A-optimal group divisible treatment (GDT) designs for test vs control comparisons with specified parameters

Usage

aoptgdtd(m,n,b,k,ntrial)

Arguments

m

number of rows such that m*n = number of test treatments

n

number of columns such that m*n = number of test treatments

b

number of blocks

k

block size

ntrial

number of trials, default is 5

Value

It either returns a text message or a design. If a design is found, it returns a list with following components

parameters

parameters of the design

design

generated A-optmal GDT design

N

incidence matrix of the generated A-optmal GDT design

NNP

concurrence matrix of the generated design

Note

The function is useful to construct A-optimal GDT designs for number of test treatments <= 30 and up to block size 10. May not be very useful for m*n > 30. For k<=3, designs with larger number of test treatment may be obtained.

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>

References

Jacroux, M. (1989). The A-optimality of block designs for comparing test treatments with a control, Journal of the American Statistical Association 84(405), 310-317.

Mandal, B. N., Parsad, R. and Dash, S. (2017). A-optimal block designs for comparing test treatments with control treatment(s) - an algorithmic approach, upcoming project report, ICAR-Indian Agricultural Statistics Research Institute, New Delhi, India.

Examples

## construct an A-optimal GDT design with 12 (= 4 x 3) test treatments 
##in 12 blocks each of size 6
aoptgdtd(m=4,n=3,b=12,k=6)
## construct an A-optimal GDT design with 8 (= 4 x 2) test treatments 
##in 8 blocks each of size 4
aoptgdtd(m=4,n=2,b=8,k=4)
##design does not exist
aoptgdtd(4,2,8,2)
##Design not found
## Not run: aoptgdtd(3,3,15,3)

BBPB design with given parameters

Description

This function returns incidence matrix of a BBPB design with given parameters.

Usage

bbpbwq(v1,v2,b,k,w,q,ntrial)

Arguments

v1

number of test treatments

v2

number of controls

b

number of blocks

k

block size

w

parameter w

q

parameter q

ntrial

number of trials

Value

return the incidence matrix of BBPB design

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


Block design from given incidence matrix

Description

This function generates the block contents from a given incidence matrix

Usage

block.design(N)

Arguments

N

incidence matrix

Value

design

A matrix with number of rows equal to the number of blocks and number of columns equal to block size. Constant block size is assumed. Treatments are numbered as 1, 2, ..., v

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


BTIB design with given parameters

Description

This function returns incidence matrix of a BTIB design with given parameters.

Usage

btibts(v,b,k,t,s,alpha,rho=0,ntrial)

Arguments

v

number of test treatments

b

number of blocks

k

block size

t

paramter t

s

parameter s

alpha

weight of the test versus test contrasts

rho

rho=0

ntrial

number of trials

Value

return the incidence matrix of a BTIB design

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


g function

Description

This function checks group

Usage

check.group(m,n,x,y)

Arguments

m

number of rows

n

number of columns

x

x

y

y

Value

group

same group or different group

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


g function

Description

This function computes the value of g for specified parameters.

Usage

g(v,b,k,x,z,alpha,rho=0)

Arguments

v

number of treatments

b

number of blocks

k

block size

x

x

z

z

alpha

alpha

rho

rho, default is 0

Value

g

value of the function

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


g function

Description

This function computes the value of g for specified parameters.

Usage

gbbpb(v1,v2,b,k,x,z)

Arguments

v1

number of test treatments

v2

number of control treatments

b

number of blocks

k

block size

x

x

z

z

Value

value

value of the function

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


getr0

Description

This function returns the value of r0 for specified parameters.

Usage

getr0(v,b,k)

Arguments

v

number of test treatments

b

number of blocks

k

block size

Value

r0star

value of r0star

M

value of M

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


Get a particular row of incidence matrix

Description

This function returns a particular row of incidence matrix with specified properties.

Usage

getrow(v,b,k,r,r0,lambda,lambda0,N1,T,rownum,relaxed)

Arguments

v

number of test treatments

b

number of blocks

k

block size

r

number of replications of the test treatments

r0

number of replications of the control

lambda

number of concurrences of two test treatments

lambda0

number of concurrences of a test treatment with the control

N1

Incidence matrix obtained till the previous row

T

Tabu list of deleted rows

rownum

the row number being obtained

relaxed

are the constraints being relaxed? TRUE or FALSE

Value

return the desired row of the incidence matrix

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


Get a particular row of incidence matrix

Description

This function returns a particular row of incidence matrix with specified properties.

Usage

getrow2(m,n,b,k,r,r0,lambda1,lambda0,N1,T,rownum,relaxed)

Arguments

m

number of rows

n

number of columns

b

number of blocks

k

block size

r

number of replications of the test treatments

r0

number of replications of the control

lambda1

number of concurrences of two test treatments

lambda0

number of concurrences of a test treatment with the control

N1

Incidence matrix obtained till the previous row

T

Tabu list of deleted rows

rownum

the row number being obtained

relaxed

are the constraints being relaxed? TRUE or FALSE

Value

return the desired row of the incidence matrix

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


Get a particular row of incidence matrix

Description

This function returns a particular row of incidence matrix with specified properties.

Usage

getrow3(v1,v2,b,k,r,r0,lambda1,lambda2,lambda12,N1,T,rownum,relaxed)

Arguments

v1

number of test treatments

v2

number of controls

b

number of blocks

k

block size

r

number of replications of the test treatments

r0

number of replications of the control

lambda1

number of concurrences of two test treatments

lambda2

number of concurrences between two control treatments

lambda12

number of concurrences between a test and a control treatment

N1

Incidence matrix obtained till the previous row

T

Tabu list of deleted rows

rownum

the row number being obtained

relaxed

are the constraints being relaxed? TRUE or FALSE

Value

return the desired row of the incidence matrix

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


Value of t and s which minimize g function

Description

This function gives the value of t and s which minimize the g function.

Usage

getts(v,b,k,alpha,rho)

Arguments

v

number of treatments

b

number of blocks

k

block size

alpha

weight

rho

rho is zero throughout.

Value

return the values of t and s

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


Value of w and q which minimize g function

Description

This function gives the value of w and q which minimize the g function.

Usage

getwq(v1,v2,b,k)

Arguments

v1

number of test treatments

v2

number of controls

b

number of blocks

k

block size

Value

return the values of w and q

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>


Weighted A-optimal balanced treatment incomplete block designs

Description

This function generates weighted A-optimal balanced treatment incomplete block design for test vs control comparisons with specified parameters

Usage

wtaoptbtib(v,b,k,alpha,rho=0,ntrial=5)

Arguments

v

number of test treatments

b

number of blocks

k

block size

alpha

Weight for test versus test comparisons. Should be between 0 to 1

rho

rho=0

ntrial

number of trials, default is 5

Value

It either returns a text message or a design. If a design is found, it returns a list with following components

parameters

parameters of the design

design

generated weighted A-optmal BTIB design

N

incidence matrix of the generated weighted A-optmal BTIB design

NNP

concurrence matrix of the generated design

Note

The function is useful to construct weighted A-optimal BTIB designs upto 30 test treatments and up to block size 10. May not be very useful beyond 30 test treatments. For k<=3, designs with larger number of test treatments may be obtained.

Author(s)

Baidya Nath Mandal <mandal.stat@gmail.com>

References

Gupta, V., Ramana, D. and Parsad, R. (1999). Weighted A-efficiency of block designs for making treatment-control and treatment-treatment comparisons, Journal of statistical planning and inference 77(2), 301-319.

Mandal, B. N., Parsad, R. and Dash, S. (2017). A-optimal block designs for comparing test treatments with control treatment(s) - an algorithmic approach, upcoming project report, ICAR-Indian Agricultural Statistics Research Institute, New Delhi, India.

Examples

##construct a weighted A-optimal BTIB design with 4 test treatments in 6 blocks each of size 4 
##with weights to test vs test treatments comparisons as 0.6
wtaoptbtib(v=4,b=6,k=4,alpha=0.6,rho=0)
##construct an A-optimal BTIB design with 9 test treatments in 12 blocks each of size 4 
##with weights to test vs test treatments comparisons as 0
wtaoptbtib(v=9,b=12,k=4,alpha=0,rho=0)
##design not found
## Not run: wtaoptbtib(v=3,b=6,k=5,alpha=0.2,rho=0)
##BTIB design does not exist for these parameters
#Not run
wtaoptbtib(3,4,3,0.2,0)