link_significance: Estimate statistical deviations from ghype model

View source: R/tests.R

linkSignificanceR Documentation

Estimate statistical deviations from ghype model

Description

linkSignificance allows to estimate the statistical deviations of an observed graph from a ghype model.

Usage

linkSignificance(
  graph,
  model,
  under = FALSE,
  log.p = FALSE,
  binomial.approximation = FALSE,
  give_pvals = FALSE
)

link_significance(
  graph,
  model,
  under = FALSE,
  log.p = FALSE,
  binomial.approximation = FALSE,
  give_pvals = TRUE
)

Arguments

graph

an adjacency matrix or a igraph object.

model

a ghype model

under

boolean, estimate under-represented deviations? Default FALSE: i.e. returns over representation

log.p

boolean, return log values of probabilities

binomial.approximation

boolean, force binomial? default FALSE

give_pvals

boolean, return p-values for both under and over significance? when FALSE, it returns probabilty of observing stricly more (or less) edges than in graph. When TRUE returns probability of observing exactly as many edges or more (less) than in graph, like a standard pvalue.

Value

matrix of probabilities with same size as adjacency matrix.

Examples

data("adj_karate")
fullmodel <- ghype(graph = adj_karate, directed = FALSE, selfloops = FALSE)
link_significance(graph = adj_karate, model = fullmodel, under=FALSE)


gi0na/ghypernet documentation built on April 13, 2024, 2:33 a.m.