interlayer_edge_density: Calculate Interlayer Edge Density for Plant Trait Multilayer...

View source: R/interlayer_edge_density.R

interlayer_edge_densityR Documentation

Calculate Interlayer Edge Density for Plant Trait Multilayer Networks

Description

This function calculates the interlayer edge density (IED) for a plant trait multilayer network (PTMN). The IED measures the ratio of observed to maximally possible interlayer edges, indicating the extent of direct connections among functional layers. A higher IED indicates greater interdependency among layers, reflecting stronger overall network integration.

Usage

interlayer_edge_density(data)

Arguments

data

A data frame containing edge information for the multilayer network. The data frame must contain at least four columns: layer.from, layer.to, node.from, and node.to, representing the source layer, target layer, source node, and target node for each edge, respectively.

Details

The interlayer edge density is calculated using the formula:

IED = \frac{\sum_{\alpha=1}^{M-1} \sum_{\beta=\alpha+1}^{M} L_{inter}^{\alpha,\beta}}{\sum_{\alpha=1}^{M-1} \sum_{\beta=\alpha+1}^{M} n_{\alpha} \cdot n_{\beta}}

where M is the total number of layers, L_{inter}^{\alpha,\beta} is the number of observed interlayer edges between layers \alpha and \beta, and n_{\alpha} and n_{\beta} are their respective node counts.

This parameter is one of the specially designed topological parameters for quantifying PTMN topology, facilitating the effective identification of hub traits and key cross-layer functional modules essential for understanding coordinated adaptation of plant traits across functional levels.

Value

A numeric value representing the interlayer edge density, calculated as the ratio of actual interlayer edges to the maximum possible number of interlayer edges between all layer pairs.

See Also

PTMN for constructing plant trait multilayer networks

Examples

## Not run: 
data(forest_invader_tree)
data(forest_invader_traits)
traits <- forest_invader_traits[, 6:73]
layers <- list(
  shoot_dynamics = c("LeafDuration", "LeafFall50", "LeafRate_max",
                     "Chl_shade50", "LAgain", "FallDuration",
                     "LeafOut", "Chl_sun50", "EmergeDuration",
                     "LeafTurnover"),
  leaf_structure = c("PA_leaf", "Mass_leaf", "Lifespan_leaf",
                     "Thick_leaf", "SLA", "Lobe", "LDMC",
                     "Stomate_size", "Stomate_index"),
  leaf_metabolism = c("J_max", "Vc_max", "Asat_area", "CC_mass",
                      "LSP", "AQY", "CC_area", "Rd_area",
                      "Asat_mass", "WUE", "Rd_mass", "PNUE"),
  leaf_chemistry = c("N_area", "Chl_area", "DNA", "Phenolics",
                     "Cellulose", "N_mass", "N_litter", "Chl_ab",
                     "Chl_mass", "N_res", "C_litter", "C_area",
                     "C_mass", "Ash", "Lignin", "Solubles",
                     "Decomp_leaf", "Hemi"),
  root = c("NPP_root", "SS_root", "SRL", "RTD", "RDMC",
           "NSC_root", "Decomp_root", "Starch_root",
           "C_root", "N_root", "Lignin_root"),
  stem = c("Latewood_diam", "Metaxylem_diam", "Earlywood_diam",
           "NSC_stem", "Vessel_freq", "SS_stem", "Cond_stem",
           "Starch_stem")
)
graph <- PTMN(traits, layers_list = layers, method = "pearson")
interlayer_edge_density(graph)

## End(Not run)


MultiTraits documentation built on March 22, 2026, 9:06 a.m.