View source: R/model.comparison.R
match.layers.x.runs | R Documentation |
match.layers.x.runs
match.layers.x.runs(admix.mat1, admix.mat2, admix.mat1.order = NULL)
admix.mat1 |
A |
admix.mat2 |
A |
admix.mat1.order |
An optional |
This function takes the results of two independent
conStruct
analyses and compares them to identify
which layers in a new analysis correspond most closely
to the layers from an original analysis.
This function compares admixture proportions in layers across
independent conStruct
runs, and compares between them to
identify the layers in admix.mat2
that correspond most
closely to those in admix.mat1
. It then returns a vector
giving an ordering of admix.mat2
that matches up the order
of the layers that correspond to each other. This can be useful
for:
Dealing with "label switching" across independent runs with the same number of layers;
Plotting results from independent runs with different
numbers of layers using consistent colors
(e.g., the "blue" layer shows up as blue even as
K
increases);
Examining results for multimodality (i.e., multiple distinct solutions with qualitatively different patterns of membership across layers).
The admix.mat1.order
argument can be useful when running
this function to sync up plotting colors/order across the output
of more than two conStruct
runs.
This function returns a vector
giving the ordering
of the layers in admix.mat2
that maximizes
similarity between admix.mat1
and re-ordered
admix.mat2
.
# compare the estimated admixture proportions from
# two different conStruct runs to determine which
# layers in one run correspond to those in the other
match.layers.x.runs(admix.props1,admix.props2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.