degreeSparsebn {glmSparseNet} | R Documentation

## Calculate degree of correlation matrix

### Description

Calculate degree of correlation matrix

### Usage

    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

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

[Package glmSparseNet version 1.2.0 Index]