cnNodeSampleLoglik: Node Log-likelihood

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
2
cnNodeSampleLoglik(node, pars, data, pert=NULL)
cnNodeSampleProb(node, pars, data, pert=NULL)

Arguments

node

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

pars

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

data

a matrix or data.frame of categories

pert

an optional perturbation matrix or data.frame

Value

a numeric value

Author(s)

N. Balov

See Also

cnLoglik

Examples

1
2
3
  cnet <- cnRandomCatnet(numnodes=10, maxpars=3, numcats=2)
  psamples <- cnSamples(object=cnet, numsamples=100)
  cnNodeSampleLoglik(node=5, pars=c(1,2), data=psamples)

sdnet documentation built on May 2, 2019, 12:43 a.m.