Learn R Programming

propr (version 1.1.0)

perb: Calculate proportionality metric rho.

Description

perb returns a propr object containing measures of proportionality.

Usage

perb(counts, ivar = 0, iter = 0, iterSize = ncol(counts) - (ivar > 0), iterHow = 1, onlyDistr = FALSE)

Arguments

counts
A data.frame or matrix. A "count matrix" with subjects as rows and features as columns.
ivar
A numeric scalar. Specificies feature to use as reference for additive log-ratio transformation.
iter
A numeric scalar. Fits iter*iterSize*(iterSize-1)/2 values to an empiric distribution. Skip with iter = 0.
iterSize
A numeric scalar. Fits iter*iterSize*(iterSize-1)/2 values to an empiric distribution.
iterHow
A numeric scalar. Select 1 to randomize feature vectors or 2 to randomize subject vectors.
onlyDistr
A logical. Provided for backend use. Evokes function to return only ecdf fit.

Value

Returns a propr object.

Details

Calculates proportionality metric rho described in Lovell 2015 and expounded in Erb 2016. Uses centered log-ratio transformation of data by default, but will use additive log-ratio transformation of data if non-zero ivar provided.

Let d represent any number of features measured across multiple biological replicates n subjected to a binary or continuous event E. For example, E could represent case-control status, treatment status, treatment dose, or time. This function converts a "count matrix" with n rows and d columns into a proportionality matrix of d rows and d columns containing rho measurements for each feature pair. One can think of the resultant matrix as equivalent to a correlation matrix.

See Also

propr, propr-class, phit

Examples

Run this code
randomNum <- sample(1:1000, size = 25 * 10, replace = TRUE)
counts <- matrix(randomNum, nrow = 25, ncol = 10)
prop <- perb(counts, ivar = 0, iter = 0)

Run the code above in your browser using DataLab