Learn R Programming

catnet (version 1.16.1)

cnNodeLoglik: 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

cnNodeLoglik(object, node, data, perturbations=NULL)

Value

a numeric value

Arguments

object

a catNetwork object

node

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

data

a matrix or data.frame of categories

perturbations

an optional perturbation matrix or data.frame

Author

N. Balov

See Also

cnLoglik

Examples

Run this code
  library(catnet)
  cnet <- cnRandomCatnet(numnodes=10, maxParents=3, numCategories=2)
  psamples <- cnSamples(object=cnet, numsamples=100)
  cnNodeLoglik(cnet, node=5, data=psamples)

Run the code above in your browser using DataLab