stat.bayesian {sma} | R Documentation |

## Calculates an Odds Ratio of Each Gene in a Multi-slide microarray
Experiment

### 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

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

nbNumber of slides containing spots for a gene (common to all
genes).
nwNumber of spots for a gene within each slide (common to all genes).
MbarOveralll means for each gene.
SSBSum of squares between slides for each gene.
SSBSum of squares within slides for each gene.
para is a list of parameters common to all genes containing

pProbability that a random gene is differentially
expressed. Default is 0.01.
v,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))
cParameter in the prior for the mean expression ratio.
kAn 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

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)

[Package

*sma* version 0.5.15

Index]