backmigrate: Sample from Parental Locations

Description Usage Arguments Value

Description

This takes a set of locations and a nonnegative weighting vector, and samples from the time-reversed migration probabilities, weighted by the weights.

Usage

1

Arguments

x

A vector of locations (indices).

migration

The migration object.

weights

A nonnegative vector of weights.

Value

A vector of locations of the same form as x. If the probability of migrating from i to j is M[i,j], then a sample at j will choose i with probability equal to weights[i] M[i,j]/sum(weights*M[,j]).


petrelharp/landsim documentation built on May 25, 2019, 2:53 a.m.