Learn R Programming

bistablehistory (version 1.1.2)

extract_term_to_matrix: Extracts a term with one column per fixed or random-level into a matrix

Description

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.

Usage

extract_term_to_matrix(object, term)

Value

Matrix

Arguments

object

An object of class cumhist

term

String, term name

Examples

Run this code
# \donttest{
br_fit <- fit_cumhist(br_singleblock, state = "State", duration = "Duration")
a <- extract_term_to_matrix(br_fit, "a")
# }

Run the code above in your browser using DataLab