cnNodeSampleLoglik: Node Log-likelihood

View source: R/catnet.loglik.R

cnNodeSampleLoglikR Documentation

Node Log-likelihood

Description

For a given data sample, the function calculates the log-likelihood of a node with respect to a specified parent set.

Usage

cnNodeSampleLoglik(node, parents, data, perturbations=NULL)
cnNodeSampleProb(node, parents, data, perturbations=NULL)

Arguments

node

an integer or a list of integers, node indices in the data

parents

an integer or a list of integers, vector of parent indices for the nodes

data

a matrix or data.frame of categories

perturbations

an optional perturbation matrix or data.frame

Value

a numeric value

Author(s)

N. Balov

See Also

cnLoglik

Examples

  library(catnet)
  cnet <- cnRandomCatnet(numnodes=10, maxParents=3, numCategories=2)
  psamples <- cnSamples(object=cnet, numsamples=100)
  cnNodeSampleLoglik(node=5, parents=c(1,2), data=psamples)

catnet documentation built on Nov. 10, 2022, 5:08 p.m.