Version: | 1.0.0 |
Date: | 2021-09-06 |
Title: | Position Balanced and Nearly Position Balanced Block Designs |
Author: | B N Mandal [aut, cre], Pramod Katore [aut], Sukanta Dash [aut], Rajender Parsad [aut] |
Maintainer: | B N Mandal <mandal.stat@gmail.com> |
Depends: | R (≥ 4.1.0) |
Imports: | ibd (≥ 1.5) |
Description: | Generates a position balanced or nearly position balanced block design with given parameters. This package can also convert a given proper and equireplicate block design into a position balanced or nearly position balanced block design. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
NeedsCompilation: | no |
Packaged: | 2021-09-06 06:05:30 UTC; b |
Repository: | CRAN |
Date/Publication: | 2021-09-08 08:40:02 UTC |
Allocate treatments in a column
Description
This function alloctes treatments in a column of a block design
Usage
allocate(j,v,b,k,mvec,x1,x2)
Arguments
j |
An integer less than or equal to block size |
v |
Number of treatments |
b |
Number of blocks |
k |
Block size |
mvec |
Vector of desired frequencies of treatments in jth column |
x1 |
A b x k matrix |
x2 |
A b x k matrix |
Value
x1 |
A b x k matrix |
x2 |
A b x k matrix |
Author(s)
Baidya Nath Mandal <mandal.stat@gmail.com>
Position balanced and nearly position balanced block design
Description
This function generates a position balanced or nearly position balanced block design from a given equireplicate and proper block design
Usage
balancify(d1)
Arguments
d1 |
Block design specified in the form of a b x k matrix with elements labelled as 1 to v where b is number of blocks, k is block size and v is number of treatments |
Value
design |
(Nearly) position balanced block design |
P |
Treatment by Position incidence matrix |
Note
Input design should be equireplicate that is, each treatment should have equal replications. Block sizes should be same for each block. For any issue, kindly report to author.
Author(s)
B N Mandal <mandal.stat@gmail.com>
Examples
d1 = matrix(c(3, 4, 6,
5, 6, 7,
1, 4, 5,
2, 4, 7,
1, 3, 7,
1, 2, 6,
2, 3, 5), ncol = 3, byrow = TRUE)
balancify(d1)
d1 = matrix(c(7 , 8 , 9 ,
1 , 6 , 8 ,
1 , 3 , 9 ,
4 , 6 , 9 ,
5 , 6 , 7 ,
1 , 4 , 5 ,
3 , 5 , 8 ,
3 , 4 , 7 ,
2 , 5 , 9 ,
2 , 4 , 8 ,
1 , 2 , 7 ,
2 , 3 , 6), ncol = 3, byrow = TRUE)
balancify(d1)
Cyclically rotatation of elements of a vector
Description
This function Cyclically rotate elements of a given vector
Usage
cycle(x)
Arguments
x |
A vector |
Value
cyclically rotated vector
Author(s)
Baidya Nath Mandal <mandal.stat@gmail.com>
Desired treatment versus position incidence matrix
Description
This function returns desired treatment versus position incidence matrix for a proper block design with parameters v, b, r, k to be (nearly) position balanced
Usage
dpf(v, b, r, k)
Arguments
v |
Number of treatments |
b |
Number of blocks |
r |
Number of replications of each treatment |
k |
Block size |
Value
Desired treatment versus position incidence matrix
Author(s)
Baidya Nath Mandal <mandal.stat@gmail.com>
Position balanced and nearly position balanced block design
Description
This function generates a position balanced or nearly position balanced block design with given parameters. User needs to specify number of treatments (v), number of blocks (b) and block size (k)
Usage
pbbd(v, b, k)
Arguments
v |
Number of treatments |
b |
Number of blocks |
k |
Block size |
Value
parameters |
Parameters v,b,r,k. Here r is number of replications of each treatment |
efficiencies |
A- and D-efficiency of the design generated |
design |
Position balanced block design |
P |
Treatment verus position incidence matrix |
Note
This function works for generating a position balanced block design for upto 30 treatments and block size 10. For getting design with larger number of treatments and/or block size, it is better to use balancify() function with a design supplied by user to make the design position balanced.
Author(s)
B N Mandal <mandal.stat@gmail.com>
Examples
pbbd(7,7,3)
pbbd(9,12,3)
Treatment versus Position incidence matrix
Description
This function returns Treatment versus Position incidence matrix of a given proper block design
Usage
psfreq(design)
Arguments
design |
Block design specified in the form of a b x k matrix with elements labelled as 1 to v whre b is number of blocks, k is block size and v is number of treatments |
Value
Treatment versus Position incidence matrix
Author(s)
Baidya Nath Mandal <mandal.stat@gmail.com>