VGAM (version 0.8-3)

Rcam: Mark the Baseline of Row and Column on a Matrix data

Description

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 association models (RCAMs; i.e., general main effects models).

Usage

Rcam(mat, rbaseline = 1, cbaseline = 1)

Arguments

mat
Matrix, of dimension $r$ by $c$. It is best that it is labelled with row and column names.
rbaseline, cbaseline
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.

Value

  • 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.

Details

This is a data preprocessing function for rcam. For rank-zero row-column association 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.

See Also

moffset, rcam, plotrcam0.

Examples

Run this code
(alcoff.e <- moffset(alcoff, roffset = "6", postfix = "*"))
(aa = Rcam(alcoff,    rbaseline = "11", cbaseline = "Sunday"))
(bb = moffset(alcoff,             "11",             "Sunday", postfix = "*"))
aa - bb   # Notice the difference!

Run the code above in your browser using DataLab