Learn R Programming

PLEXI (version 1.0.0)

plexi_distance_test_isn: Test the embedding distances of local neighbors change between the two conditions for ISNs.

Description

Test the embedding distances of local neighbors change between the two conditions for ISNs.

Usage

plexi_distance_test_isn(
  distance,
  y,
  stat.test = "wilcox.test",
  p.adjust.method = "none"
)

Value

The adjusted pvalues for each node.

Arguments

distance

a distance list obtained by the plexi_node_distance() function.

y

vector with the length equal to the number of individuals.

stat.test

statistical test used to detect the nodes c("t.test","wilcox.test") (default: wilcox.test)

p.adjust.method

method for adjusting p-value (including methods on p.adjust.methods). If set to "none" (default), no adjustment will be performed.

Details

The adjusted p-values for each node is calculated based on their distance variation between the two conditions.

Examples

Run this code
ISN1 = network_gen(n.nodes = 50, n.var.nodes = 5, n.var.nei = 40, noise.sd = .01)
ISN2 = network_gen(n.nodes = 50, n.var.nodes = 5, n.var.nei = 40, noise.sd = .01)
graph_data = cbind(ISN1[["data_graph"]], ISN1[["data_graph"]][,3:4])
embeddingSpaceList = plexi_embedding(graph.data=graph_data, outcome=c(1,2,1,2),
indv.index=c(1,1,2,2), train.rep=2, random.walk=FALSE)
Dist = plexi_node_distance(embeddingSpaceList)
Result = plexi_distance_test_isn(Dist, y = c(1,2))

Run the code above in your browser using DataLab