PolyfunctionalityScore: Compute the Polyfunctionality Score for each subject fit in a...

Description Usage Arguments Value Examples

View source: R/Scores.R

Description

Computes the Polyfunctionality score for each observation from the gamma matrix of a COMPASS model fit. The scores are normalized to one.

Usage

1
2
3
4
5
6
7
PolyfunctionalityScore(x, degree, n, markers = NULL)

## S3 method for class 'COMPASSResult'
PolyfunctionalityScore(x, degree, n, markers = NULL)

## Default S3 method:
PolyfunctionalityScore(x, degree, n, markers = NULL)

Arguments

x

An object of class COMPASSResult, as returned by COMPASS. Alternatively, a matrix of functionality scores.

degree

A vector of weights. If missing, this is the 'degree of functionality', that is, the number of markers expressed in a particular category.

n

The total number of markers. This is inferred when x is a COMPASSResult, and is unused in that case.

markers

A character specifying the markers for which to compute the score. Must match names in markers().

Value

A numeric vector of polyfunctionality scores.

Examples

1

Example output

     iid_1      iid_2      iid_3      iid_4      iid_5 
0.10927778 0.01077778 0.16666667 0.13888889 0.10894444 

COMPASS documentation built on Nov. 8, 2020, 8:05 p.m.