# Loglikelihood for macro-evolutionary succession under diversity-dependent diversification with the key innovation at time t = t_d

### Description

This function computes the loglikelihood of a diversity-dependent diversification model for a given set of branching times and parameter values where the diversity-dependent dynamics of an innovative subclade have different parameters from the dynamics of the main clade from time t_d, but both are governed by the same carrying capacity and experience each other's diversity.

### Usage

1 | ```
dd_MS_loglik(pars1, pars2, brtsM, brtsS, missnumspec, methode = 'analytical')
``` |

### Arguments

`pars1` |
Vector of parameters: |

`pars2` |
Vector of model settings: |

`brtsM` |
A set of branching times of the main clade in the phylogeny, all positive |

`brtsS` |
A set of branching times of the subclade in the phylogeny, all positive |

`missnumspec` |
The number of species that are in the clade but missing in the phylogeny. One can specify the sum of the missing species in main clade and subclade or a vector c(missnumspec_M,missnumspec_S) with missing species in main clade and subclade respectively. |

`methode` |
The method used to solve the master equation, default is 'analytical' which uses matrix exponentiation; alternatively numerical ODE solvers can be used, such as 'lsoda' or 'ode45'. These were used in the package before version 3.1. |

### Value

The loglikelihood

### Author(s)

Rampal S. Etienne & Bart Haegeman

### References

- Etienne, R.S. et al. 2012, Proc. Roy. Soc. B 279: 1300-1309, doi: 10.1098/rspb.2011.1439

- Etienne, R.S. & B. Haegeman 2012. Am. Nat. 180: E75-E89, doi: 10.1086/667574

### See Also

`dd_MS_ML`

,
`dd_loglik`

,
`dd_KI_loglik`

,
`dd_SR_loglik`

### Examples

1 2 3 4 5 6 |