next up previous contents
Next: 7.2 R version Up: 7 Writing your own Previous: 7 Writing your own   Contents

7.1 General ideas

The main motivation for developing the approach has been to make it possible for different researchers to analyze their data using a model that they find biologically interesting and realistic. For example, depending on the mode of dispersal, the probability distribution of the gene displacements may decay more or less exponentially with distance. There may also be effects of habitat selection; migration to high quality subpopulation may be more likely, and the geography may more complicated than in idealized theoretical models.

Parameters representing such dependencies are fully possible to incorporate in the analysis. The idea is that different users should write their own function for a migration matrix model that they find biologically interesting. This function should take the following two arguments; a parameter vector theta, and n, the number of subpopulations, and should return a $ ({\tt n} \times {\tt n})$ matrix. The sum of each row must be equal to or less than one. The remaining proportion, that is, $ 1-\sum_{j=1}^n m_{ij}$, represent the sum the mutation rate and the rate of migration from the `outside world' into each subpopulation $ i$.

Both the R and S-plus version provides a way of handling so called box constraints on the parameters. For example, in the case of the steppingstone model, only parameter values in the range from 0 to 1 are allowed. When the likelihood is maximised, fitmodel needs to get this information from the function defining the migration model provided by the user. The idea is to define this information once and for all inside the declarations for the new migration model. The mechanism for achieving this is implemented somewhat differently in the R and S-plus version:


next up previous contents
Next: 7.2 R version Up: 7 Writing your own Previous: 7 Writing your own   Contents
Jarle Tufto 2001-08-28