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 fit.gg).
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, data frame or matrix containing the gene expression measurements used to fit the model.
groups If x is of type ExpressionSet, 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

List with the following components:

xnew Matrix of length(nsel) rows and length(groupsnew) columns with observations drawn from the posterior predictive.
dnew Matrix with same dimensions as xnew with with expression patterns drawn from the posterior.
anew Matrix with same dimensions as xnew with with shape parameters drawn from the posterior.
lnew Matrix with same dimensions as xnew with with mean expression drawn from the posterior.

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, sim.gg for prior predictive simulation.


[Package gaga version 1.0.0 Index]