smoothMeans: Smoothed posterior mean

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

View source: R/RJaCGH.R

Description

Smoothed posterior mean for every probe after fitting a RJaCGH model.

Usage

1
2
3
smoothMeans(obj, array=NULL, Chrom = NULL, k = NULL)
## S3 method for class 'RJaCGH'
smoothMeans(obj, array=NULL, Chrom = NULL, k=NULL)

Arguments

obj

An RJaCGH object, of class 'RJaCGH'

array

Vector of names of the array to get smoothed means. If NULL, all of them.

Chrom

Vector of the chromosomes. If NULL, all of them.

k

Number of states (or model) to get the smoothed means from. If NULL, Bayesian Model Averaging is used.

Details

For a model with k hidden states, the mean from the MCMC samples from mu is computed for every hidden state. Then, for every probe these means are averaged by its posterior probability of belonging to every hidden state. If k is NULL, then these smoothed means are computed for every model and averaged by the posterior probability of each model.

Value

A matrix. Columns of the matrix are arrays (i.e., for an RJaCGH object with a single array, the value is a one column matrix). Each column contains the smoothed means for every probe.

Author(s)

Oscar M. Rueda and Ramon Diaz Uriarte

References

Rueda OM, Diaz-Uriarte R. Flexible and Accurate Detection of Genomic Copy-Number Changes from aCGH. PLoS Comput Biol. 2007;3(6):e122

See Also

RJaCGH, plot.RJaCGH

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
y <- c(rnorm(100, 0, 1), rnorm(10, -3, 1), rnorm(20, 3, 1),
       rnorm(100,0, 1)) 
Pos <- sample(x=1:500, size=230, replace=TRUE)
Pos <- cumsum(Pos)
Chrom <- rep(1:23, rep(10, 23))

jp <- list(sigma.tau.mu=rep(0.5, 4), sigma.tau.sigma.2=rep(0.3, 4),
           sigma.tau.beta=rep(0.7, 4), tau.split.mu=0.5, tau.split.beta=0.5)

fit.genome <- RJaCGH(y=y, Pos=Pos, Chrom=Chrom, model="Genome",
                    burnin=10, TOT=1000, k.max = 4,
                    jump.parameters=jp)
plot(y~Pos)
lines(smoothMeans(fit.genome) ~ Pos)

RJaCGH documentation built on May 2, 2019, 3:34 p.m.

Related to smoothMeans in RJaCGH...