Learn R Programming

catnet (version 1.16.1)

cnFindBIC-method: Find Network by BIC

Description

This is a model selection routine that finds a network in a set of networks using the BIC criteria.

Usage

cnFindBIC(object, numsamples)

Value

A catNetwork object with optimal BIC value.

Arguments

object

A list of catNetworkNode objects or catNetworkEvaluate

numsamples

The number of samples used for estimating object

Author

N. Balov, P. Salzman

Details

The function returns the network with maximal BIC value from a list of networks as obtained from one of the search-functions cnSearchOrder, cnSearchSA and cnSearchSAcluster. The formula used for the BIC is log(Likelihood) - 0.5*Complexity*log(numNodes).

See Also

cnFindAIC, cnFind

Examples

Run this code
  library(catnet)
  cnet <- cnRandomCatnet(numnodes=12, maxParents=3, numCategories=2)
  psamples <- cnSamples(object=cnet, numsamples=10)
  nodeOrder <- sample(1:12)
  nets <- cnSearchOrder(data=psamples, perturbations=NULL, 
	maxParentSet=2, maxComplexity=36, nodeOrder)
  bicnet <- cnFindBIC(object=nets, numsamples=dim(psamples)[2])
  bicnet

Run the code above in your browser using DataLab