# 03-MixOf3Beta-class: Class "MixOf3Beta" In NewmanOmics: Extending the Newman Studentized Range Statistic to Transcriptomics

## Description

Represents the results of fitting a beta-mixture model to a set of p-values that has peaks at both zero and one.

## Details

Given a set of p-values (or any data on the interval [0,1]) that has peaks at both ends of the interval, we fit a three-componet mixture model. One component is uniform, and represents the expected distribution under the null hypothesis that nothing interesting is happening anywhere. The second component has the distribution Beta(1,M); this has a peak at zero and represents the features of interest. The final component has the distribution Beta(L,1). In the context of the Newman paired statistic, this represents genes or features whose variabilirt is smaller than the locally smoothed estimate of the standard deviation; we can think of these as "extra boring".

## Creating Objects

In practice, users will use the `fitMix3` function to construct an object of the `MixOf3Beta` class. Hand construction is strongly discouraged.

## Slots

`input`:

A numeric vector containing the input p-values.

`mle`:

A numeric vactor of length 2 containing the bea parameters `L` and M (in that order).

`psi`:

A numeric vector of length three containing the mixing parameters, in the order (right-peak component, left-peak component, and uniform-component).

`Z`:

A matrix of size N (number of features) by 3. This contains the latent indicator matrix. Each row corresponds to a gene or feature, and the entries show the proabbiltiy that the feature arose from the right, left, or uniform comnponent.

## Methods

plot(x, y, ...)

Plot the decompositon of the data into thre pieces.

hist(x, lcol = "red", breaks=101, ...)

Plot a histogram of the p-values along with the fitted model of the distribution.

image(x)

Plot a (sorted) image of the latent variable Z-matrix.

## Author(s)

Kevin R. Coombes [email protected]

## References

Abrams ZB, Joglekar A, Gershkowitz GR, Sinicropi-yao S, Asiaee A, Carbone DP, Coombes KR. Personalized Transcriptomics: Selecting Drugs Based on Gene Expression Profiles. Preprint.

`pairedStat`, `NewmanPaired-class`
 ```1 2 3 4 5 6 7 8``` ```set.seed(98765) ds <- c(rbeta(3000, 20, 1), rbeta(1000, 1, 40), runif(6000)) fit <- fitMix3(ds) image(fit, col=topo.colors(64)) hist(fit, col="skyblue", lcol="blue") plot(fit) ```