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)
RJaCGH
object, of class 'RJaCGH',
'RJaCGH.Chrom', 'RJaCGH.Genome' or 'RJaCGH.array'.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.RJaCGH
, plot.RJaCGH
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)
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)
Run the code above in your browser using DataLab