BinomialGLM: R6 class for storing the design matrix and the binary outcome for a single GLM (logistic) regression
Description
This R6 class can request, store and manage the design matrix Xmat, as well as the binary outcome Bin for the
logistic regression P(Bin|Xmat).
Can also be used for converting data in wide format to long when requested,
e.g., when pooling across binary indicators (fitting one pooled logistic regression model for several indicators)
The class has methods that perform queries to data storage R6 class DataStorageClass to get appropriate data columns & row subsets
Details
- ID - Vector of observation IDs,
1:n
, used for pooling.
- outvar - Outcome name.
- predvars - Predictor names.
- subset_vars - Defines the subset which would be used for fitting this model (logical, expression or indices).
- subset_idx - Subset
subset_vars
converted to logical vector.