simnewsamples {gaga}R Documentation

Posterior predictive simulation

Description

Simulates parameters and data from the posterior and posterior predictive distributions, respectively, of a GaGa or MiGaGa model.

Usage

simnewsamples(gg.fit, groupsnew, sel, x, groups)

Arguments

gg.fit GaGa or MiGaGa fit (object of type gagafit, as returned by fitGG).
groupsnew Vector indicating the group that each new sample should belong to. length(groupsnew) is the number of new samples that will be generated.
sel 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].
x ExpressionSet, exprSet, data frame or matrix containing the gene expression measurements used to fit the model.
groups 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.

Details

The shape parameters are actually drawn from a gamma approximation to their posterior distribution. The function rcgamma implements this approximation.

Value

Object of class 'ExpressionSet'. Expression values can be accessed via exprs(object) and the parameter values used to generate the expression values can be accessed via fData(object).

Author(s)

David Rossell

References

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

See Also

checkfit for posterior predictive plot, simGG for prior predictive simulation.


[Package gaga version 1.2.0 Index]