plot.RJaCGH {RJaCGH} | R Documentation |
A plot is drawed with information from the fit of a RJaCGH object.
plot.RJaCGH(x, k = NULL, model.averaging = TRUE, cex=1, ...) plot.RJaCGH.Chrom(x, Chrom="genome", model.averaging=TRUE, cex=1, ...) plot.RJaCGH.genome(x, k=NULL, model.averaging=TRUE, cex=1, ...) plot.RJaCGH.array(x, method="averaging", weights=NULL, cex=1, ...)
x |
any of RJaCGH, RJaCGH.Chrom, RJaCGH.genome, RJaCGH.array objects |
k |
Model to plot (i.e., number of hidden states). If NULL, the most visited is taken. |
cex |
A numerical value giving the amount by which plotting text and symbols should be scaled relative to the default. |
model.averaging |
if TRUE, model.averaging is
performed. If FALSE, a call to link{states} is made to get
hidden state sequence. |
Chrom |
For RJaCGH.chrom objects. If "genome", a whole plot of the genome is shown. If a chromosome number, olnly the model corresponding to that chromosome. See details. |
method |
one of "averaging" or "other" |
weights |
vector of weights for each array. Must have the length of the number of arrays. If NULL, the weights are uniform. |
... |
additional arguments passed to plot. |
Depending on the object, a different plot is drawed:
If the object is RJaCGH or RJaCGH.genome, a panel with 5 subplots is
returned. The first one is a barplot with the posterior distribution
of the number of hidden states. The second and third are a density
plot of the posterior distribution of means and variances. The four
one is the probability of staying in the same hidden state, as
returned by plot.Q.NH
, and the last one shows the
original observations colored by thir hidden state and the probability
of being in that hidden state.
On every plot, the 'Normal' state is coloured black. The 'Gain' states are red and the 'Loss' ones green.
If the object is 'RJaCGH.Chrom', only the last one of the plots are shown. For the complete panel, call the method on every chromosome.
If the object is 'RJaCGH.array' and method is 'averaging', the last
one of the plots is drawn, but the hidden state sequence and its
probability is computed averaging on all the arrays with weights
according to weights
vector. If method is 'other', again the
last plot is drawn, but the percentage of arrays in which every gene
is Gain/Lost is shown, weighted by the weights
vector.
A plot.
Oscar Rueda and Ramon Diaz Uriarte
Oscar Rueda and Ramon Diaz Uriarte, in prep.
RJaCGH
,
summary.RJaCGH
, model.averaging
,
states
, trace.plot
,
gelman.brooks.plot
, collapseChain
## Not run: y <- c(rnorm(100, 0, 1), rnorm(10, -3, 1), rnorm(20, 3, 1), rnorm(100, 0, 1)) Pos <- runif(230) Pos <- cumsum(Pos) Chrom <- rep(1:23, rep(10, 23)) jp <- list(sigma.tau.mu=rep(0.5, 5), sigma.tau.sigma.2=rep(0.3, 5), sigma.tau.beta=rep(0.7, 5), tau.split.mu=0.5, tau.split.beta=0.5) fit.Chrom <- RJaCGH(y=y, Pos=Pos, Chrom=Chrom, model="Chrom", burnin=100, TOT=1000, jump.parameters=jp) plot(fit.Chrom) plot(fit.Chrom[[1]]) ## End(Not run)