
Compute (penalized) log-likelihood and conditional log-likelihood score of a bnc_bn
object on
a data set. Requires a data frame argument in addition to object
.
# S3 method for bnc_bn
AIC(object, ...)# S3 method for bnc_bn
BIC(object, ...)
# S3 method for bnc_bn
logLik(object, ...)
cLogLik(object, ...)
A bnc_bn
object.
A data frame (
log-likelihood =
Akaike's information criterion (AIC) =
The Bayesian information criterion (BIC) score: =
where object
,
cLogLik
computes the conditional log-likelihood of the model.
data(car)
nb <- bnc('nb', 'class', car, smooth = 1)
logLik(nb, car)
AIC(nb, car)
BIC(nb, car)
cLogLik(nb, car)
Run the code above in your browser using DataLab