scaleFreeFitIndex_alternative: Alternative implementation of WGCNA::scaleFreeFitIndex

Description Usage Arguments Value Source

View source: R/alternative_pickHardThreshold.R

Description

(INTERNAL) This function is a copy of scaleFreeFitIndex with minor changes introduced to fit the needs of this package.

Description by scaleFreeFitIndex: The function scaleFreeFitIndex calculates several indices (fitting statistics) for evaluating scale free topology fit. The input is a vector (of connectivities) k. Next k is discretized into nBreaks number of equal- width bins. Let's denote the resulting vector dk. The relative frequency for each bin is denoted p.dk.

The entire original function code is contained in the function and deleted lines are commented out using #-- to show changes.

Usage

1
scaleFreeFitIndex_alternative(k, nBreaks = 10, removeFirst = FALSE)

Arguments

k

numeric vector whose components contain non-negative values

nBreaks

positive integer. This determines the number of equal width bins.

removeFirst

logical. If TRUE then the first bin will be removed.

Value

the model fitting index (R.squared) from the following model lm(log.p.dk ~ log.dk)

Source

scaleFreeFitIndex


molnet-org/molnet documentation built on Dec. 21, 2021, 8:59 p.m.