compare.two.runs
makes figures comparing the output
from two conStruct analyses.
compare.two.runs(
conStruct.results1,
data.block1,
conStruct.results2,
data.block2,
prefix,
layer.colors = NULL
)
This function has only invisible return values.
The list output by a
conStruct
run.
A data.block
list saved during a
conStruct
run.
The list output by a second
conStruct
run.
A data.block
list saved during a
second conStruct
run.
A character vector to be prepended to all figures.
A vector
of colors to be used in
plotting results for different layers. Users must
specify one color per layer. If NULL
, plots
will use a pre-specified vector of colors.
This function takes the outputs from two conStruct analyses and generates a number of plots for comparing results and diagnosing MCMC performance.
This function produces a variety of plots that can be
useful for comparing results from two conStruct
analyses.
The runs must have the same number of independent MCMC chains,
but may have different values of K
. The spatial and
nonspatial models can be compared. If the runs were executed
with different values of K
, the run with the smaller
value of K
should be specified in the first set of
arguments (conStruct.results1
and data.block1
).
The plots made are by no means an exhaustive, and users are
encouraged to make further plots, or customize these plots as they
see fit. For each plot, one file is generated for each MCMC chain
in each analysis (specified with the n.chains
argument in
the function conStruct
. For clarity, the layers in the second
are matched to those in the first using the function
match.clusters.x.runs
The plots generated (as .pdf files) are:
Structure plot - STRUCTURE-style plot, where each sample
is represented as a stacked bar plot, and the length of the
bar plot segments of each color represent that sample's
admixture proportion in that layer. Described further
in the help page for make.structure.plot
.
Admixture pie plot - A map of samples in which each sample's
location is denoted with a pie chart, and the proportion
of a pie chart of each color represents that sample's
admixture in each layer. Described further in the help
page for make.admix.pie.plot
model.fit.CIs - A plot of the sample allelic covariance shown with the 95% credible interval of the parametric covariance for each entry in the matrix.
layer.covariances - A plot of the layer-specific covariances overlain unto the sample allelic covariance.
Trace plots - Plots of parameter values over the MCMC.
lpd - A plot of the log posterior probability over the MCMC.
nuggets - A plot of estimates of the nugget parameters over the MCMC.
gamma - A plot of estimates of the gamma parameter over the MCMC.
layer.cov.params - Plots of estimates of the layer-specific parameters over the MCMC.
admix.props - A plot of estimates of the admixture proportions over the MCMC.