| logLik.network_histogram | R Documentation |
Extracts the Bernoulli log-likelihood of a fitted network histogram. The
method is defined on the common base class, so it applies to
nethist, multinethist, and hnethist objects alike; see
network_histogram-class.
## S3 method for class 'network_histogram'
logLik(object, normalized = FALSE, ...)
object |
a |
normalized |
logical. If |
... |
currently unused. |
The normalized value is not given class logLik on purpose. Passing a
per-edge normalized value to AIC() or BIC() would return a
meaningless number without any error.
The degrees of freedom count the free block probabilities: k * (k + 1)
/ 2 for nethist, where k is the number of blocks; the same
for multinethist fitted with common_f = TRUE, and L
times that for L layers otherwise; and s, the number of
selected shapes, for hnethist.
The number of observations is the number of Bernoulli edge variables, i.e.
n * (n - 1) / 2 for a single layer and L times that for
L layers.
The log-likelihood is evaluated at the fitted probability matrix regardless
of method, so it is also available for method = "LSE" fits.
With normalized = FALSE, an object of class logLik carrying
df and nobs attributes, so that stats::AIC() and
stats::BIC() work directly on the fit. With normalized = TRUE, an
unclassed numeric equal to object$normalized_LL.
network_histogram-class,
summary.network_histogram
set.seed(42)
data(polblog)
fit <- suppressMessages(nethist(polblog))
logLik(fit)
logLik(fit, normalized = TRUE)
AIC(fit)
BIC(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.