cnLoglik-method {sdnet} | R Documentation |
Calculate the log-likelihood of a sample with respect to a given catNetwork
object
cnLoglik(object, data, pert=NULL, bysample=FALSE, softmode=FALSE)
object |
a |
data |
a data |
pert |
a binary |
bysample |
a |
softmode |
a |
If bysample
is set to TRUE, the function output is a vector of log-likelihoods of the individual sample records. Otherwise, the total average of the log-likelihood of the sample is reported.
A numeric value
N. Balov
cnet <- cnRandomCatnet(numnodes=10, maxpars = 3, numcats = 2) psamples <- cnSamples(object=cnet, numsamples=100) cnLoglik(object=cnet, data=psamples)