Learn R Programming

gaga (version 2.18.0)

checkfit: Check goodness-of-fit of GaGa and MiGaGa models

Description

Produces plots to check fit of GaGa and MiGaGa model. Compares observed data with posterior predictive distribution of the model. Can also compare posterior distribution of parameters with method of moments estimates.

Usage

checkfit(gg.fit, x, groups, type='data', logexpr=FALSE, xlab, ylab, main, lty, lwd, ...)

Arguments

gg.fit
GaGa or MiGaGa fit (object of type gagafit, as returned by fitGG).
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.
type
data checks marginal density of the data; shape checks shape parameter; mean checks mean parameter; shapemean checks the joint of shape and mean parameters
logexpr
If set to TRUE, the expression values are in log2 scale.
xlab
Passed on to plot
ylab
Passed on to plot
main
Passed on to plot
lty
Ignored.
lwd
Ignored.
...
Other arguments to be passed to plot

Value

Produces a plot.

Details

The routine generates random draws from the posterior and posterior predictive distributions, fixing the hyper-parameters at their estimated value (posterior mean if model was fit with method=='Bayes' or maximum likelihood estimate is model was fit with method=='EBayes').

References

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

See Also

simGG to simulate samples from the prior-predictive distribution, simnewsamples to generate parameters and observations from the posterior predictive, which is useful to check goodness-of-fit individually a desired gene.