\HeaderA{network.AIC}{AIC/BIC criterion for network graph}{network.AIC}
\keyword{graphs}{network.AIC}
\begin{Description}\relax
Calclate AIC/BIC for a given network graph (should be transitively closed). The number of free parameters equals the number of unknown edges in the network graph.
\end{Description}
\begin{Usage}
\begin{verbatim}
        network.AIC(network,Pm=NULL,k=length(nodes(network$graph)),verbose=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{network}] a nem object (e.g. 'pairwise')
\item[\code{Pm}] prior over models (n x n matrix). If NULL, then a matrix of 0s is assumed
\item[\code{k}] penalty per parameter in the AIC/BIC calculation. k = 2 for classical AIC
\item[\code{verbose}] print out the result
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
For k = log(n) the BIC (Schwarz criterion) is computed. Usually this function is not called directly but from \code{nemModelSelection}
\end{Details}
\begin{Value}
AIC/BIC value
\end{Value}
\begin{Author}\relax
Holger Froehlich
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{nemModelSelection}{nemModelSelection}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
   data("BoutrosRNAi2002") 
   D = BoutrosRNAiDiscrete[,9:16]
   control = set.default.parameters(unique(colnames(D)), para=c(0.13,0.05))
   res1 <- nem(D, control=control)
   network.AIC(res1)
   control$lambda=100 # enforce sparsity
   res2 <- nem(D,control=control)
   network.AIC(res2)
\end{ExampleCode}
\end{Examples}

