Extracts a term with one column per fixed or random-level into a matrix
Extracts a term with one column per fixed or random-level into a matrix
Extracts a 3D array for a term with sample, linear-model, random/fixed-effect order and returns a matrix with samples as rows and columns in order 1) all random/fixed effects for lm1, 2) all random/fixed effects for lm2, etc.
extract_term_to_matrix(object, term)
Arguments
object: An object of class cumhist
term: String, term name
Returns
Matrix
Examples
br_fit <- fit_cumhist(br_singleblock, state ="State", duration ="Duration")a <- extract_term_to_matrix(br_fit,"a")