build_flat_model_component: Construct a complete flat model component

View source: R/build-flat-model-component.R

build_flat_model_componentR Documentation

Construct a complete flat model component

Description

Enforces some of the list structure that's implicit currently

Usage

build_flat_model_component(
  type,
  format = "row",
  N,
  K,
  n_nze,
  nze_idx,
  nze_value,
  row_start_idx,
  row_n_nze,
  row_nze_idx,
  col_nze_idx,
  row_names,
  col_names,
  label,
  ...
)

Arguments

type

character string listing the component type

format

character string listing the format ('row', always)

N

single integer, specify the number of observations in the component.

K

single integer, specify the number of parameters in the model component

n_nze,

single integer, specify the number of non-zero elements in the flat representation of the component model matrix

nze_idx,

vector of integers, specify the indexes of non-zero entries in the vector of non-zero values

nze_value,

vector of non-zero values (floating point numbers)

row_start_idx,

vector of integers, each indicates the start of a row in the vector of non-zero values

row_n_nze,

number of non-zero entries in each row

row_nze_idx,

row of each entry in the vector of non-zero values

col_nze_idx,

col of each entry in the vector of non-zero values

row_names,

row names for the model component

col_names,

column names for the model component

label,

model component label

reference,

reference category relevant for 'discrete-offset' type only.

Value

flat model component representation


sakrejda/dt documentation built on Sept. 24, 2022, 3:03 a.m.