chainsSelect {RJaCGH} | R Documentation |
method to remove outlier chains ('RJaCGH' objects') from a set of parallel RJMCMC chains.
chainsSelect(obj, nutrim=NULL, trim=NULL) ## S3 method for class 'RJaCGH': chainsSelect(obj, nutrim=NULL, trim=NULL) ## S3 method for class 'RJaCGH.Chrom': chainsSelect(obj, nutrim = NULL, trim = NULL) ## S3 method for class 'RJaCGH.genome': chainsSelect(obj, nutrim = NULL, trim = NULL) ## S3 method for class 'RJaCGH.array': chainsSelect(obj, nutrim = NULL, trim = NULL)
obj |
a list containing several parallel chains; that is objects of any of RJaCGH, RJaCGH.genome, RJaCGH.array classes (obviously, all of the same class). |
nutrim |
Number of chains to remove. |
trim |
Proportion of chains to remove. This or nutrim
must be passed to the method. |
In Reversible Jump MCMC, there may be occasions in that a chain
can get trapped in a model. If this happens, Gelman-brooks -
see gelman.brooks.plot
diagnostics
for k
, the number of states is not defined. This method removes
the chains whose k trajectories are most unusual compared to the rest.
After removing outlier chains, one can run gelman.brooks.plot
to check for convergnce of the remaining chains and later
collapseChain
to join them, or directly this last function.
A list of less elements of the same class asobj
.
Oscar M. Rueda and Ramon Diaz Uriarte
Rueda OM, Diaz-Uriarte R. Flexible and Accurate Detection of Genomic Copy-Number Changes from aCGH. PLoS Comput Biol. 2007;3(6):e122
RJaCGH
,
summary.RJaCGH
, model.averaging
,
plot.RJaCGH
, states
,
trace.plot
, collapseChain
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.chrom <- RJaCGH(y=y, Pos=Pos, Chrom=Chrom, model="Chrom", burnin=10, TOT=1000, k.max = 4, jump.parameters=jp) fit.genome <- list() for (i in 1:4) { fit.genome[[i]] <- RJaCGH(y=y, Pos=Pos, Chrom=Chrom, model="genome", burnin=10, TOT=1000, jump.parameters=jp, k.max = 4) } fit.genome <- chainsSelect(fit.genome, nutrim=1)