Learn R Programming

jaatha (version 2.7.0)

dm.addSymmetricMigration: Adds symmetric migration between all populations

Description

This adds migration between all subpopulation, all with the same rate. Please look at the documentation for dm.addMigration for detailed information about migration.

Usage

dm.addSymmetricMigration(dm, lower.range, upper.range, fixed.value,
  par.new = T, new.par.name = "M", parameter, time.start = "0")

Arguments

dm
The demographic model to which migration events should be added.
lower.range
If you want to estimate the migration parameter (see note
upper.range
Same as lower.range, but the largest possible value.
fixed.value
If specified, the migration rate will not be estimated, but assumed to have the given value.
par.new
If 'TRUE' a new parameter will be created using the arguments 'lower.range' and 'upper.range' or 'fixed.value'. It will be named 'new.par.name'. If 'FALSE' the argument 'parameter' will be evaluated instead.
new.par.name
The name for the new parameter.
parameter
Instead of creating a new parameter, you can also set the mutation rate to an expression based on existing parameters. For example setting this to "M" will use an parameter with name M that you have previously created. You can also use R expression here,
time.start
The time point at which the migration with this rate starts.

Value

  • The demographic model with migration

Examples

Run this code
dm <- dm.createThetaTauModel(c(25,25), 100)
dm <- dm.addSymmetricMigration(dm, 0.01, 5, time.start="0.5*tau")

Run the code above in your browser using DataLab