Rcam: Mark the baseline of row and column on a matrix data
Description
This function will grab the baseline of row and column for
the rank-zero model of row-column association models or main
effects models.
Usage
Rcam(mat, rbaseline = 1, cbaseline = 1)
Arguments
mat
Matrix of $r$ by $c$.
The matrix is better labeled with row and column names.
rbaseline
Numeric (row number of the matrix y) or can be
character of row names of the matrix y that user
wants it as row baseline or reference.
Similarly cbaseline for the column
cbaseline
Numeric of column number of the matrix mat, or can be
Character of column names of the matrix mat that user
wants it as column baseline or reference.
Value
Matrix of the same dimension as the input, rearranged the first
row or column.
Details
In some regression analysis, it is necessary to put the baseline
(or reference) of the factor, and as well in rank-zero of
row-column association model. It should be done by marking
a baseline on a level of row and column. This is a data
preprocessing function for rcam.