posmeansGG: Gene-specific posterior means

Description Usage Arguments Details Value Author(s) References See Also

View source: R/posmeansGG.r


Computes posterior means for the gene expression levels using a GaGa or MiGaGa model.


posmeansGG(gg.fit, x, groups, sel, underpattern)



GaGa or MiGaGa fit (object of type gagafit, as returned by fitGG).


ExpressionSet, exprSet, data frame or matrix containing the gene expression measurements used to fit the model.


If x is of type ExpressionSet or exprSet, groups should be the name of the column in pData(x) with the groups that one wishes to compare. If x is a matrix or a data frame, groups should be a vector indicating to which group each column in x corresponds to.


Numeric vector with the indexes of the genes we want to draw new samples for (defaults to all genes). If a logical vector is indicated, it is converted to (1:nrow(x))[sel].


Expression pattern assumed to be true (defaults to last pattern in gg.fit$patterns). Posterior means are computed under this pattern. For example, if only the null pattern that all groups are equal and the full alternative that all groups are different are considered, underpattern=1 returns the posterior means under the assumption that groups are different from each other (underpattern=0 returns the same mean for all groups).


The posterior distribution of the mean parameters actually depends on the gene-specific shape parameter(s), which is unknown. To speed up computations, a gamma approximation to the shape parameter posterior is used (see rcgamma for details) and the shape parameter is fixed to its mode a posteriori.


Matrix with mean expression values a posteriori, for each selected gene and each group. Genes are in rows and groups in columns.


David Rossell


Rossell D. GaGa: a simple and flexible hierarchical model for microarray data analysis. http://rosselldavid.googlepages.com.

See Also

fitGG for fitting GaGa and MiGaGa models, parest for computing posterior probabilities of each expression pattern.

gaga documentation built on May 2, 2018, 3:35 a.m.