initialize,bbl-method {bbl} | R Documentation |
bbl
objectCreates bbl
object based on arguments provided.
## S4 method for signature 'bbl' initialize(.Object, data, predictors = NULL, groups = NULL, y = "y", ...)
.Object |
Object of class |
data |
Data frame of training data. Expected to contain both predictor and response variables in columns and instances in rows. |
predictors |
List of predictor factor levels. If not provided,
will be inferred from |
groups |
Vector of characters for response factor levels. If not
provided, will be inferred from |
y |
Column name in |
... |
Other parameters (not used). |
Note that with argument data
only, predictor
factor levels will be ordered by default. Also some of predictors
may have values in data
less than expected, which would
result in fewer levels of predictor
levels. By explicitly
providing predictors
, this default behavior can be overriden.
Predictors in data
with a single factor level will be removed.
Same applies to groups
for response levels.
Object of class bbl
.
## Factors model titanic <- freq2raw(as.data.frame(Titanic), Freq='Freq') summary(titanic) model <- bbl(data=titanic, y='Survived') model