bbl {bbl} | R Documentation |
Boltzmann Bayes Learning Inference
Description
Main driver for bbl inference
Usage
bbl(
formula,
data,
weights,
xlevels = NULL,
verbose = 1,
method = "pseudo",
novarOk = FALSE,
testNull = TRUE,
prior.count = 1,
...
)
Arguments
formula |
Formula for modeling |
data |
Data for fitting |
weights |
Vector of weights for each instance in data. Restricted to
non-negative integer frequencies, recoding the number of times
each row of data must be repeated. If |
xlevels |
List of factor levels for predictors. If |
verbose |
Output verbosity level. Will be send to down-stream function calls with one level lower |
method |
BB inference algorithm; pseudo-likelihood inference ( |
novarOk |
If |
testNull |
Repeat the inference for the ‘pooled’ sample; i.e., under the null hypothesis of all rows in data belonging to a single group |
prior.count |
Prior count for computing single predictor and pairwise frequencies |
... |
Other parameters to |
Details
Formula argument and data are used to tabulate xlevels unless explicitly
given as list. Data are expected to be factors or integers. This function
is a driver interepreting formula and calls bbi.fit
. Will stop with
error if any predictor has only one level unless novarOk='TRUE'
.
Use removeConst
to remove the non-varying predictors before
calling if this happens.
Value
A list of class bbl
with the following elements:
coefficients |
List of inferred coefficients with elements
|
xlevels |
List of vectors containing predictor levels. |
terms |
The |
groups |
Vector of response groups. |
groupname |
Name of the response variable. |
qJ |
Matrix of logicals whose elements record whether
|
model |
Model data frame derived from |
lkh |
Log likelihood. |
lz |
Vector log partition function. Used in |
weights |
Vector of integral weights (frequencies). |
call |
Function call. |
df |
Degrees of freedom. |
Author(s)
Jun Woo, junwoo035@gmail.com
References
Examples
titanic <- as.data.frame(Titanic)
b <- bbl(Survived ~ (Class + Sex + Age)^2, data = titanic, weights = Freq)
b