loglik | R Documentation |
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 class 'bnc_bn'
AIC(object, ...)
## S3 method for class 'bnc_bn'
BIC(object, ...)
## S3 method for class 'bnc_bn'
logLik(object, ...)
cLogLik(object, ...)
object |
A |
... |
A data frame ( |
log-likelihood = log P(\mathcal{D} \mid \theta)
,
Akaike's information criterion (AIC) = log P(\mathcal{D} \mid \theta) -
\frac{1}{2} |\theta|
,
The Bayesian information criterion (BIC) score: = log P(\mathcal{D} \mid
\theta) - \frac{\log N}{2} |\theta|
,
where |\theta|
is the number of free parameters in object
,
\mathcal{D}
is the data set and N is the number of instances in
\mathcal{D}
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.