Last chance! 50% off unlimited learning
Sale ends in
Rearrange the rows and columns of the input so that the first row and first column are baseline. This function is for rank-zero row-column interaction models (RCIMs; i.e., general main effects models).
Rcim(mat, rbaseline = 1, cbaseline = 1)
Matrix, of dimension
Numeric (row number of the matrix mat
) or
character (matching a row name of mat
) that the user
wants as the row baseline or reference level.
Similarly cbaseline
for the column.
Matrix of the same dimension as the input,
with rbaseline
and cbaseline
specifying the
first rows and columns.
The default is no change in mat
.
This is a data preprocessing function for rcim
.
For rank-zero row-column interaction models this function
establishes the baseline (or reference) levels of the matrix
response with respect to the row and columns---these become
the new first row and column.
# NOT RUN {
(alcoff.e <- moffset(alcoff, roffset = "6", postfix = "*"))
(aa <- Rcim(alcoff, rbaseline = "11", cbaseline = "Sun"))
(bb <- moffset(alcoff, "11", "Sun", postfix = "*"))
aa - bb # Note the difference!
# }
Run the code above in your browser using DataLab