A class for creating a flat sparse model matrix representation
.n_row
number of observations in model matrix
.n_col
number of columns in the model matrix
.n_nze
number of non-zero entries in the model matrix
.nze
indexes of non-zero entries in the model matrix (RSC)
.start
where each row of the model matrix start in nze
.stop
where each row of the model matrix ends in nze
.xv
n_nze nze entries of the model matrix
.y
dependent data vector, if applicable
.groups
index into xv for each group of parameters produced by the formula
check_component(component)
Verify that the requested (formula) component is in the model matrix and return its name. If none is specified (NULL in calling function) then all are returned.
expose(...)
Extractor that takes a named vector and provides the relevant component with (optionally) a new name. The renaming syntax follows dplyr::rename so the new name is taken from the name of the argument and the element to extract is taken from the character vector content.
For example OBJ$expose(phi_n_col = 'n_col') would return the number of (implicit) model matrix columns with the name 'phi_n_col'. This is useful to construct lists that are going to be used in, e.g.-Stan.
get_data()
Get the data frame used to construct the matrix.
initialize(formula, data, configuration, N = nrow(data), ...)
Create the implicit mass matrix and store components.
list_components()
Get a list of the object's fields that can be exposed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.