initialize,bbl-method {bbl}R Documentation

Instantiate bbl object

Description

Creates bbl object based on arguments provided.

Usage

## S4 method for signature 'bbl'
initialize(.Object, data, predictors = NULL,
  groups = NULL, y = "y", ...)

Arguments

.Object

Object of class bbl to be created.

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 data columns with names not equal to y.

groups

Vector of characters for response factor levels. If not provided, will be inferred from data response column named y.

y

Column name in data containing response data. Can also be column number.

...

Other parameters (not used).

Details

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.

Value

Object of class bbl.

Examples

## Factors model
titanic <- freq2raw(as.data.frame(Titanic), Freq='Freq')
summary(titanic)
model <- bbl(data=titanic, y='Survived')
model

[Package bbl version 0.1.5 Index]