stat.bayesian: Calculates an Odds Ratio of Each Gene in a Multi-slide...

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

Description

This function takes the normalized expression estimates from a multi-slide microarray experiment (M-values output by stat.ma) and returns an odds ratio for each gene: log( Pr(the gene is differentially expressed) / Pr(the gene is not differentially expressed) ). The parameter estimates of the Bayesian model used, as well as some data structures which are useful when presenting the lodscore graphically are also in the output.

Usage

1
2
	stat.bayesian(M=NULL, nb=NULL, nw=1, Xprep=NULL, 
	para=list(p = 0.01, v = NULL, a = NULL, c = NULL, k = NULL))

Arguments

M

Matrix of (normalized) log expression ratios M = log_2 (R/G) (E.g. output from stat.ma())

nb

Number of slides containing spots for a gene (common for all genes). Unnecessary argument if nw=1.

nw

Number of spots for a gene within each slide (common to all genes).Default is 1.

Xprep

Some data structures useful in graphical presentation. (This is calculated only if not already supplied as input. See details!)

para

Estimates of the parameters used in the Bayesian calculations. (These are calculated only if not already supplied as input. See details!)

Details

Xprep and para are optional input, but they are always in the output. If Xprep is supplied as input, M, nb and nw are unnecessary input. A subset of the parameters in para can be specified in the input, allowing the function to estimate only the others.

Xprep is a list containing

\item

nbNumber of slides containing spots for a gene (common to all genes). \itemnwNumber of spots for a gene within each slide (common to all genes). \itemMbarOveralll means for each gene. \itemSSBSum of squares between slides for each gene. \itemSSBSum of squares within slides for each gene.

para is a list of parameters common to all genes containing

\item

pProbability that a random gene is differentially expressed. Default is 0.01. \itemv,aParameters in the prior for the variance. If the observed sums of squares between slides are MSB, then v and a is such that (nb*a/(2MSB)~Gamma(v,1)) \itemcParameter in the prior for the mean expression ratio. \itemkAn approximate ratio of the variances between to within slides, only needed when both nw>1 and nb>1

Value

A list of

Xprep

Some data structures useful in graphical presentation. See details!

para

Estimates of the parameters used in the Bayesian calculations. See details!

lods

The log odds ratio for each gene.

Author(s)

Ingrid Lönnstedt ingrid@math.uu.se
Yee Hwa Yang, yeehwa@stat.berkeley.edu

See Also

plot.bayesian

Examples

1
2
3
4
5
6
7
data(MouseArray)
## mouse.setup <- init.grid() 
## mouse.data <- init.data() ## see \emph{init.data} 
mouse.lratio <- stat.ma(mouse.data, mouse.setup)

mouse.bayesian<-stat.bayesian(M=mouse.lratio$M)
plot(mouse.bayesian$Xprep$Mbar, mouse.bayesian$lods)

gnyamundanda/sma documentation built on May 3, 2019, 5:17 p.m.