spbn_loglik: Log-likelihood of each node of a semiparametric Bayesian...

View source: R/dfr_llr2.R

spbn_loglikR Documentation

Log-likelihood of each node of a semiparametric Bayesian network

Description

Evaluates ⁠log f(x_i | pa_i)⁠ for every observation and node of an spbn() model.

Usage

spbn_loglik(model, data)

Arguments

model

An spbn object.

data

A data frame or matrix with the model's variables.

Value

A matrix with one row per observation and one column per node.

Examples

set.seed(1)
x <- data.frame(a = stats::rnorm(200), b = stats::rnorm(200))
head(spbn_loglik(spbn(x), x))

heimdall documentation built on Dec. 2, 2026, 5:08 p.m.