smoothMeans {RJaCGH}R Documentation

Smoothed posterior mean

Description

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

Usage

smoothMeans(obj, k = NULL)
## S3 method for class 'RJaCGH':
smoothMeans(obj, k=NULL)
## S3 method for class 'RJaCGH.Chrom':
smoothMeans(obj, k=NULL)
## S3 method for class 'RJaCGH.genome':
smoothMeans(obj, k=NULL)
## S3 method for class 'RJaCGH.array':
smoothMeans(obj, k=NULL)

Arguments

obj An RJaCGH object, of class 'RJaCGH', 'RJaCGH.Chrom', 'RJaCGH.genome' or 'RJaCGH.array'.
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 this smoothed means are computed for every model and averaged by the posterior probability of each model.

Value

For class 'RJaCGH', 'RJaCGH.Chrom' and 'RJaCGH.genome' a vector with the smoothed means for every probe. For class 'RJaCGH.array' a list with as many elements as arrays, each one a vector with the smoothed means for that array.

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

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)

[Package RJaCGH version 1.2.5 Index]