compute_density: Calculate density of correlation.

Description Usage Arguments Details Value

Description

Computes the density of correlation of the random negative control and the data correlations.

Usage

1
compute_density(control, correlations, window_number)

Arguments

control

A list containing random control correlation vectors for a selected window.

correlations

A list containing correlations of each window against the top window.

window_number

An integer indicating the number of the window for which the density is to be computed.

Details

The density data is returned only for the selected window, therefore, compute_density needs to be called once per window.

For both the control and the data, compute_density converts correlations to absolute values before computing their density.

Density is computed using the density function, from the stats package. However, this function returns a density object, therefore, x and y values of density are subset using $.

Since there is more than one control correlation vector for a single window, given the necessity to randomize the top window several times, the mean of density y values will be returned instead. Standard error of the mean is also calculated and added and substracted from the mean to compute the maximum and minimum estimated density.

It should be noted that all control densities are assumed to provide approximately similar x values, and therefore, only those for the first control density are returned.

All these, together with x and y density values for the data correlations, are bound in a data frame and returned.

Column names of the returned data frame and their meaning:

Value

A data frame containing all density data from the control and the window correlations as named columns.


angelesarzalluz/scfilters documentation built on May 10, 2019, 11:46 a.m.