| Title: | Designs for Order-of-Addition Experiments |
|---|---|
| Description: | A facility to generate efficient designs for order-of-additions experiments under pair-wise-order model, see Dennis K. J. Lin and Jiayu Peng (2019)."Order-of-addition experiments: A review and some new thoughts". Quality Engineering, 31:1, 49-59, <doi:10.1080/08982112.2018.1548021>. It also provides a facility to generate component orthogonal arrays under component position model, see Jian-Feng Yang, Fasheng Sun & Hongquan Xu (2020): "A Component Position Model, Analysis and Design for Order-of-Addition Experiments". Technometrics, <doi:10.1080/00401706.2020.1764394>. |
| Authors: | Baidya Nath Mandal [aut, cre], Rajender Parsad [aut], Sukanta Dash [aut] |
| Maintainer: | Baidya Nath Mandal <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.0 |
| Built: | 2026-05-16 05:24:42 UTC |
| Source: | https://github.com/cran/doofa |
binary representation of x (an element from 1 to m) with m components
bin(x, m)bin(x, m)
x |
a positive integer less than or equal to m |
m |
number of components, a positive integer |
a vector with elements 1 and 0
bin(x = 2, m = 4);bin(x = 2, m = 4);
construct a component orthogonal array with m components such that each pair of columns contains each (i != j) combinations lambda times
coa(m, lambda, ntrial)coa(m, lambda, ntrial)
m |
a positive integer, currently supports less than 8 |
lambda |
a positive integer, usually 1 |
ntrial |
a positive integer, default is 10 |
a component orthogonal array with m components
coa(m = 4, lambda = 1, ntrial = 10);coa(m = 4, lambda = 1, ntrial = 10);
cycle elements of a vector by one element to right
cycle(x)cycle(x)
x |
a vector |
cycled vector
cycle(c(1, 2, 3));cycle(c(1, 2, 3));
construct a design for order-of-addition experiment under pwo model with n runs and m components
doofa.pwo(n, m)doofa.pwo(n, m)
n |
a positive integer, preferably less than 100 |
m |
a positive integer, currently supports less than 8 |
a design for order-of-addition experiment under pwo model with n runs and m components
doofa.pwo(5,3);doofa.pwo(5,3);
Repeat the process of design generation using doofa.pwo several times and return the best design
gen.design2(n, m, num.repeat = 10)gen.design2(n, m, num.repeat = 10)
n |
number of runs, a positive integer |
m |
number of components, a positive integer |
num.repeat |
number of repeats, a positive integer |
a design with D-efficiency
gen.design2(n = 5, m = 3, num.repeat = 10);gen.design2(n = 5, m = 3, num.repeat = 10);
create an initial design of o-of-a with n rows and m columns
initial.design(n, m)initial.design(n, m)
n |
a positive integer |
m |
a positive integer |
a matrix with n rows and m columns
initial.design(n = 6, m = 3);initial.design(n = 6, m = 3);
create a matrix of 1s with t rows
one(t)one(t)
t |
a positive integer |
a matrix of 1s with t rows
one(3);one(3);
create PWO ordering of the given run
pwo(x)pwo(x)
x |
a numeric vector containing elements 1 to m in some order |
PWO ordering of the given run
row = c(3,1,2) pwo(row);row = c(3,1,2) pwo(row);
reverse of bin function i.e., returns which elements of a binary vector is 1
revbin(x)revbin(x)
x |
a vector with 0 and 1s such that there is only 1 |
a postive integer m
revbin(c(0,1,0,0));revbin(c(0,1,0,0));
shuffle elements of a randomly chosen row of x matrix
shuffle(x)shuffle(x)
x |
a matrix |
a matrix with shuffled elements of a row
x = matrix(c(3,1,2, 1,2,3,1,3,2,2,1,3),ncol = 3, byrow = TRUE) shuffle(x);x = matrix(c(3,1,2, 1,2,3,1,3,2,2,1,3),ncol = 3, byrow = TRUE) shuffle(x);
swap elements at i and i+1 of a vector
swap(x, i)swap(x, i)
x |
a vector |
i |
a positive integer, less than length of x |
a vector with swapped elements
swap(c(1,2,3),2);swap(c(1,2,3),2);
vectorized bin function
vbin(x)vbin(x)
x |
a vector of length m with positive integers less than or equal to m |
a binary matrix
vbin(c(3,1,2));vbin(c(3,1,2));
vectorized revbin function
vrevbin(x, m)vrevbin(x, m)
x |
a binary vector of length nm, such that each length of m has only one 1 and rest as 0 |
m |
a positive integer |
a vector of n positive integers
vrevbin(x=c(0,0,1,0,1,0), m = 3);vrevbin(x=c(0,0,1,0,1,0), m = 3);