degreeSparsebn: Calculate degree of correlation matrix

Description Usage Arguments Value Examples

View source: R/centrality.R

Description

Calculate degree of correlation matrix

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
degreeSparsebn(
  xdata,
  type = "continuous",
  levels = NULL,
  ivn = NULL,
  n = NULL,
  object = NULL,
  cutoff = 0,
  consider.unweighted = FALSE,
  n.cores = 1,
  show.message = FALSE,
  force.recalc.degree = FALSE,
  force.recalc.network = FALSE,
  ...
)

Arguments

xdata

calculate correlation matrix on each column

type

either "discrete" or "continuous", see sparsebnUtils::sparsebnData

levels

(optional) list of levels for each node. see sparsebnUtils::sparsebnData

ivn

(optional) list of interventions for each observation, see sparsebnUtils::sparsebnData

n

(optional) number of rows from data matrix to print, see sparsebnUtils::sparsebnData

object

(optional) an object of type sparsebnData, see sparsebnUtils::sparsebnData

cutoff

positive value that determines a cutoff value

consider.unweighted

consider all edges as 1 if they are greater than 0

n.cores

number of cores to be used

show.message

shows cache operation messages

force.recalc.degree

force recalculation, instead of going to cache

force.recalc.network

force recalculation of network and penalty weights, instead of going to cache

...

parameters for sparsebn::estimate.dag

Value

a vector of the degrees

Examples

1
2
3
# generate a random matrix of observations
xdata <- matrix(rnorm(1000), nrow = 20)
degreeSparsebn(xdata)

glmSparseNet documentation built on April 14, 2021, 6 p.m.