output.clust {BPEC}R Documentation

Load location data

Description

Posterior output for the clustering parameters.

Usage

output.clust(bpecout)

## S3 method for class 'bpec'
output.clust(bpecout)

Arguments

bpecout

R object from bpec.mcmc run

Value

sampleMeans

A set of posterior samples of the cluster means (i.e. centres).

sampleCovs

A set of posterior samples of the cluster covariances (i.e. shapes).

sampleIndices

A set of posterior samples of the cluster allocations of each observation.

clusterProbs

For each haplotype, posterior probabilities that it belongs to each cluster.

Author(s)

Ioanna Manolopoulou & Axel Hille

Examples

## if you want to load the `mini' example Brown Frog dataset
data(MacrocnemisRawSeqs)
data(MacrocnemisCoordsLocsMini)
rawSeqs <- MacrocnemisRawSeqs
coordsLocs <- MacrocnemisCoordsLocsMini

dims <- 3 #this is 2 if you only have geographical longitude/latitude. 
#(add 1 for each environmental or phenotypic covariate)
maxMig <- 2 #you will need a higher maximum number of migrations, suggest 7
ds <- 0 #start with ds=0 and increase to 1 and then to 2
iter <- 1000 #you will need far more iterations for convergence, start with 100,000
postSamples <- 100 #you will need at least 100 saved posterior samples

#run the Markov chain Monte Carlo sampler
bpecout <- bpec.mcmc(rawSeqs,coordsLocs,maxMig,iter,ds,postSamples,dims)
output.clust(bpecout)


[Package BPEC version 1.3.1 Index]