Learn R Programming

catnet (version 1.00.0)

cnLoglik-method: Sample Log-likelihood

Description

Calculate the log-likelihood of a sample with respect to a given catNetwork object

Usage

cnLoglik(object, data)

Arguments

object
a catNetwork object
data
a data matrix given in the column-sample format, or a data.frame in the row-sample format

Value

  • A numeric value

See Also

cnNodeLoglik

Examples

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

Run the code above in your browser using DataLab