Package 'iRoCoDe'

Title: Incomplete Row-Column Designs
Description: The Row-column designs are widely recommended for experimental situations when there are two well-identified factors that are cross-classified representing known sources of variability. These designs are expected to result a gain in accuracy of estimating treatment comparisons in an experiment as they eliminate the effects of the row and column factors. However, these designs are not readily available when the number of treatments is more than the levels of row and column blocking factors. This package named 'iRoCoDe' generates row-column designs with incomplete rows and columns, by amalgamating two incomplete block designs (D1 and D2). The selection of D1 and D2 (the input designs) can be done from the available incomplete block designs, viz., balanced incomplete block designs/ partially balanced incomplete block designs/ t-designs. (Mcsorley, J.P., Phillips, N.C., Wallis, W.D. and Yucas, J.L. (2005).<doi:10.1007/s10623-003-6149-9>).
Authors: Sayantani Karmakar [aut], Md. Ashraful Haque [aut, cre], Cini Varghese [aut], Seema Jaggi [aut], Eldho Varghese [aut], Mohd. Harun [aut]
Maintainer: Md. Ashraful Haque <[email protected]>
License: GPL (>= 2)
Version: 1.0.1
Built: 2025-02-14 03:24:29 UTC
Source: https://github.com/cran/iRoCoDe

Help Index


Generates the 'a_matrix' (A) of a design

Description

The a_matrix function creates an 'a_matrix' (A) with help of design D2 and 'n_matrix' (N) of design D1.

Usage

a_matrix(design2, n_matrix)

Arguments

design2

A design in matrix format

n_matrix

An incidence matrix of a design

Details

This functions reads the second design (D2) and the incidence matrix or 'n_matrix' (N) of the first design (D1) as input in matrix format. The dimention of the 'a_matrix' (A) is same as the input incidence matrix (N).

Value

It returns matrix (A) with the same dimension as of 'n_matrix' (N).

Author(s)

1) Sayantani Karmakar 2) Md. Ashraful Haque 3) Cini Varghese 4) Seema Jaggi 5) Eldho Varghese 6) Mohd. Harun


Generates number of replications in a design

Description

The get_rep function finds the number of replications of the treaments in a given design.

Usage

get_rep(design)

Arguments

design

A design in matrix format

Details

This function reads a design (D) in matrix format and obtain the number of replications (r) of the treatments (v) of the given design where rows are treated as blocks.

Value

It returns a scalar value denoting the number of replications of the treatments in the design.

Author(s)

1) Sayantani Karmakar 2) Md. Ashraful Haque 3) Cini Varghese 4) Seema Jaggi 5) Eldho Varghese 6) Mohd. Harun


Generates number of treatments in a Design

Description

The get_treat function finds the number of treaments in a given design.

Usage

get_treat(design)

Arguments

design

A design in matrix format

Details

This function reads a design (D) in matrix format and finds the number of treatments (v) in the given design where rows are treated as blocks.

Value

A list of treatments in a design.

Author(s)

1) Sayantani Karmakar 2) Md. Ashraful Haque 3) Cini Varghese 4) Seema Jaggi 5) Eldho Varghese 6) Mohd. Harun


Generate Incomplete Row-Column Designs

Description

The 'iRoCoDe' function uses an algorithmic approach for constructing row-column designs with incomplete rows and columns by using two incomplete block designs. A wide range of incomplete block designs, viz., balanced incomplete block designs (BIBD)/ partially balanced incomplete block designs (PBIBD)/ t-designs can be used in this function to construct these designs.

Usage

iRoCoDe(design1, design2)

Arguments

design1

first design (D1) having parameters: no. of treaments = v1, No. of blocks = b1, block size = k1, and treatment-replications = r1

design2

second design (D2) having parameters: no. of treaments = v2, No. of blocks = b2, block size = k2, and treatment-replications = r2

Details

The function takes two incomplete block designs D1 and D2 (having parameters v1, b1, k1, r1 and v2, b2, k2, r2) as input in matrix format. The input designs (D1 and D2) must satisfy the parametric relationships: v1 = r2, b1 = b2 and k1 = k2 for generating the new design using this function.

Value

It returns a matrix with dimention v1 x v2.

Author(s)

