Decomposes a matrix into an overall mean matrix, row margins matrix, column margins matrix
and an interaction matrix, depending on delta
.
bicomp(x, delta = c(1, 1, 1, 1), which = 0L:4L)
A matrix to be decomposed.
A vector of length four with 0/1 entries which controls the type of decomposition made.
A vector giving the elements to return, with 0 = original data, 1 = overall means, 2 = row means, 3 = column means and 4 = interactions.
An object of class bicomp
, possible also inheriting from class data.frame
,
which is either a named list with the required components, or a single matrix if a single
component is requested. An additional attribute return_type
gives information on the type
of matrices returned.