maximum.likelihood: Perform a Maximum-Likelihood Analysis of a Sample of Genes in...

Description Usage Arguments Details Value Examples

View source: R/infeR.R

Description

Perform a maximum-likelihood analysis of a sample of genes in a subdivided population.

Usage

1
  maximum.likelihood(sample,alpha,M,pi,graphics,true.M,true.pi)

Arguments

sample

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

alpha

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

M

the support for M

pi

the support for pi

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, maximum.likelihood can be used to compute the maximum likelihood analysis of the sample of genes.

Value

a ‘sample’ object

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 compute Nei's unbiased heterozygosity for that sample

maximum.likelihood(sample)

infeR documentation built on May 2, 2019, 4:45 p.m.