1) Sayantani Karmakar 2) Md. Ashraful Haque 3) Cini Varghese 4) Seema Jaggi 5) Eldho Varghese 6) Mohd. Harun

References

McSorley, J.P., Phillips, N.C., Wallis, W.D. & Yucas, J.L. (2005). Double arrays, triple arrays and balanced grids. Designs, Codes and Cryptography, 35(1), 21 - 45

Examples

library(iRoCoDe)
D1= matrix(c(1, 2, 5,
            2, 3, 6,
            3, 4, 1,
            4, 5, 6,
            5, 1, 3,
            6, 1, 4,
            2, 3, 4,
            3, 5, 6,
            6, 1, 2,
            2, 4, 5), nrow = 10, ncol = 3, byrow = TRUE)
D2 = matrix(c(1, 4, 5,
             2, 4, 5,
             1, 3, 4,
             1, 2, 5,
             2, 3, 5,
             1, 3, 5,
             1, 2, 4,
             1, 2, 3,
             2, 3, 4,
             3, 4, 5), nrow = 10, ncol = 3, byrow = TRUE)

D = iRoCoDe(D1,D2)
## Output:
#[1] "Incomplete Row-Column Design"
#     [,1] [,2] [,3] [,4] [,5]
#[1,]    6    9    3    1    5
#[2,]    7    2   10    9    1
#[3,]    8    7    5    3    2
#[4,]    3    4    6    7   10
#[5,]    1    5    8   10    4
#[6,]    4    8    9    2    6

Generates the Incidence Matrix (N) of a Design

Description

The n_matrix functions creates an incidence matrix/'n_matrix' (N) from a given design.

Usage

n_matrix(design, treatments, blocks)

Arguments

design

A design in matrix format

treatments

Number of treatments in the given design

blocks

Number of blocks in the given design

Details

This functions reads a design (D1) in matrix format, its no. of treatments (v1) and its no. of blocks (b1) as input. Here the rows of design D1 are treated as blocks. The generated incidence matrix (N) will have the dimension of (v1 x b1).

Value

It returns a matrix (N) with the dimension of (v1 x b1)

Author(s)

1) Sayantani Karmakar 2) Md. Ashraful Haque 3) Cini Varghese 4) Seema Jaggi 5) Eldho Varghese 6) Mohd. Harun


Rearranges the given matrix

Description

The rearrange_mat function rearranges the column elements of a given 'a_matrix'.

Usage

rearrange_mat(a_matrix, treatments)

Arguments

a_matrix

A a_matrix of the first design (D1)

treatments

The number of treatments of the second design (D2)

Details

This function reads an 'a_matrix' (A) generated from two designs (D1 and D2) and rearranges the column elements based on the treatments numbers in the second design (D2). It iteratively rearrange the items row-wise until the new A is generated with each row containing all the treatments of D2 exaclty once.

Value

It returns new 'a_matrix' (A) with each row containing all the treatments of D2 exaclty once.

Author(s)

1) Sayantani Karmakar 2) Md. Ashraful Haque 3) Cini Varghese 4) Seema Jaggi 5) Eldho Varghese 6) Mohd. Harun


Removes a item from a list

Description

The rmv_list function removes the specified item from the given list.

Usage

rmv_list(list, val)

Arguments

list

A list of values

val

A specific value

Details

This function reads a list of values and removes the specified value from that list.

Value

It returns a list.

Author(s)

1) Sayantani Karmakar 2) Md. Ashraful Haque 3) Cini Varghese 4) Seema Jaggi 5) Eldho Varghese 6) Mohd. Harun


Checks uniqness of elements in the rows of a matrix

Description

The row_unique function checks whether each row contains unique treatments.

Usage

row_unique(a_matrix, treatments, rows, cols)

Arguments

a_matrix

An 'a_matrix' of the first design (D1)

treatments

The treatments of the second design (D2)

rows

Number of rows in the given 'a_matrix'

cols

Number of columns in the given 'a_matrix'

Details

This function reads an 'a_matrix' (A) generated from two designs (D1 and D2) and checks whether each row contains all the treatments from D2 exactly once.

Value

It returns boolean value (either True or False).

Author(s)

1) Sayantani Karmakar 2) Md. Ashraful Haque 3) Cini Varghese 4) Seema Jaggi 5) Eldho Varghese 6) Mohd. Harun