calculate.layer.contribution
calculate.layer.contribution(conStruct.results, data.block, layer.order = NULL)
This function returns a vector
giving the
relative contributions of the layers
in the analysis.
The list output by a
conStruct
run for a given MCMC chain.
A data.block
list saved during a
conStruct
run.
An optional vector
giving the
order in which the layers of conStruct.results
are
read.
This function takes the results of a conStruct
analysis and calculates the relative contributions of
each layer to total covariance.
This function calculates the contribution of each layer to
total covariance by multiplying the within-layer covariance
in a given layer by the admixture proportions samples draw
from that layer. The relative contribution of that layer
is this absolute contribution divided by the sum of those of
all other layers.
A layer can have a large contribution if many samples draw
large amounts of admixture from it, or if it has a very large
within-layer covariance parameter (phi), or some combination
of the two. Layer contribution can be useful for evaluating
an appropriate level of model complexity for the data (e.g.,
choosing a value of K
or comparing the spatial and
nonspatial models).