% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ComputePermutation.R
\name{CMIBiCondimat2matPermu}
\alias{CMIBiCondimat2matPermu}
\title{Permuted Conditional Mutual Information Between Two Matrices Given Two Conditions}
\usage{
CMIBiCondimat2matPermu(
  mat1,
  mat2,
  condi1,
  condi2,
  bin = NULL,
  sp_order = NULL,
  bulkIdx = 0,
  permutationTimes = 1000,
  seedNum = 99999999
)
}
\arguments{
\item{mat1}{A numeric matrix. For example, each row represents a gene and each column represents a sample.}

\item{mat2}{Another numeric matrix to compare against. Must have the same dimensions as `mat1`.}

\item{condi1}{A numeric condition vector, matching the number of columns in `mat1`.}

\item{condi2}{Another numeric condition vector, matching the number of columns in `mat`.}

\item{bin}{An integer specifying the number of bins. Default is NULL.}

\item{sp_order}{An integer specifying the spline order. Must be less than `bin`. Default is NULL.}

\item{bulkIdx}{Index to divide the task when processing many permutations. Default is 0.}

\item{permutationTimes}{Number of permutations for sampling. Default is 1000.}

\item{seedNum}{Seed for random number generation. Default is 99999999.}
}
\value{
A numeric vector of normalized conditional mutual information (CMI) values for each permutation.
}
\description{
Computes the normalized conditional mutual information (CMI) between vectors sampled from two matrices,
conditioned on two vectors, normalized by the individual information content.
The sampling is done multiple times to generate a distribution.
}
\examples{
mat1 <- matrix(rnorm(10000), nrow = 100, ncol = 100)
mat2 <- matrix(rnorm(10000), nrow = 100, ncol = 100)
condi1 <- rnorm(100)
condi2 <- rnorm(100)
CMIBiCondimat2matPermu(mat1, mat2, condi1, condi2)

}
