scoreAdj: Network score

Description Usage Arguments Value Author(s) Examples

View source: R/mnems.r

Description

Computes the fit (score of a network) of the data given a network matrix

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
scoreAdj(
  D,
  adj,
  method = "llr",
  logtype = 2,
  weights = NULL,
  trans.close = TRUE,
  subtopo = NULL,
  prior = NULL,
  ratio = TRUE,
  fpfn = c(0.1, 0.1),
  Rho = NULL,
  dotopo = FALSE,
  P = NULL,
  oldadj = NULL,
  modified = TRUE
)

Arguments

D

data matrix; use modified = FALSE

adj

adjacency matrix of the network phi

method

either llr if D consists of log odds or disc, if D is binary

logtype

log base of the log odds

weights

a numeric vector of weights for the columns of D

trans.close

if TRUE uses the transitive closure of adj

subtopo

optional matrix with the subtopology theta as adjacency matrix

prior

a prior network matrix for adj

ratio

if FALSE uses alternative distance for the model score

fpfn

numeric vector of length two with false positive and false negative rates

Rho

optional perturbation matrix

dotopo

if TRUE computes and returns the subtopology theta (optional)

P

previous score matrix (only used internally)

oldadj

previous adjacency matrix (only used internally)

modified

if TRUE, assumes a prepocessed data matrix

Value

transitively closed matrix or graphNEL

Author(s)

Martin Pirkl

Examples

1
2
3
4
5
6
D <- matrix(rnorm(100*3), 100, 3)
colnames(D) <- 1:3
rownames(D) <- 1:100
adj <- diag(3)
colnames(adj) <- rownames(adj) <- 1:3
scoreAdj(D, adj)

mnem documentation built on Nov. 18, 2020, 2 a.m.