View source: R/pvalue_calculation.R
pval | R Documentation |
Calculation of p-values for each score with respect to the null.
pval(actual.scores, null.scores, method = "exponential")
actual.scores |
a vector including actual scores with the length of number of nodes (N_nodes). |
null.scores |
a matrix of null scores with the dimension of N_nodes x N_repeat |
method |
statistical test method: c( |
Calculate the p-value for each node based on the actual and null diffusion scores.
vector of p-values
graph = graph_generation(n.nodes = 10, prob.connection = 0.5)
initial_score = c(rep(0,5),0.2, 0.3, 0, 0, 0.5)
names(initial_score) = igraph::V(graph)
Actual_score = actual_score(graph = graph, initial.score = initial_score, damping = 0.7)
Null_score = null_score(graph = graph, initial.score = initial_score, damping = 0.7, N.repeat = 10)
pvalue = pval(actual.scores = Actual_score, null.scores = Null_score, method = "exponential")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.