% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generate_community_graph.R
\name{generate_community_graph}
\alias{generate_community_graph}
\title{Generate a Random Symmetric Adjacency Matrix with Community Structure}
\usage{
generate_community_graph(
  n_nodes = 100,
  n_communities = 4,
  community_sizes = NULL,
  intra_prob = 0.8,
  inter_prob = 0.2,
  seed = NULL
)
}
\arguments{
\item{n_nodes}{An integer specifying the total number of nodes (brain regions).
Default is 100.}

\item{n_communities}{An integer specifying the number of communities. Default is 4.}

\item{community_sizes}{An integer vector specifying the sizes of each community.
If NULL, communities are of equal size. Default is NULL.}

\item{intra_prob}{A numeric value between 0 and 1, or a numeric vector of
length \code{n_communities}, specifying the probability of an edge existing
between nodes within the same community. If a scalar, the same probability
is used for all communities. Default is 0.8.}

\item{inter_prob}{A numeric value between 0 and 1 specifying the probability
of an edge existing between nodes from different communities. Default is 0.2.}

\item{seed}{An optional integer for setting the random seed to ensure reproducibility.
Default is NULL.}
}
\value{
A symmetric binary adjacency matrix with no self-loops, representing
  a brain network with community structure.
}
\description{
This function generates a random symmetric adjacency matrix representing
a brain network with community structure. Nodes within the same community
have a higher probability of being connected compared to nodes from different
communities.
}
\examples{
# Generate a brain network with community structure
G <- generate_community_graph(n_nodes = 100, n_communities = 4, intra_prob = 0.8, inter_prob = 0.2)
}
