Learn R Programming

propr (version 1.1.0)

phit: Calculate proportionality metric phi.

Description

phit returns a propr object containing measures of proportionality.

Usage

phit(counts, symmetrize = TRUE, iter = 0, iterSize = ncol(counts), iterHow = 1, onlyDistr = FALSE)

Arguments

counts
A data.frame or matrix. A "count matrix" with subjects as rows and features as columns.
symmetrize
A logical. If TRUE, forces symmetry by duplicating the "lower left triangle".
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

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 phi measurements for each feature pair. One can think of the resultant matrix as equivalent to a distance matrix, except that it has no symmetry by default.

See Also

propr, propr-class, perb

Examples

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

Run the code above in your browser using DataLab