Perform a Bayesian Analysis of a Sample of Genes in a Subdivided Population

Share:

Description

Perform a Bayesian analysis of a sample of genes in a subdivided population.

Usage

1
  run.mcmc(sample,chain.length,burnin,range.M,delta.M,delta.pi,alpha,graphics,true.M,true.pi)

Arguments

sample

an object generated by the sim.inference.model or by the sim.coalescent command

chain.length

total length of the chain

burnin

number of initial steps to discard from the chain

range.M

the support for M

delta.M

width of the uniform proposal for the parameter M

delta.pi

width of the uniform proposals for the parameters pi

alpha

the alpha-level, which takes the default value alpha = 0.05

graphics

a logical variable, which is TRUE if the user wants graphics to be plotted

true.M

true (simulated) value of M

true.pi

true (simulated) value of pi

Details

Once the sim.inference.model or by the sim.coalescent command lines have been executed, run.mcmc can be used to compute a Bayesian analysis of the sample of genes.

Value

A MCMC chain.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## This is to simulate a sample of genes (at a single locus), using the inference model, with
## 50 genes collected in each of 10 sampled demes. In this example, the product of
## twice the effective population size and migration rate is 2, 
## and the frequency of allele A in the migrant pool is 0.5

sample <- sim.inference.model(number.of.sampled.demes = 10,sample.sizes = 50,M = 2,pi = 0.5)

## This is to run a MCMC for that sample

run.mcmc(sample)